/**
 * float-nav.css — Mobil float navigation bar stilleri
 *
 * KÖKEN: Daha önce /src/views/partials/float-nav.php içinde inline <style> bloğu idi.
 * FOUC düzeltmesi için buraya taşındı; artık header.php <head>'inde render-blocking
 * olarak yükleniyor → ilk paint'te fnav ve menu panel doğru stilde çıkar.
 */

/* ── Mobil Float Nav — yalnızca 768px altı ─────────── */
@media (min-width: 769px) {
    #fnav-wrap { display: none !important; }
}

/* Landscape modda (kısa yükseklik) float nav gizle */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #fnav-wrap  { display: none !important; }
    #fn-ai-panel, #fn-menu-panel, #fn-menu-backdrop { display: none !important; }
    body        { padding-bottom: 0 !important; }
}

@media (max-width: 768px) {
    #ai-fab  { display: none !important; }
    #ai-popup{ display: none !important; }
    body { padding-bottom: 80px !important; }
}

/* ── Nav dış kapsayıcı ─────────────────────────────── */
#fnav-wrap {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    z-index: 9990;
    padding: 0;
    pointer-events: none;
}

/* ── Nav bar ───────────────────────────────────────── */
#fnav-bar {
    height: 62px;
    background: #100e0c;
    border: 1px solid #2a2520;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    pointer-events: auto;
    box-shadow: 0 -2px 24px rgba(0,0,0,.5), 0 8px 32px rgba(0,0,0,.4);
    transition: transform .38s cubic-bezier(.22,1,.36,1),
                opacity   .25s ease;
    will-change: transform;
    overflow: visible;
    position: relative;
}
#fnav-bar.hidden {
    transform: translateY(84px);
    opacity: 0;
    pointer-events: none;
}

/* ── Tab öğesi ─────────────────────────────────────── */
.fn-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 8px 0;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .15s;
    position: relative;
}
.fn-tab:active { opacity: .7; }

.fn-tab-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    color: #4a4440;
    transition: color .2s;
}
.fn-tab-icon svg { width: 22px; height: 22px; stroke: currentColor; }

.fn-tab-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #3a3430;
    transition: color .2s;
    white-space: nowrap;
}

.fn-tab.active .fn-tab-icon { color: #C8960C; }
.fn-tab.active .fn-tab-label { color: #C8960C; }

.fn-tab.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    width: 4px; height: 4px;
    background: #C8960C;
    border-radius: 50%;
}

/* Menü butonu açık durumu */
.fn-tab.menu-open .fn-tab-icon { color: #C8960C; }
.fn-tab.menu-open .fn-tab-label { color: #C8960C; }

/* ── Merkez AI butonu ──────────────────────────────── */
.fn-center-slot {
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#fn-ai-btn {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: #0e0c08;
    border: 2px solid #C8960C;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    top: -14px;
    box-shadow: 0 4px 20px rgba(200,150,12,.25), 0 0 0 4px rgba(200,150,12,.07);
    transition: all .25s;
    -webkit-tap-highlight-color: transparent;
    overflow: visible;
}
#fn-ai-btn:active { transform: scale(.93); }

#fn-ai-btn img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
}
#fn-ai-btn .fn-ai-fallback {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg,#C8960C,#8B0000);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 900; color: #0c0a08;
    letter-spacing: -.02em;
}

/* fn-nefes: box-shadow GPU katman patlamasina neden oluyordu → sadece opacity */
#fn-ai-btn { animation: fn-nefes 2.8s ease-in-out infinite; }
@keyframes fn-nefes {
    0%,100% { opacity: 1; }
    50%      { opacity: .82; }
}
#fn-ai-btn:active { animation: none; transform: scale(.93); }
/* GPU katman yönetimi: will-change sadece aktif animasyonda */
#fn-ai-btn:not(:active) { will-change: auto; }

.fn-ai-ring-wrap {
    position: absolute;
    top: -14px;
    width: 58px; height: 58px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}
#fn-ai-dot {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #2ecc71;
    animation: fn-ring-breath 2.4s ease-in-out infinite;
    pointer-events: none;
}
/* fn-ring-breath: border-color/box-shadow → opacity only (GPU-safe) */
@keyframes fn-ring-breath {
    0%,100% { opacity: 1; }
    50%      { opacity: .2; }
}

/* ── AI mini panel ─────────────────────────────────── */
#fn-ai-panel {
    position: fixed;
    bottom: 88px;
    left: 12px; right: 12px;
    background: #161210;
    border: 1px solid rgba(200,150,12,.25);
    border-radius: 16px;
    padding: 16px;
    z-index: 9991;
    transform: translateY(16px) scale(.96);
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 -4px 32px rgba(0,0,0,.5);
}
#fn-ai-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.fn-ai-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px;
}
.fn-ai-head-dot {
    width: 7px; height: 7px;
    border-radius: 50%; background: #2ecc71;
}
.fn-ai-head-title {
    font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: #C8960C;
}
.fn-ai-head-close {
    margin-left: auto;
    background: none; border: none;
    color: #4a4440; font-size: 16px;
    cursor: pointer; padding: 0; line-height: 1;
}
.fn-ai-head-close:hover { color: #c8c0b0; }

.fn-ai-bubble {
    background: rgba(200,150,12,.07);
    border: 1px solid rgba(200,150,12,.14);
    border-radius: 4px 12px 12px 12px;
    padding: 12px 14px;
    font-size: 13px; color: #a09888; line-height: 1.65;
    margin-bottom: 14px;
}
.fn-ai-bubble strong { color: #C8960C; }

.fn-ai-chips {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.fn-ai-chip {
    padding: 5px 11px; border-radius: 20px;
    font-size: 10px; font-weight: 700; cursor: pointer;
    background: rgba(200,150,12,.08); color: #9a7010;
    border: 1px solid rgba(200,150,12,.2);
    transition: all .15s; text-decoration: none;
}
.fn-ai-chip:hover, .fn-ai-chip:active {
    background: rgba(200,150,12,.16); color: #C8960C;
}

.fn-ai-status {
    text-align: center; font-size: 11px; color: #3a3430;
    padding-top: 10px; border-top: 1px solid rgba(255,255,255,.04);
}

/* ── Menü slide-up panel ─────────────────── */
#fn-menu-panel {
    position: fixed;
    bottom: 88px;
    left: 12px; right: 12px;
    background: #130f0d;
    border: 1px solid rgba(200,150,12,.22);
    border-radius: 18px;
    z-index: 9992;
    transform: translateY(20px) scale(.97);
    opacity: 0;
    pointer-events: none;
    transition: transform .32s cubic-bezier(.22,1,.36,1),
                opacity   .25s ease;
    box-shadow: 0 -8px 40px rgba(0,0,0,.6);
    overflow: hidden;
}
#fn-menu-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.fn-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(200,150,12,.1);
}
.fn-menu-title {
    font-size: 11px; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase;
    color: rgba(200,150,12,.7);
    font-family: 'Barlow Condensed', sans-serif;
}
.fn-menu-close {
    background: none; border: none;
    color: #4a4440; font-size: 18px;
    cursor: pointer; padding: 0; line-height: 1;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
}
.fn-menu-close:active { background: rgba(200,150,12,.1); color: #C8960C; }

.fn-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

.fn-menu-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 13px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(200,150,12,.08);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    -webkit-tap-highlight-color: transparent;
}
.fn-menu-item:active {
    background: rgba(200,150,12,.1);
    border-color: rgba(200,150,12,.25);
}

.fn-menu-item-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2px;
}
.fn-menu-item-icon svg {
    width: 17px; height: 17px;
    stroke: currentColor;
}

.fn-menu-item-name {
    font-size: 12px; font-weight: 700;
    letter-spacing: .02em;
    color: #c8c0b0;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    line-height: 1;
}
.fn-menu-item-desc {
    font-size: 10px;
    color: #4a4440;
    line-height: 1.3;
}

/* Renk varyantları */
.fn-menu-item.color-gold .fn-menu-item-icon {
    background: rgba(200,150,12,.1);
    color: #C8960C;
}
.fn-menu-item.color-blue .fn-menu-item-icon {
    background: rgba(88,166,255,.1);
    color: #58a6ff;
}
.fn-menu-item.color-green .fn-menu-item-icon {
    background: rgba(46,204,113,.1);
    color: #2ecc71;
}
.fn-menu-item.color-red .fn-menu-item-icon {
    background: rgba(139,0,0,.2);
    color: #ff6b6b;
}

/* Aktif sayfa işareti */
.fn-menu-item.active-page {
    border-color: rgba(200,150,12,.3);
    background: rgba(200,150,12,.06);
}
.fn-menu-item.active-page .fn-menu-item-name { color: #C8960C; }

/* Overlay backdrop */
#fn-menu-backdrop {
    position: fixed;
    inset: 0;
    /* z-index 150: site-header (200) altında kalmalı.
       Böylece backdrop açıkken header/hamburger butonları tıklanabilir kalır.
       fn-menu-panel 9992'de olduğu için panel hâlâ her şeyin üstünde görünür. */
    z-index: 150;
    background: rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
#fn-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
