/* ============================================
   Bottom Navigation - Curved SVG Background
   ============================================ */

.bottom-nav-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
    /* Total height: SVG curve top + nav bar */
    height: calc(var(--nav-height) + 2px);
}

.bottom-nav-wrap > * {
    pointer-events: auto;
}

/* ---- SVG Curved Shape ---- */
.bottom-nav__shape {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 0;
    line-height: 0;
}

.bottom-nav__shape svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 -2px 12px rgba(0, 0, 0, 0.24));
}

/* ---- Center Menu Button ----
   Lives as a body-level sibling of .bottom-nav-wrap (see bottom_nav.php)
   so its z-index participates in the body's stacking context. That lets
   the button float ABOVE sticky overlays like the takeaway Sepete Ekle
   CTA without us having to fight the nav-wrap's own stacking. Position
   is `fixed` (not `absolute` like before, when it was nested in the
   wrap) — bottom:18px reproduces the prior visual offset. */
.bottom-nav__menu-btn {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 110;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.bottom-nav__menu-btn:active {
    transform: translateX(-50%) scale(0.93);
}

@media (hover: hover) {
    .bottom-nav__menu-icon:hover {
        box-shadow:
            0 6px 28px rgba(0, 0, 0, 0.18),
            0 4px 20px color-mix(in srgb, var(--color-primary) 40%, transparent);
    }
}

.bottom-nav__menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: linear-gradient(var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-bg);

    width: 50px;
    height: 50px;
    box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.12),
            0 2px 12px color-mix(in srgb, var(--color-primary) 30%, transparent);
    transition: all var(--transition-base);
}

.bottom-nav__menu-icon svg {
    width: 24px;
    height: 24px;
}

.bottom-nav__menu-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1;
    font-family: var(--font-primary);
    /* Inherit the footer text color so a dark footer (default for
       the dark theme) gives a light label and a light footer (light
       theme or operator override) gives a dark label. The previous
       hardcoded #000 made the label vanish on dark footers. */
    color: var(--color-footer-text, #000);
}

/* ---- Nav Bar (inside the shape) ---- */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    padding-bottom: var(--safe-bottom);
    height: var(--nav-height);
    max-width: 1180px;
    margin: auto;
}

.bottom-nav__left,
.bottom-nav__right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.bottom-nav__right {
    justify-content: flex-end;
}

/* Center spacer to keep left/right balanced */
.bottom-nav__center-spacer {
    width: 72px;
    flex-shrink: 0;
}

/* ---- Icon Buttons ---- */
.bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--color-footer-text, rgba(255, 255, 255, 0.7));
    opacity: 0.7;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.bottom-nav__icon svg {
    width: 20px;
    height: 20px;
}
/* Survey icon - soft RGB glow animation */
.survey-icon {
    animation: surveyGlow 6s ease-in-out infinite;
    opacity: 1 !important;
}

.survey-icon svg {
    width: 24px;
    height: 24px;
}

@keyframes surveyGlow {
    0%, 100% { color: #9e702e; }
    25%      { color: #d8c7a8; }
    50%      { color: #7e4a4a; }
    75%      { color: #656565; }
}

.bottom-nav__icon:active {
    opacity: 1;
    transform: scale(0.9);
}

@media (hover: hover) {
    .bottom-nav__icon:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ---- Language Button ---- */
.bottom-nav__lang {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-lg);
    color: var(--color-footer-text, var(--color-text));
    transition: all var(--transition-fast);
    height: 36px;
}

.bottom-nav__lang:active {
    transform: scale(0.94);
}

@media (hover: hover) {
    .bottom-nav__lang:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

.bottom-nav__flag {
    /* Bayrak bir emoji: kutu, emojiyi FLEX ile ortalar → glyph merkezi kutu
       merkezine oturur ve yanındaki chevron ile tam hizalanır. Eski 28px font
       / 18px kutu uyumsuzluğu emojiyi kutudan taşırıp chevron'a göre ~yarım
       satır aşağı kaydırıyordu. Kardeş ikonlarla (20px) dengeli olması için
       boyut hafif küçültüldü. */
    font-size: 23px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 23px;
}

.bottom-nav__lang-arrow {
    /* Dropdown chevron — daha büyük + net (eski 10px/0.5 çok küçük ve soluktu).
       flex-shrink:0 squish'i, display:block inline-baseline boşluğunu önler. */
    width: 13px;
    height: 13px;
    opacity: 0.6;
    flex-shrink: 0;
    display: block;
}

/* ============================================
   Info Button — Pulse Attractor
   ============================================
   Subtle "look at me" cue on the info button. Auto-stops after first
   open (localStorage flag). Brand-colored, dual-ring, premium feel.
*/
.bottom-nav__info {
    position: relative;
    overflow: visible;
}

.bottom-nav__info .info-pulse,
.bottom-nav__info .info-pulse::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    background: var(--color-primary, #c8a97e);
    opacity: 0;
}

.bottom-nav__info .info-pulse {
    animation: yqrInfoPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.bottom-nav__info .info-pulse::before {
    content: '';
    animation: yqrInfoPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: 1.2s;
}

/* Subtle glow under the icon itself */
.bottom-nav__info::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--color-primary, #c8a97e);
    opacity: 0.18;
    animation: yqrInfoGlow 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.bottom-nav__info svg {
    position: relative;
    z-index: 1;
}

/* Stop everything once user has seen it */
.bottom-nav__info.info-seen .info-pulse,
.bottom-nav__info.info-seen .info-pulse::before,
.bottom-nav__info.info-seen::after {
    animation: none;
    display: none;
}

@keyframes yqrInfoPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.55;
    }
    70% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

@keyframes yqrInfoGlow {
    0%, 100% { opacity: 0.10; }
    50%      { opacity: 0.28; }
}

/* Respect reduced-motion preference (accessibility) */
@media (prefers-reduced-motion: reduce) {
    .bottom-nav__info .info-pulse,
    .bottom-nav__info .info-pulse::before,
    .bottom-nav__info::after {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   A · AURA DOCK — geniş "Ara ya da Aura'ya sor" çubuğu + ince nav.
   Yalnız body.footer-dock modunda (şimdilik ?footer=dock önizlemesi; kalıcı
   panel ayarı B fazında). Clearance'ı (--nav-height) burada YÜKSELTİR → tüm
   içerik pad'leri (page-wrap, carousel, takeaway) otomatik uyum sağlar.
   Mevcut kavisli nav'a sıfır dokunuş.
   ═══════════════════════════════════════════════════════════════════════ */
body.footer-dock { --nav-height: 116px; } /* arama çubuğu 58 + gap 6 + slim-nav 44 + alt pad 8 */

body.footer-dock .bottom-nav-wrap--dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex; flex-direction: column; gap: 6px;
    padding: 0 14px calc(8px + var(--safe-bottom));
    max-width: 600px; margin: 0 auto;
    pointer-events: none;
}
body.footer-dock .bottom-nav-wrap--dock > * { pointer-events: auto; }
/* İçeriği alt kroma'nın arkasında yumuşakça soldur (transparan ince nav içerik
   üstünde okunur kalsın) — tam-genişlik gradyan perde, sayfa zeminine iner. */
body.footer-dock .bottom-nav-wrap--dock::before {
    content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100vw; height: calc(100% + 4px); z-index: -1; pointer-events: none;
    /* Sıkı perde: dip solid, geçiş çubuğun civarında biter (yukarı yayılmaz). */
    background: linear-gradient(to top,
        var(--color-footer-bg, #14181c) 62%,
        transparent 100%);
}

/* ── Footer KENDİ kontrast bağlamı (sayfa temasından DEĞİL) ──────────────
   Footer'ın iç elemanları (arama çubuğu + slim-nav) rengini footer ARKA
   PLANINA göre alır. Operatör footer-text'i footer-bg'ye zıt seçer → tüm
   türevler otomatik okunur kalır (koyu footer→beyaz mürekkep, açık footer→
   koyu mürekkep). Böylece "temayla zıt footer rengi" seçilince kontrast
   çökmez. Aksan (MENU/arama): --color-footer-accent (head.php'de marka rengi
   footer'a zıtsa primary, değilse footer-text). */
.bottom-nav-wrap,
.bottom-nav-wrap--dock {
    --footer-ink: var(--color-footer-text, #fff);
    --footer-ink-muted: color-mix(in srgb, var(--color-footer-text, #fff) 60%, transparent);
    --footer-surface: color-mix(in srgb, var(--color-footer-text, #fff) 10%, transparent);
    --footer-surface-strong: color-mix(in srgb, var(--color-footer-text, #fff) 16%, transparent);
    --footer-border: color-mix(in srgb, var(--color-footer-text, #fff) 20%, transparent);
    --footer-accent: var(--color-footer-accent, var(--color-primary));
}

/* ── The dock: search command bar (opens Aura-first surface) ── */
.aura-dock {
    display: flex; align-items: center; gap: 10px;
    width: 100%; height: 58px; padding: 0 8px 0 20px;
    border: 1px solid var(--footer-border); border-radius: 32px;
    cursor: pointer; text-align: left; color: var(--footer-ink);
    /* Footer zeminine oturan hafif "yükseltilmiş" cam yüzey (footer-text türevi
       → koyu/açık footer'da otomatik görünür). */
    background: linear-gradient(180deg, var(--footer-surface-strong), var(--footer-surface));
    -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35);
    box-shadow: 0 16px 36px -16px rgba(0,0,0,.45), 0 2px 10px rgba(0,0,0,.14), inset 0 1px 0 color-mix(in srgb, var(--color-footer-text, #fff) 8%, transparent);
    transition: transform var(--motion-fast, 190ms) var(--ease-spring, ease), border-color var(--transition-fast);
}
.aura-dock:active { transform: scale(0.99); }
@media (hover: hover) { .aura-dock:hover { border-color: color-mix(in srgb, var(--color-footer-text, #fff) 34%, transparent); } }
.aura-dock__ph {
    flex: 1; min-width: 0;
    font-family: var(--font-primary);
    font-size: 15px; font-weight: 500; color: var(--footer-ink-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aura-dock__mic {
    width: 26px; height: 26px; flex: none; display: grid; place-items: center;
    color: var(--footer-ink-muted); opacity: .9;
}
.aura-dock__mic svg { width: 16px; height: 16px; }
/* ✦ Aura orb — jewel + net white spark + glow + subtle pulse (dikkat çeker) */
.aura-dock__orb {
    width: 40px; height: 40px; flex: none; position: relative; border-radius: 50%;
    background: radial-gradient(120% 120% at 30% 24%,
        color-mix(in srgb, var(--color-primary) 8%, #fff) 0%,
        color-mix(in srgb, var(--color-primary) 72%, #fff) 44%,
        var(--color-primary) 74%,
        color-mix(in srgb, var(--color-primary) 60%, #23104a) 100%);
    box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--color-primary) 55%, transparent),
                0 0 0 1px rgba(255,255,255,.08), inset 0 1px 2px rgba(255,255,255,.5);
}
.aura-dock__orb::before {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
    animation: auraDockRing 3.2s ease-in-out infinite; pointer-events: none;
}
@keyframes auraDockRing { 0%,100%{transform:scale(1);opacity:.5} 55%{transform:scale(1.2);opacity:0} }
.aura-dock__orb::after {
    content: ""; position: absolute; inset: 0; background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.6c.9 5.2 4.3 8.7 9.5 9.6C16.3 12 12.9 15.5 12 20.7 11.1 15.5 7.7 12 2.5 11.2 7.7 10.3 11.1 6.8 12 1.6Z'/%3E%3C/svg%3E") center/48% 48% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.6c.9 5.2 4.3 8.7 9.5 9.6C16.3 12 12.9 15.5 12 20.7 11.1 15.5 7.7 12 2.5 11.2 7.7 10.3 11.1 6.8 12 1.6Z'/%3E%3C/svg%3E") center/48% 48% no-repeat;
    filter: drop-shadow(0 1px 2px rgba(0,40,25,.4));
}

/* ── Slim nav: info · menu · dil — etiket ikonun YANINDA (yatay), daha sleek ── */
.slim-nav { display: flex; align-items: stretch; justify-content: space-around; height: 44px; }
.slim-nav__item {
    flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px;
    background: none; border: none; cursor: pointer; text-decoration: none;
    color: var(--footer-ink);
    font-family: var(--font-primary); font-size: 12px; font-weight: 600; letter-spacing: .01em;
    opacity: .82; transition: opacity var(--transition-fast), transform var(--motion-fast, 190ms) var(--ease-spring, ease);
}
.slim-nav__item svg { width: 18px; height: 18px; flex: none; }
.slim-nav__item:active { transform: scale(0.94); }
@media (hover: hover) { .slim-nav__item:hover { opacity: 1; } }
/* MENU merkezde: orijinaldeki gibi DİKEY (ikon üstte, etiket altta) + hafif
   büyük ikon → merkez birincil eylemi öne çıkar; Bilgi/Dil yatay kalır. */
.slim-nav__item--menu {
    flex-direction: column; gap: 2px;
    font-size: 10px; letter-spacing: .08em;
    color: var(--footer-accent); opacity: 1;
}
.slim-nav__item--menu svg { width: 23px; height: 23px; }
.slim-nav__flag { font-size: 17px; line-height: 1; width: 18px; height: 18px; display: grid; place-items: center; }
/* Dil öğesi yalnız bayrak (etiket yok) → biraz büyüt, dengeli dursun */
.slim-nav__item--lang .slim-nav__flag { font-size: 22px; width: 26px; height: 26px; }

@media (prefers-reduced-motion: reduce) {
    .aura-dock, .slim-nav__item, .aura-dock__orb::before { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Tablet + masaüstü (≥768px): dock footer = YÜZEN CAM çubuk.
   Mobilin üstündeki HER genişlikte footer'ı tam-genişlik beyaz banttan çıkarıp
   ortalanmış, koyu-cam yüzen çubuğa çeviririz (macOS dock hissi; tasarım
   bütünleşir, ara çözünürlükte "gradient bant" görünümü kalkar). Kartın KENDİ
   koyu bağlamı vardır → iç mürekkep footer-bg'den bağımsız beyazdır (operatör
   hangi footer rengini seçerse seçsin okunur). Mobilde (<768px) dock aynen kalır.
   Ortalama: <1100px'te margin:auto (taban), ≥1100px'te app.css left:50%+translateX.
   Genişlik 600px !important — de-v2'nin ≥1100 384px kısıtını bilinçli geçer. */
@media (min-width: 768px) {
    body.footer-dock { --nav-height: 148px; } /* yüzen kart + alt boşluk clearance */
    body.footer-dock .bottom-nav-wrap--dock {
        --footer-ink: #fff;
        --footer-ink-muted: rgba(255, 255, 255, .62);
        --footer-surface: rgba(255, 255, 255, .08);
        --footer-surface-strong: rgba(255, 255, 255, .13);
        --footer-border: rgba(255, 255, 255, .16);
        bottom: 24px;
        max-width: 600px !important;
        padding: 12px 12px calc(8px + var(--safe-bottom));
        border-radius: 28px;
        background: linear-gradient(180deg, rgba(30, 34, 36, .62), rgba(16, 20, 22, .62));
        -webkit-backdrop-filter: blur(26px) saturate(1.4);
        backdrop-filter: blur(26px) saturate(1.4);
        border: 1px solid rgba(255, 255, 255, .14);
        box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .7), 0 2px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
    }
    /* Tam-genişlik beyaz perde masaüstünde KALKAR — cam kartın kendisi zemin. */
    body.footer-dock .bottom-nav-wrap--dock::before { display: none; }
    /* Arama çubuğu artık cam kartın içinde → ağır dış gölgeye gerek yok. */
    body.footer-dock .bottom-nav-wrap--dock .aura-dock {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   B · HAP (pill) footer — kavisli nav KORUNUR; minik büyüteç yerine parlayan
   arama hapı (orb + "Ara ya da sor") solda, merkez MENU notch + bilgi/dil sağda.
   Kavisli nav aynı boy → --nav-height değişmez (dock'un aksine).
   ═══════════════════════════════════════════════════════════════════════ */
.nav-search-pill {
    display: flex; align-items: center; gap: 7px;
    padding: 5px 13px 5px 5px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 38%, transparent);
    border-radius: 22px; cursor: pointer;
    color: var(--color-footer-text, rgba(255, 255, 255, 0.92));
    background: color-mix(in srgb, var(--color-primary) 15%, transparent);
    box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--color-primary) 55%, transparent);
    transition: transform var(--motion-fast, 190ms) var(--ease-spring, ease),
                background var(--transition-fast), border-color var(--transition-fast);
    max-width: 100%;
}
.nav-search-pill:active { transform: scale(0.96); }
@media (hover: hover) { .nav-search-pill:hover { background: color-mix(in srgb, var(--color-primary) 22%, transparent); } }
.nav-search-pill__label {
    font-family: var(--font-primary);
    font-size: 12px; font-weight: 600; letter-spacing: .005em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* orb (jewel + spark + pulse) hap boyutunda */
.nav-search-pill__orb { width: 26px; height: 26px; }
