/* ==========================================================================
   Ma Yve Grill — Kinshasa Refresh v1 (global chrome)
   Scope: header logo, ember separator, footer redesign, checkout layout fix,
   cart badge, back-to-top dedup. Companion to the Homepage v2 template.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FRONT PAGE: kill the 120px white spacer (hero sits under fixed header)
   -------------------------------------------------------------------------- */
.mg-is-front .mg-header-spacer {
    display: none !important;
}

/* --------------------------------------------------------------------------
   2. EMBER SEPARATOR: animated gold line under the header (all pages)
   -------------------------------------------------------------------------- */
.mg-header {
    border-bottom: none !important;
}

.mg-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 1001;
    background: linear-gradient(90deg, #C04000 0%, #FFB347 25%, #FFF3D6 50%, #FFB347 75%, #C04000 100%);
    background-size: 300% 100%;
    animation: mgEmberFlow 7s linear infinite;
    box-shadow: 0 1px 10px rgba(255, 179, 71, 0.35), 0 0 4px rgba(192, 64, 0, 0.5);
    opacity: 0.95;
    pointer-events: none;
}

@keyframes mgEmberFlow {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

/* --------------------------------------------------------------------------
   3. HEADER LOGO: real horizontal wordmark (white on dark)
   -------------------------------------------------------------------------- */
.mg-nav__logo {
    display: block;
    width: 172px;
    height: 44px;
    background: url("https://mayvegrill.space/wp-content/uploads/2026/07/logo-mayve-horizontal.png") left center / contain no-repeat;
}

.mg-nav__logo-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* White wordmark turns charcoal when the header goes cream on scroll */
.mg-header.is-scrolled .mg-nav__logo {
    filter: brightness(0.18);
}

@media (max-width: 768px) {
    .mg-nav__logo {
        width: 136px;
        height: 36px;
    }
}

/* --------------------------------------------------------------------------
   4. INNER PAGES: keep the un-scrolled nav dark so logo + links stay readable
   -------------------------------------------------------------------------- */
body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav {
    background: rgba(26, 26, 26, 0.97);
}

body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__link,
body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__cart {
    color: rgba(255, 255, 255, 0.85);
}

body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__link:hover,
body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__link.is-active {
    color: #FFFFFF;
}

body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__logo {
    filter: none;
}

/* --------------------------------------------------------------------------
   5. CART BADGE: hide the red "0" when the cart is empty
   -------------------------------------------------------------------------- */
.mg-cart__count[aria-label="0 items"] {
    display: none;
}

/* --------------------------------------------------------------------------
   6. BACK-TO-TOP: PFCA terracotta pill — arrow + TOP text, impossible to miss
      (element is Astra's #ast-scroll-top; visibility stays Astra-controlled)
   -------------------------------------------------------------------------- */
#ast-scroll-top {
    width: 62px !important;
    height: 62px !important;
    padding: 8px 0 7px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #D4622A 0%, #9A3300 100%) !important;
    border: 2px solid rgba(255,179,71,0.7) !important;
    box-shadow: 0 10px 28px rgba(154,51,0,0.5), 0 2px 8px rgba(0,0,0,0.25);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

#ast-scroll-top .ast-icon.icon-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

#ast-scroll-top .ast-icon svg,
#ast-scroll-top .ast-arrow-svg {
    width: 22px !important;
    height: 22px !important;
    fill: #FFF3D6 !important;
    stroke: #FFF3D6;
}

/* the word under the arrow — nobody has to guess what this button does */
#ast-scroll-top::after {
    content: 'TOP';
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    color: #FFE9B8;
    line-height: 1;
}

#ast-scroll-top:hover,
#ast-scroll-top:focus {
    transform: translateY(-5px);
    border-color: rgba(255,243,214,0.95) !important;
    box-shadow: 0 16px 38px rgba(154,51,0,0.6), 0 0 24px rgba(255,179,71,0.55);
    outline: none;
}

/* --------------------------------------------------------------------------
   7. CHECKOUT / CART LAYOUT: boxed container, stop the left-edge clipping
   -------------------------------------------------------------------------- */
html, body {
    overflow-x: clip;
}

.mg-wc-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    box-sizing: border-box;
}

.woocommerce form.checkout,
.woocommerce .col2-set,
.woocommerce-checkout-review-order-table {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    transform: none !important;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   8. FOOTER REDESIGN: brand column + real logos + polish
   -------------------------------------------------------------------------- */
.mg-footer__grid {
    grid-template-columns: 190px 1.7fr 1fr 1fr 1.4fr;
    align-items: start;
    gap: var(--mg-space-lg);
}

/* Big brand mark on the left */
.mg-footer__grid::before {
    content: '';
    display: block;
    width: 100%;
    max-width: 190px;
    aspect-ratio: 624 / 493;
    background: url("https://mayvegrill.space/wp-content/uploads/2026/07/logo-mayve-mark.png") center / contain no-repeat;
    filter: drop-shadow(0 8px 26px rgba(212, 165, 58, 0.28));
    align-self: center;
}

/* About column title becomes the horizontal wordmark */
.mg-footer__col:first-child > .mg-footer__title {
    width: 158px;
    height: 40px;
    background: url("https://mayvegrill.space/wp-content/uploads/2026/07/logo-mayve-horizontal.png") left center / contain no-repeat;
    font-size: 0;
}

/* Gold accent under the other column titles */
.mg-footer__col:not(:first-child) > .mg-footer__title {
    position: relative;
    padding-bottom: 10px;
}

.mg-footer__col:not(:first-child) > .mg-footer__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mg-terracotta), var(--mg-gold-light));
}

/* Social icons: warmer hover */
.mg-footer__social a:hover {
    background: var(--mg-terracotta);
    color: #FFE9B8;
    transform: translateY(-2px);
}

/* Newsletter: separation + branded input */
.mg-footer__newsletter {
    border-top: 1px solid rgba(212, 165, 58, 0.25);
    padding-top: var(--mg-space-lg);
}

.mg-footer__newsletter-input:focus {
    outline: 2px solid var(--mg-gold-light);
    outline-offset: 1px;
}

@media (max-width: 1024px) {
    .mg-footer__grid {
        grid-template-columns: 150px 1.5fr 1fr 1.2fr;
    }
}

@media (max-width: 860px) {
    .mg-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .mg-footer__grid::before {
        grid-column: 1 / -1;
        margin: 0 auto var(--mg-space-md);
        max-width: 140px;
    }
}

@media (max-width: 540px) {
    .mg-footer__grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   9. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .mg-header::after {
        animation: none;
        background-position: 50% 0;
    }
}

/* --------------------------------------------------------------------------
   10. MARIE VOICE UI: header speaker toggle + input mic, "M" monogram avatars
   -------------------------------------------------------------------------- */
.chat-avatar,
.msg-avatar {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* speaker toggle — lives in the chat header next to EN/FR */
.chat-voice-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: rgba(255,251,247,0.08);
    border: 1px solid rgba(255,179,71,0.35);
    border-radius: 50%;
    color: #FFE9B8;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.chat-voice-toggle:hover {
    background: rgba(255,179,71,0.18);
    border-color: rgba(255,179,71,0.7);
}

.chat-voice-toggle.is-off {
    opacity: 0.55;
}

/* mic — lives inside the input row before send */
.chat-mic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 1.5px solid rgba(192,64,0,0.45);
    border-radius: 50%;
    color: #C04000;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.chat-mic:hover {
    background: rgba(192,64,0,0.08);
    border-color: #C04000;
}

.chat-mic.is-recording {
    background: #C04000;
    border-color: #C04000;
    color: #FFF3D6;
    animation: mgMicPulse 1.2s ease-out infinite;
}

.chat-mic.is-denied {
    border-color: #B00020;
    color: #B00020;
}

@keyframes mgMicPulse {
    0%   { box-shadow: 0 0 0 0 rgba(192,64,0,0.5); }
    70%  { box-shadow: 0 0 0 9px rgba(192,64,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(192,64,0,0); }
}

@media (prefers-reduced-motion: reduce) {
    .chat-mic.is-recording {
        animation: none;
    }
}

/* --------------------------------------------------------------------------
   11. CHAT CLARITY: labeled Send pill + mic hint bubble (for first-timers)
   -------------------------------------------------------------------------- */
/* send becomes a readable pill: plane icon + the word, in both languages */
.chat-send {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
}

.chat-send::after {
    content: 'Send';
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

html[lang="fr"] .chat-send::after {
    content: 'Envoyer';
}

/* one-time mic pointer for first-time visitors */
.chat-input-wrap {
    position: relative;
}

.chat-mic-hint {
    position: absolute;
    right: 46px;
    bottom: calc(100% + 10px);
    z-index: 5;
    padding: 8px 13px;
    background: #2C1B12;
    border: 1px solid rgba(255,179,71,0.6);
    border-radius: 12px;
    color: #FFE9B8;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 26px rgba(0,0,0,0.35);
    animation: mgMicHintFloat 1.6s ease-in-out infinite;
    pointer-events: none;
}

.chat-mic-hint::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 18px;
    border: 6px solid transparent;
    border-top-color: #2C1B12;
}

@keyframes mgMicHintFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    .chat-mic-hint {
        animation: none;
    }
}
