/* ============================================================
   MOBILE BOTTOM NAV — 2026 Clean Rewrite
   Daha önce _bottom_nav.html içinde inline <style nonce> idi.
   CSP nonce'un boş kaldığı sayfalarda (örn. /consultations/) stil
   yüklenmiyordu. External dosya garantili çalışır.
   ============================================================ */

.mobile-bottom-nav {
    position: fixed;
    inset: auto 0 0 0; /* bottom-left-right 0 */
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 1045;
    background: #0f172a; /* solid slate-900 */
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.30);
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr;
    align-items: center;
    color: #e2e8f0;
    font-family: inherit;
}

/* ── Genel item reset (a + button + div hepsi) ── */
.mobile-bottom-nav .bottom-nav-item {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 100%;
    height: 100%;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 6px 4px !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    color: rgba(255, 255, 255, 0.62) !important;
    text-decoration: none !important;
    text-align: center;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.18s ease, transform 0.15s ease;
}

.mobile-bottom-nav .bottom-nav-item:hover,
.mobile-bottom-nav .bottom-nav-item:focus-visible {
    color: rgba(255, 255, 255, 0.92) !important;
}

.mobile-bottom-nav .bottom-nav-item:active {
    transform: scale(0.94);
}

.mobile-bottom-nav .bottom-nav-item.active {
    color: #a78bfa !important;
}

.mobile-bottom-nav .bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8b5cf6;
}

.mobile-bottom-nav .bottom-nav-icon {
    font-size: 18px !important;
    line-height: 1;
}

.mobile-bottom-nav .bottom-nav-item span:not(.bottom-nav-badge):not(.bottom-nav-lila-orb):not(.bottom-nav-lila-core) {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

/* ── Central FAB wrapper (grid'in auto sütunu) ── */
.mobile-bottom-nav .bottom-nav-action-wrapper {
    width: 64px;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible;
}

/* ── FAB butonu — purple circle, lifted ── */
.mobile-bottom-nav .bottom-nav-action-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #7c3aed !important;
    background-image: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    border: 3px solid #0f172a !important;
    border-radius: 50% !important;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateY(-14px);
    position: relative;
    cursor: pointer;
    font-size: 0 !important;
    color: transparent;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.mobile-bottom-nav .bottom-nav-action-btn:hover {
    transform: translateY(-16px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.55) !important;
}

.mobile-bottom-nav .bottom-nav-action-btn:active {
    transform: translateY(-12px) scale(0.92);
}

/* ── Lila orb (FAB içi görsel) ── */
.mobile-bottom-nav .bottom-nav-lila-orb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f5f3ff 0%, #ddd6fe 45%, #a78bfa 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    position: relative;
}

.mobile-bottom-nav .bottom-nav-lila-core {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: bottom-lila-pulse 2.4s ease-in-out infinite;
}

@keyframes bottom-lila-pulse {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50%      { transform: scale(1.2); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav .bottom-nav-lila-core { animation: none; }
}

/* ── Unread message badge ── */
.mobile-bottom-nav .bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    border-radius: 9px;
    border: 2px solid #0f172a;
    text-align: center;
    box-sizing: content-box;
}

/* ── Çok küçük telefonlar ── */
@media (max-width: 360px) {
    .mobile-bottom-nav .bottom-nav-icon { font-size: 16px !important; }
    .mobile-bottom-nav .bottom-nav-item span:not(.bottom-nav-badge):not(.bottom-nav-lila-orb):not(.bottom-nav-lila-core) {
        font-size: 9.5px;
    }
    .mobile-bottom-nav .bottom-nav-action-btn {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }
    .mobile-bottom-nav .bottom-nav-lila-orb {
        width: 24px;
        height: 24px;
    }
}

/* ── Mobilde Lila floating orb'u gizle (bottom-nav zaten erişim sağlıyor) ── */
@media (max-width: 991.98px) {
    .lila-orb-trigger,
    #lila-orb {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ============================================================
   MOBILE BOTTOM-SHEET OFFCANVAS (Uygulamalar / İletişim Merkezi)
   ============================================================ */
.mobile-nav-sheet.offcanvas-bottom {
    height: auto !important;
    max-height: 85vh;
    max-height: 85dvh;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.18);
    z-index: 1055 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.offcanvas-backdrop.show {
    z-index: 1050 !important;
}

/* Modal açılırken offcanvas-backdrop hâlâ DOM'da kalıyorsa modal-backdrop ile
   üst üste biniyor (çift kat %50 gri = %75 gri). Modal aktifken offcanvas
   backdrop'u gizle — Bootstrap zaten body'ye .modal-open ekliyor. */
body.modal-open .offcanvas-backdrop {
    display: none !important;
}

.mobile-nav-sheet .offcanvas-header {
    padding: 14px 18px;
    background: #f8fafc;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.mobile-nav-sheet .offcanvas-title {
    font-size: 1.05rem;
}

.mobile-nav-sheet .offcanvas-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Drag handle */
.mobile-nav-sheet::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 1;
}
