/* ============================================
   MOBİL BOTTOM NAVIGATION BAR (iPhone Style)
   ============================================ */

/* Desktop'ta gizle */
.mobile-bottom-nav {
    display: none;
}

.mobile-bottom-nav-new,
.mobile-whatsapp-float {
    display: none;
}

/* Sadece mobilde göster */
@media (max-width: 991px) {
    /* CSS Variable: Bottom nav yüksekliği */
    :root {
        --bottom-nav-h: 75px;
    }

    /* ESKİ BAR: Mobilde tamamen gizle */
    .mobile-bottom-nav {
        display: none !important;
    }

    /* YENİ MOBİL ALT NAVIGATION */
    .mobile-bottom-nav-new {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        z-index: 9999 !important;
        padding-bottom: env(safe-area-inset-bottom);
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: var(--bottom-nav-h);
        min-height: var(--bottom-nav-h);
    }

    .mobile-bottom-nav-new__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #000000;
        padding: 8px 4px;
        position: relative;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        border-left: 1px solid #e5e7eb;
    }

    .mobile-bottom-nav-new__item:first-child {
        border-left: none;
    }

    /* Tüm butonlar varsayılan olarak siyah */
    .mobile-bottom-nav-new__item {
        color: #000000 !important;
    }

    .mobile-bottom-nav-new__item .mobile-bottom-nav-new__icon,
    .mobile-bottom-nav-new__item .mobile-bottom-nav-new__text {
        color: #000000 !important;
    }

    /* Bağış Yap butonu her zaman kırmızı */
    .mobile-bottom-nav-new__item--donate,
    #mbn-donate {
        color: #c40000 !important;
    }

    .mobile-bottom-nav-new__item--donate .mobile-bottom-nav-new__icon,
    .mobile-bottom-nav-new__item--donate .mobile-bottom-nav-new__text,
    #mbn-donate .mobile-bottom-nav-new__icon,
    #mbn-donate .mobile-bottom-nav-new__text {
        color: #c40000 !important;
    }

    /* Active state artık kırmızı yapmıyor */
    .mobile-bottom-nav-new__item.active {
        color: #000000 !important;
    }

    .mobile-bottom-nav-new__item.active .mobile-bottom-nav-new__icon,
    .mobile-bottom-nav-new__item.active .mobile-bottom-nav-new__text {
        color: #000000 !important;
    }

    .mobile-bottom-nav-new__icon {
        font-size: 22px;
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 24px;
    }

    .mobile-bottom-nav-new__icon img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    .mobile-bottom-nav-new__text {
        font-size: 11px;
        font-weight: 500;
        line-height: 1.2;
        text-align: center;
    }

    /* Dil seçici özel stil */
    .mobile-bottom-nav-new__item--lang {
        flex: 0.8;
    }

    .mobile-bottom-nav-new__lang-content {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .mobile-bottom-nav-new__lang-flag {
        width: 20px;
        height: 20px;
        border-radius: 2px;
        object-fit: cover;
    }

    /* Sayfa içeriği altta barın altında kalmasın */
    body {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)) !important;
    }
}

/* Mobilde (<=767.98px) sayfa wrapper ve içerik için ek padding */
@media (max-width: 767.98px) {
    :root {
        --bottom-nav-h: 55px;
    }
    
    /* Sayfa wrapper'ına padding ekle */
    .page-wrapper {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)) !important;
    }
    
    /* Bağış listesi sayfası için özel padding (mevcut padding'e ek olarak) */
    .bagis-listesi-page,
    .bagis-listesi-wrapper,
    .bagis-listesi-wrapper .bagis-listesi-page {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)) !important;
    }
    
    /* Bağış yap sayfası için de padding */
    .bagis-listesi-wrapper {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)) !important;
    }

    /* FLOATING WHATSAPP BUTTON */
    .mobile-whatsapp-float {
        position: fixed;
        bottom: calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom));
        left: 16px;
        width: 56px;
        height: 56px;
        background: #25D366;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
        z-index: 9998;
        text-decoration: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-whatsapp-float:active {
        transform: scale(0.95);
        box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    }

    .mobile-whatsapp-float i {
        color: #ffffff;
        font-size: 28px;
    }


    /* Çakışma temizliği: Mobilde eski widget'ları kapat */
    /* Header'daki kırmızı donate FAB */
    .donate-fab,
    #donateFabMobile {
        display: none !important;
    }

    /* Floating WhatsApp widget - mobilde gizle (yeni floating button kullanılıyor) */
    .floating-contact-wrap,
    .floating-contact-btn {
        display: none !important;
    }

    /* Scroll-to-top butonu mobilde kapalı */
    .scroll-to-target.scroll-to-top {
        display: none !important;
    }

    /* Weglot overlay çakışmasını engelle - mobilde z-index düşür */
    [class*="weglot"],
    [id*="weglot"],
    .weglot-container,
    .wg-default,
    .weglot_switcher {
        z-index: 1000 !important;
    }

    /* Weglot dropdown açıkken bile alt bar üstünde olsun */
    [class*="weglot"].open,
    [class*="weglot"].show,
    [class*="weglot"].active {
        z-index: 1000 !important;
    }
}

