/*
*************************************************
* Mobile Footer Navigation CSS
* Link this file in the <head> of your HTML pages.
*************************************************
*/

/* Overlay for mobile sidebar and modal */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: none;
}
.overlay.show {
    display: block;
}

/* --- Mobile Footer Navigation (Betpawa-Style) --- */
#mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: none; /* Hidden by default on desktop, needs media query to show on mobile */
}

#mobile-footer-nav ul {
    display: flex;
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
}

#mobile-footer-nav li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-footer-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666666;
    font-size: 10px;
    font-weight: 500;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

#mobile-footer-nav a i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

#mobile-footer-nav a.active {
    color: #4f46e5; /* Indigo color for active state */
}

#mobile-footer-nav a.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #4f46e5;
    border-radius: 2px;
}

/* --- More Menu Modal CSS --- */
#more-menu-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    max-height: 80vh;
    background-color: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    overflow-y: auto;
    display: none;
}

#more-menu-modal.show {
    transform: translateY(0);
}

#more-menu-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky; /* Keep header visible when scrolling modal content */
    top: 0;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#more-menu-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

#more-menu-modal-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
}

.modal-content-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for menu items */
    gap: 15px;
}

.modal-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #374151;
    padding: 10px 5px;
    border-radius: 8px;
    transition: background-color 0.2s;
    text-align: center;
}

.modal-link:hover {
    background-color: #f3f4f6;
}

.modal-link i {
    font-size: 28px;
    color: #4f46e5;
    margin-bottom: 5px;
}

.modal-link span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Show mobile navigation only on small screens */
@media (max-width: 768px) {
    #mobile-footer-nav {
        display: block;
    }
}
