/* تحسينات قائمة التنقل السفلية */

/* تحسين الارتفاع والمساحة */
#bottom-nav,
footer#bottom-nav {
    min-height: 6rem !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
}

#bottom-nav nav,
footer#bottom-nav nav {
    min-height: 6rem !important;
}

/* تحسين العناصر في القائمة السفلية */
#bottom-nav a,
footer#bottom-nav a {
    min-width: 4rem !important;
    padding: 0.75rem 0.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
}

#bottom-nav a:hover,
#bottom-nav a:active,
footer#bottom-nav a:hover,
footer#bottom-nav a:active {
    background-color: rgba(99, 102, 241, 0.15) !important;
    transform: scale(1.05) translateY(-2px);
}

/* تحسين الأيقونات في القائمة السفلية */
#bottom-nav a span.material-symbols-outlined,
footer#bottom-nav a span.material-symbols-outlined {
    font-size: 1.5rem !important;
    transition: all 0.3s ease !important;
}

#bottom-nav a:hover span.material-symbols-outlined,
#bottom-nav a:active span.material-symbols-outlined,
footer#bottom-nav a:hover span.material-symbols-outlined,
footer#bottom-nav a:active span.material-symbols-outlined {
    transform: scale(1.15);
}

/* تحسين النصوص في القائمة السفلية */
#bottom-nav a p,
footer#bottom-nav a p {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    margin: 0.25rem 0 0 0 !important;
}

/* تحسين الفجوات بين العناصر */
#bottom-nav nav,
footer#bottom-nav nav {
    gap: 0.5rem !important;
    padding: 0.5rem !important;
}

/* ألوان النصوص النشطة */
#bottom-nav a.text-primary,
footer#bottom-nav a.text-primary {
    color: var(--primary-color) !important;
}

#bottom-nav a.text-white\/60,
footer#bottom-nav a.text-white\/60 {
    color: rgba(255, 255, 255, 0.6) !important;
}

#bottom-nav a.text-white\/60:hover,
footer#bottom-nav a.text-white\/60:hover {
    color: var(--primary-color) !important;
}

/* تحسين خط الحد العلوي */
#bottom-nav,
footer#bottom-nav {
    border-top: 1.5px solid rgba(255, 255, 255, 0.15) !important;
}

/* تحسين الخلفية والفلتر */
#bottom-nav,
footer#bottom-nav {
    background: linear-gradient(
        to top,
        rgba(18, 18, 18, 0.98),
        rgba(18, 18, 18, 0.95)
    ) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* الظل */
#bottom-nav,
footer#bottom-nav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4) !important;
}

/* Center prominent home button (FAB) */
.bottom-nav-center-btn > div,
.bottom-nav-center-inner {
    /* Use slash alpha form to match theme.css helpers and ensure broad browser support */
    background: linear-gradient(135deg, rgb(var(--primary-start-rgb) / 1), rgb(var(--primary-end-rgb) / 1)) !important;
    background-color: var(--primary-500) !important; /* fallback if gradient parsing fails */
    width: 5rem; /* 80px */
    height: 5rem; /* 80px */
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.35), 0 6px 8px rgba(0,0,0,0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    overflow: hidden;
}
.bottom-nav-center-btn > div .material-symbols-outlined,
.bottom-nav-center-inner .material-symbols-outlined {
    line-height: 1;
    color: #ffffff !important;
}
.bottom-nav-center-btn:hover > div,
.bottom-nav-center-btn:focus > div,
.bottom-nav-center-btn:hover .bottom-nav-center-inner,
.bottom-nav-center-btn:focus .bottom-nav-center-inner {
    transform: translateY(-6px) scale(1.03);
    filter: drop-shadow(0 12px 18px rgba(0,0,0,0.45));
}

/* Add-balance small button style */
.bottom-nav-add-btn {
    padding: 0.25rem 0.35rem !important;
    border-radius: 0.6rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgb(var(--primary-start-rgb) / 1), rgb(var(--primary-end-rgb) / 1)) !important;
    background-color: var(--primary-500) !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.28) !important;
    min-width: 3.25rem !important;
    padding-inline: 0.6rem !important;
}
.bottom-nav-add-btn span.material-symbols-outlined {
    font-size: 1.15rem !important;
}
.bottom-nav-add-btn p { color: rgba(255,255,255,0.95) !important; }
.bottom-nav-add-btn:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 12px 22px rgba(0,0,0,0.36) !important;
}

/* تحسينات الـ safe-area */
#bottom-nav .h-safe-area-bottom,
footer#bottom-nav .h-safe-area-bottom {
    min-height: env(safe-area-inset-bottom, 0px) !important;
    background: linear-gradient(
        to top,
        rgba(18, 18, 18, 0.98),
        rgba(18, 18, 18, 0.95)
    ) !important;
}

/* تأثيرات إضافية عند التفاعل */
@media (hover: hover) {
    #bottom-nav a,
    footer#bottom-nav a {
        position: relative;
    }
    
    #bottom-nav a::after,
    footer#bottom-nav a::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--primary-color);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
    }
    
    #bottom-nav a:hover::after,
    footer#bottom-nav a:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* تحسينات الأجهزة الصغيرة جداً */
@media (max-width: 480px) {
    #bottom-nav nav,
    footer#bottom-nav nav {
        min-height: 5.5rem !important;
    }
    
    #bottom-nav a,
    footer#bottom-nav a {
        min-width: 3.5rem !important;
        padding: 0.5rem 0.25rem !important;
    }
    
    #bottom-nav a p,
    footer#bottom-nav a p {
        font-size: 0.65rem !important;
    }
    /* Ensure center FAB doesn't overcrowd very small screens */
    .bottom-nav-center-btn > div { width: 4.5rem; height: 4.5rem; }
}

/* تحسينات الأجهزة المتوسطة */
@media (min-width: 481px) and (max-width: 1023px) {
    #bottom-nav nav,
    footer#bottom-nav nav {
        min-height: 6rem !important;
    }
}

/* تحسينات الأنماط المختلفة */
@media (prefers-reduced-motion: reduce) {
    #bottom-nav a,
    footer#bottom-nav a {
        transition: none !important;
    }
}

/* تحسينات الوضع الليلي (dark mode) */
@media (prefers-color-scheme: dark) {
    #bottom-nav,
    footer#bottom-nav {
        background: rgba(15, 15, 15, 0.98) !important;
    }
}

/* تحسينات الوضع النهاري */
@media (prefers-color-scheme: light) {
    #bottom-nav,
    footer#bottom-nav {
        background: rgba(240, 240, 240, 0.98) !important;
        border-top-color: rgba(0, 0, 0, 0.1) !important;
    }
}
