.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.serif-heading {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
}

body {
    font-family: 'Outfit', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cinzel', serif;
}

.font-body {
    font-family: 'Cormorant Garamond', serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #1c1917;
}

::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b5952f;
}

/* Header Scroll Effect */
header {
    transition: transform 0.3s ease-in-out;
}

.header-hidden {
    transform: translateY(-100%);
}

/* Scroll To Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Chat Widget Styles */
#chat-widget-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 50;
    font-family: 'Outfit', sans-serif;
}

#chat-window {
    position: absolute;
    bottom: 5rem;
    left: 0;
    width: 350px;
    max-height: 700px;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark #chat-window {
    background: #1c1917;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#chat-window.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    max-width: 85%;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.chat-bubble-bot {
    background: #f5f3f0;
    color: #181511;
    border-top-left-radius: 0.25rem;
}

.dark .chat-bubble-bot {
    background: #32281e;
    color: white;
}

.chat-bubble-user {
    background: #d4af37;
    color: white;
    margin-left: auto;
    border-top-right-radius: 0.25rem;
}

.chat-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e6e1db;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #181511;
}

.dark .chat-option {
    background: #1c1917;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.chat-option:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.chat-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e6e1db;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    background: #f9f8f6;
}

.dark .chat-form-input {
    background: #2a221a;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Hide scrollbar for chat messages but keep functional */
#chat-messages::-webkit-scrollbar {
    width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    #chat-window {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        /* Fallback for browsers not supporting dvh */
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        transform: translateY(100%);
        z-index: 9999;
        /* Ensure it's on top of everything including mobile menus */
        display: flex;
        flex-direction: column;
    }

    #chat-window.show {
        transform: translateY(0);
    }

    /* specific fix for form container on mobile to fill screen */
    #chat-form-container {
        flex: 1;
        max-height: none !important;
        overflow-y: auto;
    }

    /* Ensure messages also take full height and scroll */
    #chat-messages {
        flex: 1;
        height: auto;
        min-height: 0;
        /* Important for flex scrolling */
    }
}