:root {
    --primary-color: #000000;
    --secondary-color: #555555;
    --success-color: #2a9d8f;
    --background-color: #ffffff;
    --surface-color: #f8f8f8;
    --text-primary: #212121;
    --text-secondary: #555555;
    --border-color: #e0e0e0;
    --hover-color: #333333;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-dark: linear-gradient(135deg, #000000, #1a1a1a);
    --gradient-button: linear-gradient(to right, #000, #333);
    --glass-backdrop: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.18);
}

* {
    font-family: 'Raleway', sans-serif;
}

body {
    font-family: 'Raleway', sans-serif;
    margin: 0;
    height: 100vh;
    color: var(--text-primary);
}

/* Privacy Notice Banner Styles - Updated to match chatbot theme */
.privacy-notice-banner {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 10px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Raleway', sans-serif;
    box-shadow: var(--shadow-sm);
}

.privacy-notice-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.privacy-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Raleway', sans-serif;
}

.privacy-notice-header i {
    font-size: 16px;
    color: var(--primary-color);
}

.privacy-notice-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-family: 'Raleway', sans-serif;
}

.privacy-notice-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-default);
}

.privacy-notice-text a:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

.privacy-notice-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
}

.privacy-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Raleway', sans-serif;
}

.privacy-btn.got-it {
    background: var(--gradient-button);
    color: white;
    border: 1px solid var(--primary-color);
}

.privacy-btn.got-it:hover {
    background: linear-gradient(to right, #222, #444);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.privacy-btn i {
    font-size: 10px;
}

/* Mobile adjustments for privacy notice */
body.mobile-detected .privacy-notice-content {
    padding: 14px;
}

body.mobile-detected .privacy-notice-text {
    font-size: 12px;
}

body.mobile-detected .privacy-btn {
    padding: 6px 12px;
    font-size: 11px;
}

/* Glass morphism effects */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
}

/* Chat Container - Default desktop styles */
#chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 620px;
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    /* transform: translateY(20px) scale(0.95); */
    visibility: hidden;
    transition: opacity 0.1s smooth;
    border: 1px solid var(--border-color);
    z-index: 999;
    font-family: 'Raleway', sans-serif;
}

#chat-container.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    width: 380px;
    height: 620px; 
    bottom: 80px;
    right: 10px;
    border-radius: 16px;
    transition:opacity 0.2s ease-in;
}

/* Mobile styles applied via JavaScript */
body.mobile-detected #chat-container {
    width: 100vw !important;
    height: 100vh !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 0 !important;
    transform: translateY(100%) !important;
    box-shadow: none !important;
    border: none !important;
}

body.mobile-detected #chat-container.open {
    width: 100vw !important;
    height: 100vh !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 0 !important;
    transform: translateY(0) !important;
    box-shadow: none !important;
    border: none !important;
}

/* Hide the triangle pointer on mobile */
body.mobile-detected #chat-container::after {
    display: none !important;
}

/* Adjust header for mobile */
body.mobile-detected #chat-header-container {
    height: 120px !important;
    padding: 15px 20px !important;
}

body.mobile-detected #chat-container.messaging #chat-header-container {
    height: 50px !important;
    padding: 10px 20px !important;
}

/* Hide chat icon when chat is open - ONLY ON MOBILE */
body.mobile-detected #chat-icon.chat-open {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    pointer-events: none;
}

/* On desktop, chat icon should always be visible */
body:not(.mobile-detected) #chat-icon {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

/* Floating effect for the chat container with triangle pointer */
#chat-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 25px;
    width: 20px;
    height: 20px;
    background: var(--background-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: rotate(45deg);
    z-index: -1;
}

/* Updated chat header - proper black background */
#chat-header-container {
    background: #000000;
    padding: 20px;
    height: 140px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: height 0.4s ease, padding 0.4s ease;
    border-bottom: 1px solid #333;
    font-family: 'Raleway', sans-serif;
}

/* Remove all bubble effects and textures */
#chat-header-container::before,
#chat-header-container::after {
    display: none;
}

/* Compact header state when messaging - show only logo */
#chat-container.messaging #chat-header-container {
    height: 60px;
    padding: 15px 20px;
}

#chat-container.messaging #dynamic-greeting {
    opacity: 0;
    transform: translateY(-10px);
    font-size: 0.8rem;
    line-height: 1;
    pointer-events: none;
}

#chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    font-family: 'Raleway', sans-serif;
}

#logo {
    text-align: left;
    margin: 0;
}

#logo img {
    max-width: 50px;
    height: auto;
    border-radius: 5px;
}

#dynamic-greeting {
    font-family: 'Raleway', sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: font-size 0.4s ease, line-height 0.4s ease;
}

#closeChat {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-default);
    font-family: 'Raleway', sans-serif;
}

#closeChat:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Server Status */
#server-status {
    padding: 6px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-default);
    border-radius: 0;
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.9), rgba(60, 60, 60, 0.8));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    margin: 0;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    font-family: 'Raleway', sans-serif;
}

#server-status i.status-indicator {
    margin-right: 6px;
    font-size: 8px;
}

#server-status i.status-indicator.connected {
    color: #2ecc71;
}

#server-status i.status-indicator.disconnected {
    color: #e74c3c;
}

/* Content Container */
#chat-content-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
}

#scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: var(--background-color);
    scroll-behavior: smooth;
    visibility: hidden;
    font-family: 'Raleway', sans-serif;
    
    /* Hide scrollbar while keeping functionality */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
#scrollable-content::-webkit-scrollbar {
    display: none;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 16px;
    flex-direction: column;
    font-family: 'Raleway', sans-serif;
}

.content-section.active {
    display: flex;
}

/* Home Section Styles */
#home-section {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
}

.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    font-family: 'Raleway', sans-serif;
}

.welcome-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(to bottom right, #e6f7ff, #ccefff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.welcome-image i {
    font-size: 40px;
    color: #000;
}

.welcome-container h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
}

.welcome-container p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Raleway', sans-serif;
}

/* Home Navigation Tabs */
.home-nav-tabs {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 16px 0 24px;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 8px;
    border: 1px solid var(--border-color);
}

.home-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    flex: 1;
    cursor: pointer;
    transition: var(--transition-default);
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
}

.home-nav-tab:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.home-nav-tab.active {
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.home-nav-tab i {
    font-size: 22px;
    margin-bottom: 6px;
    color: #555;
}

.home-nav-tab span {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    font-family: 'Raleway', sans-serif;
}

.home-nav-tab.active i,
.home-nav-tab.active span {
    color: #000;
}

.feature-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    width: 100%;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(33% - 16px);
    min-width: 80px;
    padding: 16px 8px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-default);
    font-family: 'Raleway', sans-serif;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(to bottom, #f5f5f5, #f0f0f0);
}

.feature-card i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #000;
}

.feature-card span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    font-family: 'Raleway', sans-serif;
}

/* Quick Buttons */
#quick-buttons-section {
    background: var(--background-color);
    flex-shrink: 0;
    margin-bottom: 10px;
    font-family: 'Raleway', sans-serif;
}

#quick-buttons-section h3 {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Raleway', sans-serif;
}

#quick-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.quick-button {
    padding: 10px 16px;
    background: black;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-default);
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    font-family: 'Raleway', sans-serif;
}

.quick-button:hover {
    background: rgb(38, 38, 38);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* FAQ Accordion Section Styling - Fixed to take full height */
#faq-section {
    padding: 20px;
    background: #f8f8f8;
    flex: 1;
    min-height: 100%;
    box-sizing: border-box;
    font-family: 'Raleway', sans-serif;
}

#faq-section h3 {
    color: #555;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Raleway', sans-serif;
}

.accordion {
    width: 100%;
}

.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.accordion-header {
    padding: 16px 20px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    user-select: none;
    min-height: 24px;
    font-family: 'Raleway', sans-serif;
}

.accordion-header span {
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    padding-right: 15px;
    font-family: 'Raleway', sans-serif;
}

.accordion-header i {
    color: #999;
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.accordion-item.active .accordion-header {
    border-bottom: 1px solid #e0e0e0;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f9f9f9;
}

.accordion-item.active .accordion-content {
    padding: 16px 20px;
    max-height: 200px;
}

.accordion-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    font-family: 'Raleway', sans-serif;
}

/* Messages */
#messages {
    flex: 1;
    padding: 16px;
    min-height: 100px;
    overflow-y: auto;
    font-family: 'Raleway', sans-serif;
    
    /* Hide scrollbar while keeping functionality */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
#messages::-webkit-scrollbar {
    display: none;
}

.message {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 10px;
    animation: messageAppear 0.3s ease;
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
    width: fit-content;
    max-width: 85%;
    font-family: 'Raleway', sans-serif;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user {
    font-size: 14px;
    background: var(--gradient-button);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 2px;
    font-family: 'Raleway', sans-serif;
}

.bot {
    font-size: 14px;
    background: linear-gradient(to right, #f8f8f8, #f2f2f2);
    border: 1px solid var(--border-color);
    margin-right: auto;
    border-bottom-left-radius: 2px;
    color: var(--text-primary);
    font-family: 'Raleway', sans-serif;
}

/* Image Container Styles */
.image-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.image-container:hover {
    transform: scale(1.02);
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* Typing Indicator Styles */
.typing-indicator {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 10px;
    width: fit-content;
    max-width: 85%;
    background: linear-gradient(to right, #f8f8f8, #f2f2f2);
    border: 1px solid var(--border-color);
    margin-right: auto;
    border-bottom-left-radius: 2px;
    animation: messageAppear 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Raleway', sans-serif;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #888;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0ms;
}

.typing-dots span:nth-child(2) {
    animation-delay: 200ms;
}

.typing-dots span:nth-child(3) {
    animation-delay: 400ms;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.typing-text {
    font-size: 13px;
    color: #666;
    font-style: italic;
    font-family: 'Raleway', sans-serif;
}

/* Contact Section Styles */
#contact-section {
    padding: 24px 16px;
    font-family: 'Raleway', sans-serif;
}

#contact-section h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
}

#contact-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
    font-family: 'Raleway', sans-serif;
}

/* Contact Form */
.email-form {
    width: 100%;
    border-radius: 10px;
    font-family: 'Raleway', sans-serif;
}

.email-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: var(--transition-default);
    background: white;
    font-family: 'Raleway', sans-serif;
}

.email-form input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.email-form button {
    width: 100%;
    padding: 12px;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-default);
    font-size: 14px;
    margin-top: 4px;
    font-family: 'Raleway', sans-serif;
}

.email-form button:hover {
    background: linear-gradient(to right, #222, #444);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.email-form.hide {
    opacity: 0;
    transform: translateY(10px);
}

.email-success {
    background: #41b658;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    display: none;
    text-align: center;
    font-family: 'Raleway', sans-serif;
}

/* Chat Input */
#chat-input-section {
    padding: 14px 16px;
    background: linear-gradient(to bottom, #f8f8f8, #f5f5f5);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    font-family: 'Raleway', sans-serif;
}

#input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition-default);
    background: white;
    font-family: 'Raleway', sans-serif;
}

#userInput:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

#uploadButton {
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Raleway', sans-serif;
}

#uploadButton i {
    color: #555;
    font-size: 16px;
}

#uploadButton:hover {
    background: #f5f5f5;
    border-color: #555;
}

#file-preview {
    margin-bottom: 10px;
    padding: 10px;
    background: var(--surface-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    font-size: 14px;
    color: var(--text-primary);
    display: none;
    border: 1px solid var(--border-color);
    font-family: 'Raleway', sans-serif;
}

.file-preview-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    max-width: 100%;
    overflow: hidden;
    width: 100%;
    font-family: 'Raleway', sans-serif;
}

.file-preview-container span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    font-family: 'Raleway', sans-serif;
}

.file-preview-container button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-container button:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

#sendButton {
    background: var(--gradient-button);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Raleway', sans-serif;
}

#sendButton:hover {
    background: linear-gradient(to right, #222, #444);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Chat Icon */
#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--gradient-dark);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

#chat-icon:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

#chat-icon .chat-icon-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

#chat-icon .icon-chat,
#chat-icon .icon-close {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

#chat-icon .icon-close {
    transform: rotate(180deg) scale(0);
    opacity: 0;
}

#chat-icon.open .icon-chat {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
}

#chat-icon.open .icon-close {
    transform: rotate(0) scale(1);
    opacity: 1;
}

/* Footer Tabs */
#footer-tabs {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    font-family: 'Raleway', sans-serif;
}

.footer-tab {
    cursor: pointer;
    transition: var(--transition-default);
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    width: 70px;
    font-family: 'Raleway', sans-serif;
}

.footer-tab:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #555;
}

.footer-tab.active {
    color: #000;
}

.footer-tab i {
    font-size: 22px;
    margin-bottom: 4px;
}

.footer-tab span {
    font-size: 11px;
    font-weight: 500;
    font-family: 'Raleway', sans-serif;
}

/* Image Popup */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.image-popup button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-default);
    font-family: 'Raleway', sans-serif;
}

.image-popup button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Document Preview */
.doc-preview {
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-radius: 8px;
    padding: 12px;
    max-width: 240px;
    width: 100%;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    font-family: 'Raleway', sans-serif;
}

/* Loading Indicator Styles */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    z-index: 10;
    font-family: 'Raleway', sans-serif;
}

.loading-indicator p {
    margin-top: 24px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: 'Raleway', sans-serif;
}

.spinner {
    position: relative;
    width: 40px;
    height: 40px;
}

.spinner:before, .spinner:after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #000;
}

.spinner:before {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-width: 2px;
    animation: spin 1s linear infinite;
}

.spinner:after {
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-width: 2px;
    animation: spin 1.5s linear reverse infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* When content is loaded */
#scrollable-content.loaded {
    visibility: visible;
    animation: fadeIn 0.4s ease-in-out;
}

/* Branding */
#branding {
    padding: 8px;
    font-weight: 600;
    text-align: center;
    color: #888;
    font-size: 10px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    letter-spacing: 0.5px;
    font-family: 'Raleway', sans-serif;
}

/* Mobile-specific adjustments applied via JavaScript */
body.mobile-detected .feature-cards {
    gap: 12px !important;
}

body.mobile-detected .feature-card {
    width: calc(50% - 12px) !important;
    min-width: 120px !important;
}

body.mobile-detected .quick-button {
    font-size: 12px !important;
    padding: 8px 12px !important;
}

body.mobile-detected .message {
    max-width: 90% !important;
    font-size: 14px !important;
}

body.mobile-detected #chat-input-section {
    padding: 12px 16px !important;
}

body.mobile-detected #userInput {
    padding: 10px 14px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
}

body.mobile-detected .accordion-header {
    padding: 14px 16px !important;
}

body.mobile-detected .accordion-header span {
    font-size: 14px !important;
}

body.mobile-detected .accordion-item.active .accordion-content {
    padding: 14px 16px !important;
}

body.mobile-detected #dynamic-greeting {
    font-size: 1rem !important;
}

/* Very small screens - applied via JavaScript for phones in portrait */
body.mobile-detected.very-small .feature-card {
    width: 100% !important;
    margin-bottom: 8px !important;
}

body.mobile-detected.very-small .home-nav-tab i {
    font-size: 20px !important;
}

body.mobile-detected.very-small .home-nav-tab span {
    font-size: 11px !important;
}

/* Landscape mode adjustments for mobile - applied via JavaScript */
body.mobile-detected.landscape #chat-header-container {
    height: 80px !important;
    padding: 10px 20px !important;
}

body.mobile-detected.landscape #chat-container.messaging #chat-header-container {
    height: 45px !important;
    padding: 8px 20px !important;
}

body.mobile-detected.landscape #dynamic-greeting {
    font-size: 1rem !important;
}