/* ==========================================================================
   MECC RESTAURANT LANDING PAGE STYLESHEET
   Typography: Montreaux font with Swiss neo-grotesque fallbacks
   Colors: MECC Brand Green #355F4C, Pure White #ffffff, 90% Black Bar
   ========================================================================== */

/* Montreaux Font Declarations & Local Fallbacks */
@font-face {
    font-family: 'Montreaux';
    src: local('Montreaux'), local('Montreaux-Regular'), local('Montreux'), local('Montreux-Regular');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montreaux';
    src: local('Montreaux Bold'), local('Montreaux-Bold'), local('Montreux Bold'), local('Montreux-Bold');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-green: #355F4C;
    --brand-green-hover: #2a4c3c;
    --brand-green-glow: rgba(53, 95, 76, 0.4);
    --subnav-bg: rgba(0, 0, 0, 0.90);
    --text-dark: #111827;
    --text-muted: #64748b;
    --font-stack: 'Montreaux', 'Montreux', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-stack);
    background-color: #ffffff;
    color: #111827;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   BRAND GREEN LOADING SCREEN OVERLAY
   ========================================================================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--brand-green);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
    opacity: 1;
    visibility: visible;
}

#loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.loader-logo-wrapper {
    position: relative;
    max-width: 280px;
    padding: 10px;
    animation: loaderPulse 2s ease-in-out infinite alternate;
}

.loader-logo-wrapper img {
    width: 100%;
    max-height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.loader-spinner {
    font-size: 32px;
    color: #ffffff;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.loader-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0% { transform: scale(0.98); opacity: 0.9; }
    100% { transform: scale(1.02); opacity: 1; }
}

/* ==========================================================================
   APP LAYOUT (DESKTOP SIDE MENU + MAIN CANVAS)
   ========================================================================== */
.landing-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* If live preview bar is active */
.preview-topbar + .mobile-top-bar + .landing-layout,
.preview-topbar ~ .landing-layout {
    height: calc(100vh - 38px);
}

/* ==========================================================================
   MOBILE TOP BAR (Visible <= 991px)
   ========================================================================== */
.mobile-top-bar {
    display: none;
    height: 64px;
    background-color: #ffffff;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    position: relative;
    flex-shrink: 0;
}

.mobile-logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-logo-site {
    max-height: 38px;
    max-width: 120px;
    object-fit: contain;
}

.mobile-logo-divider {
    width: 1px;
    height: 26px;
    background-color: #cbd5e1;
}

.mobile-logo-rest {
    max-height: 42px;
    max-width: 130px;
    object-fit: contain;
}

.mobile-menu-toggle {
    background: #111827;
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: var(--brand-green);
}

.side-nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1500;
}

.side-nav-backdrop.active {
    display: block;
}


/* ==========================================================================
   DESKTOP SIDEBAR NAVIGATION (280px width, 100vh height)
   ========================================================================== */
.side-nav {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 500;
    flex-shrink: 0;
}

/* Logo Box 1: Site / Estate Logo on Pure White */
.side-brand-card {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 20px;
    border-bottom: 1px solid #f1f5f9;
    min-height: 115px;
}

.side-estate-logo {
    max-height: 90px;
    max-width: 230px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Logo Box 2: Restaurant Logo on Pure White */
.side-brand-card.side-restaurant-card {
    padding: 20px 20px;
    border-bottom: 1px solid #e2e8f0;
    min-height: 135px;
}

.side-restaurant-logo {
    max-height: 110px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 90% Black Navigation Container */
.side-nav-dark {
    background-color: var(--subnav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 18px 22px 18px;
    overflow-y: auto;
}

/* Vertical Menu List */
.side-menu-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.side-nav-btn {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-family: var(--font-stack);
    font-size: 14.5px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.side-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
}

/* Active Menu Button (Pure White background, Black Bold Text) */
.side-nav-btn.active:not(.special-btn) {
    background-color: #ffffff !important;
    color: #111827 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    transform: translateX(0) !important;
}

/* Specials Button (MECC Brand Green #355F4C background, White text) */
.side-nav-btn.special-btn {
    background-color: var(--brand-green);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 10px var(--brand-green-glow);
    margin-top: 4px;
}

.side-nav-btn.special-btn:hover {
    background-color: var(--brand-green-hover);
    color: #ffffff;
}

.side-nav-btn.special-btn.active {
    box-shadow: 0 0 0 2px #ffffff, 0 4px 14px var(--brand-green-glow);
}

/* Specials Dropdown / Submenu inside Sidebar */
.side-dropdown-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.dropdown-caret {
    font-size: 13px;
    transition: transform 0.22s ease;
}

.side-dropdown-wrapper.open .dropdown-caret {
    transform: rotate(180deg);
}

.side-dropdown-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 4px 12px;
}

.side-dropdown-wrapper.open .side-dropdown-menu {
    display: flex;
}

.dropdown-item-btn {
    width: 100%;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #e2e8f0;
    font-family: var(--font-stack);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.16s ease;
}

.dropdown-item-btn:hover {
    background: rgba(53, 95, 76, 0.4);
    color: #ffffff;
    transform: translateX(3px);
}

.dropdown-item-btn.active {
    background: var(--brand-green);
    color: #ffffff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Sidebar Footer (Quote matching user reference mockup) */
.side-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-quote {
    font-family: 'Alex Brush', cursive;
    font-size: 34px;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin-bottom: 12px;
}

.side-tagline {
    font-family: var(--font-stack);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.2px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    line-height: 1.45;
}

/* ==========================================================================
   MAIN CANVAS (REMAINING VIEWPORT AREA)
   ========================================================================== */
.main-canvas {
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Ambient dark vignette */
.main-canvas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.04) 40%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
}

.canvas-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
}

/* Flipbook Container */
.flipbook-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.flipbook-container {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.flipbook-container.menu-transitioning {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
}

/* ==========================================================================
   MODAL DIALOG (Preview Actions & Confirmations)
   ========================================================================== */
.landing-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 18, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing-modal-card {
    background: #ffffff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.landing-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.landing-modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.landing-modal-icon-badge.success {
    background-color: rgba(53, 95, 76, 0.12);
    color: var(--brand-green);
}

.landing-modal-icon-badge.error {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.landing-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.landing-modal-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.45;
}

.landing-modal-body {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #334155;
    margin-bottom: 20px;
    line-height: 1.5;
}

.landing-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.landing-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.16s ease;
    font-family: var(--font-stack);
}

.landing-modal-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}

.landing-modal-btn.secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.landing-modal-btn.primary {
    background: var(--brand-green);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--brand-green-glow);
}

.landing-modal-btn.primary:hover {
    background: var(--brand-green-hover);
}

/* ==========================================================================
   RESPONSIVE LAYOUT (<= 991px Tablet & Mobile)
   ========================================================================== */
@media (max-width: 991px) {
    .mobile-top-bar {
        display: flex;
    }

    .landing-layout {
        flex-direction: column;
        height: calc(100vh - 64px);
    }

    .preview-topbar + .mobile-top-bar + .landing-layout,
    .preview-topbar ~ .landing-layout {
        height: calc(100vh - 64px - 38px);
    }

    .side-nav {
        position: fixed;
        top: 64px;
        left: -320px;
        width: 300px;
        max-width: 85vw;
        height: calc(100vh - 64px);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.45);
        z-index: 2000;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .preview-topbar ~ .side-nav {
        top: 102px;
        height: calc(100vh - 102px);
    }

    .side-nav.open {
        left: 0;
    }

    .side-brand-card {
        display: none; /* Already rendered in mobile top bar */
    }

    .main-canvas {
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: flex-start;
    }

    .canvas-inner {
        padding: 6px 8px 75px 8px;
        align-items: flex-start;
        height: auto;
        min-height: 100%;
    }

    .flipbook-section {
        justify-content: flex-start;
        align-items: center;
        height: auto;
    }

    .flipbook-container {
        align-items: flex-start;
        height: auto;
    }

    .flipbook-wrapper {
        align-items: flex-start !important;
        justify-content: center;
        padding-top: 4px;
        height: auto;
    }

    .book-viewport {
        margin-top: 0;
    }

    .side-quote {
        font-size: 28px;
    }
}

