/* Font Face Declarations */
@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../font/NeueMontreal-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --accent: #C89128;
    --accent-soft: #b8941f;
    --surface: #ffffff;
    --surface-muted: #f7f9fc;
    --border: #eef1f6;
    --text: #1a202c;
    --muted: #6b7280;
    --radius: 12px;
    --shadow: 0 15px 30px rgba(200, 145, 40, 0.1), 0 5px 10px rgba(200, 145, 40, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* Apply the font to your elements */
body, html {
    font-family: 'Neue Montreal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

.mockup-wrapper {
    width: 100%;
    padding: 0;
    margin: 0;
}

.landing-mockup {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    color: white;
    font-size: 24px;
    z-index: 1000;
}

.chat-bubble:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

.chat-bubble:active {
    transform: scale(0.98);
}

.chat-bubble:focus-visible {
    outline: 3px solid rgba(200, 145, 40, 0.35);
    outline-offset: 3px;
}

.chat-bubble.open {
    display: none;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 10;
}

.notification-badge.hidden {
    display: none;
}

.welcome-tooltip {
    position: absolute;
    bottom: 76px;
    right: 0;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(200, 145, 40, 0.18);
    font-size: 14px;
    line-height: 1.4;
    color: #1f2a44;
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    z-index: 10;
}

.welcome-tooltip::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 2px 2px 8px rgba(200, 145, 40, 0.08);
}

.welcome-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Overlay with blur */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(200, 145, 40, 0.3);
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 997;
}

.chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 420px;
    max-height: 85vh;
    height: 680px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: none;
    transform: translateY(15px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    transform-origin: bottom right;
    z-index: 999;
}

.chatbot-container.admin-mode {
    width: 700px;
    height: 700px;
}

.chatbot-container.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 20px 12px;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.venue-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #C89128 0%, #b8941f 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.header-info {
    flex: 1;
    min-width: 0;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #86868b;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #30d158;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.close-button {
    width: 28px;
    height: 28px;
    border: none;
    background: #f2f2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #86868b;
    font-size: 16px;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

.header-buttons {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.admin-button {
    width: 28px;
    height: 28px;
    border: none;
    background: #f2f2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #86868b;
    font-size: 14px;
    transition: all 0.2s ease;
}

.admin-button:hover {
    background: #e8e8ed;
    color: #C89128;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.admin-panel-content {
    max-width: 800px;
    max-height: 80vh;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f2f2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #86868b;
    font-size: 16px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

/* Admin Login Form */
.admin-login-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e5ea;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #C89128;
    box-shadow: 0 0 0 3px rgba(200, 145, 40, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e5ea;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background-color: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #C89128;
    box-shadow: 0 0 0 3px rgba(200, 145, 40, 0.1);
}

#newCategoryInput {
    margin-top: 8px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: #C89128;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #b8941f;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f2f2f7;
    color: #1d1d1f;
}

.btn-secondary:hover {
    background: #e8e8ed;
}

.btn-success {
    background: #30d158;
    color: white;
}

.btn-success:hover {
    background: #28c149;
}

.btn-danger {
    background: #ff3b30;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger:hover {
    background: #e6342a;
}

/* Admin Panel */
.admin-panel-body {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    flex: 1;
}

.admin-panel-view .admin-panel-body {
    max-height: none;
}

.admin-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-save-info {
    font-size: 12px;
    color: #86868b;
    margin-left: auto;
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qa-category-group {
    border: 1.5px solid #e5e5ea;
    border-radius: 12px;
    overflow: hidden;
}

.qa-category-group.deleted-section {
    border-color: #ffc107;
    background: #fff9e6;
}

.qa-category-group.deleted-section .qa-category-header {
    background: #fff3cd;
    color: #856404;
}

.qa-category-group.deleted-section .qa-category-header:hover {
    background: #ffe69c;
}

.qa-category-header {
    background: #f2f2f7;
    padding: 12px 16px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.qa-category-header:hover {
    background: #e8e8ed;
}

.qa-category-toggle {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.qa-category-group.collapsed .qa-category-toggle {
    transform: rotate(-90deg);
}

.qa-category-items {
    background: white;
    max-height: 1000px;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.qa-category-group.collapsed .qa-category-items {
    max-height: 0;
}

.qa-item {
    padding: 24px;
    border-top: 1px solid #e5e5ea;
    transition: background 0.2s ease;
}

.qa-item.inactive {
    opacity: 0.5;
    background: #f9f9fb;
}

.qa-item:hover {
    background: #f9f9fb;
}

.qa-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.qa-question {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 14px;
    flex: 1;
    line-height: 1.5;
}

.qa-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.qa-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.qa-btn-edit {
    opacity: 0.7;
}

.qa-btn-edit:hover {
    opacity: 1;
    transform: scale(1.1);
}

.qa-btn-delete {
    opacity: 0.7;
}

.qa-btn-delete:hover {
    opacity: 1;
    transform: scale(1.1);
}

.qa-status-badge {
    display: none;
}

.qa-answer {
    font-size: 13px;
    color: #6e6e73;
    line-height: 1.5;
    word-break: break-word;
}

.qa-form {
    padding: 32px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    flex: 1;
    width: auto;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1d1d1f;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.toast.success {
    background: #30d158;
}

.toast.error {
    background: #ff3b30;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
}

.chat-messages::-webkit-scrollbar {
    display: none;
}

.message {
    margin-bottom: 16px;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message.user {
    display: flex;
    justify-content: flex-end;
    margin-left: 40px;
}

.bot-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #C89128 0%, #b8941f 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.message-content {
    background: #f2f2f7;
    padding: 12px 14px;
    word-break: break-word;
    border-radius: 16px;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.4;
    color: #1d1d1f;
    word-wrap: break-word;
    position: relative;
}

.message.user .message-content {
    background: #C89128;
    color: white;
    border-bottom-right-radius: 6px;
}

.message.bot .message-content {
    border-bottom-left-radius: 6px;
}

.quick-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.quick-reply {
    background: #ffffff;
    border: 1.5px solid #e5e5ea;
    color: #1d1d1f;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.quick-reply:hover {
    background: #f9f9fb;
    border-color: #C89128;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-indicator {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    order: 999; /* Ensures it appears last in flex containers */
}

.typing-content {
    background: #f2f2f7;
    padding: 12px 14px;
    border-radius: 16px;
    border-bottom-left-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #86868b;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    30% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-area {
    padding: 12px 16px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #f2f2f7;
    border-radius: 18px;
    padding: 6px;
    min-height: 36px;
    transition: all 0.2s ease;
}

.input-container:focus-within {
    background: #e8e8ed;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 6px 10px;
    background: transparent;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    min-height: 24px;
    font-family: inherit;
    line-height: 1.4;
    color: #1d1d1f;
}

.chat-input::placeholder {
    color: #86868b;
}

.send-button {
    width: 32px;
    height: 32px;
    background: #C89128;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #C89128;
    transform: scale(1.05);
}

.send-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none;
}

/* Admin Panel Inside Chat */
.admin-panel-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-panel-view.hidden {
    display: none;
}

.admin-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.admin-panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chat-footer {
    text-align: center;
    padding: 8px 15px;
    color: #6c757d;
    font-size: 11px;
    margin-top: px;
    border-radius: 0 0 15px 15px; /* Match the chat container's border radius */
}

.chat-footer p {
    margin: 0;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@media (max-width: 480px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }

    .chatbot-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translateY(100%);
        transform-origin: bottom;
    }

    .chatbot-container.open {
        transform: translateY(0);
    }

    .chat-messages {
        padding: 16px;
    }

    .message.user {
        margin-left: 32px;
    }

    .welcome-tooltip {
        bottom: 75px;
        right: -10px;
        max-width: 400px;
    }
}

@media (max-width: 400px) {
    .chat-bubble {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-bubble,
    .chatbot-container,
    .message,
    .quick-reply,
    .send-button,
    .welcome-tooltip {
        animation: none;
        transition: none;
    }
    
    .status-dot,
    .typing-dot,
    .notification-badge {
        animation: none;
    }
}