/* d:\Cole\tannd\style.css */
/* Floating Chatbot Button */
.chatbot-toggle {
    position: fixed;
    bottom: 100px; /* Adjusted to be above the phone float */
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Tailwind shadow-2xl */
    transition: transform 0.3s ease;
    z-index: 999;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 180px;
    right: 30px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 280px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85); /* Glassmorphism base */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Tailwind shadow-2xl */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
    font-family: 'Inter', Arial, sans-serif;
}

.chatbot-window.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-container {
    position: relative;
}

.avatar-container img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border-radius: 50%;
    border: 2px solid white;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.bot-info h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 2px;
    margin-top: 0;
}

.bot-info span {
    font-size: 12px;
    color: #7f8c8d;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 4px;
}

.icon-btn:hover {
    color: #2c3e50;
}

/* Rotating animation for refresh button */
.rotating {
    animation: rotate 0.5s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    background: transparent;
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Message Bubbles */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Markdown Styles (.chat-markdown) */
.chat-markdown p {
    line-height: 1.6;
    margin-bottom: 8px;
}

.chat-markdown p:last-child {
    margin-bottom: 0;
}

.chat-markdown ul, .chat-markdown ol {
    margin-left: 20px;
    margin-bottom: 8px;
}

.chat-markdown li {
    margin-bottom: 4px;
}

.chat-markdown strong {
    font-weight: 700;
    color: #0056b3; /* Accent color */
}

.message.user .chat-markdown strong {
    color: #fff; /* Override for user message */
}

.chat-markdown code {
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Fira Code', Consolas, monospace;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.chat-markdown pre {
    background-color: #1e1e1e;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 8px;
}

.chat-markdown pre code {
    background-color: transparent;
    padding: 0;
}

.chat-markdown blockquote {
    border-left: 4px solid #007bff;
    margin: 8px 0;
    padding-left: 12px;
    color: #7f8c8d;
    font-style: italic;
}

.message.user .chat-markdown blockquote {
    border-left-color: #fff;
    color: #f1f1f1;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    align-items: center;
}

.typing-indicator span {
    font-size: 12px;
    color: #7f8c8d;
    margin-right: 8px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #7f8c8d;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
.chat-input-container {
    display: flex;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#chat-input:focus {
    border-color: #007bff;
}

.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background 0.3s;
}

.send-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    .chatbot-toggle {
        bottom: 90px; /* Above phone float */
        right: 20px;
    }
}

/* Custom Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}
.main-nav a {
    text-transform: uppercase !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin-left: 0 !important;
    font-size: 15px;
}
.main-nav a.active {
    color: #2563eb !important;
}
.main-nav .nav-sep {
    color: #e5e7eb;
}
.main-nav a i {
    font-size: 12px;
    margin-left: 4px;
    color: #6b7280;
}

/* Mobile Navigation Optimization */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #1f2937;
    padding: 5px;
    z-index: 1001;
}

@media (max-width: 900px) {
  header {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 15px 5% !important;
    position: relative;
  }
  .mobile-menu-btn {
    display: block !important;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
  header nav {
    display: none !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  header nav.show-nav {
    display: flex !important;
  }
  header nav a {
    width: 100% !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    margin-left: 0 !important;
    font-size: 16px !important;
    display: block !important;
    text-align: left !important;
  }
  header nav a:last-child {
    border-bottom: none !important;
  }
  header nav span {
    display: none !important;
  }
}
