/* WhatsApp-Style Navigation - Divided Glass Containers */
.whatsapp-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 10px 16px;
    /* Adjusted padding */
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    background: transparent;
    /* Container is transparent, items have background */
}

/* Main Navigation Container (Home, Browse, Bookings, Account) */
.nav-main-group {
    flex: 1;
    background: rgba(248, 248, 248, 0.95);
    /* Silver/Off-White */
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 40px;
    /* Floating Island Style */
    padding: 6px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 450px;
    /* Limit width */
    width: 100%;
    height: 64px;
    /* Force consistent height */
    box-sizing: border-box;
}

/* Individual Nav Items */
.whatsapp-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    /* Horizontal padding only, height controlled by parent */
    height: 100%;
    border-radius: 50px;
    /* Pill Shape */
    text-decoration: none;
    color: #333333;
    /* Darker Black/Gray for Unselected */
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

/* Inactive State: Icon Only */
.whatsapp-nav-item span {
    display: none;
    /* Hide text by default */
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.whatsapp-nav-item i {
    font-size: 22px;
    transition: all 0.3s ease;
}

/* Active State: Blue Pill */
.whatsapp-nav-item.active {
    background-color: #007AFF;
    /* iOS Blue */
    color: #fff;
    padding: 12px 24px;
    /* Wider pill */
    flex-grow: 0;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.whatsapp-nav-item.active span {
    display: inline-block;
    /* Show text */
    animation: fadeIn 0.3s ease forwards;
}

.whatsapp-nav-item.active i {
    color: #fff;
    font-size: 18px;
    /* Slightly smaller icon to balance text */
}

/* Hover Effect on Inactive */
.whatsapp-nav-item:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: #1c1c1e;
}

/* Dark Mode Changes */
body.dark-mode .nav-main-group {
    background: rgba(28, 28, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .whatsapp-nav-item {
    color: #98989d;
}

body.dark-mode .whatsapp-nav-item.active {
    background-color: #0A84FF;
    color: #fff;
}

body.dark-mode .whatsapp-nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Fade In Animation for Text */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Badge/Notification Dot */
.whatsapp-nav-item .notification-badge {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #FF3B30;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

body.dark-mode .whatsapp-nav-item .notification-badge {
    border-color: rgba(30, 30, 30, 0.9);
}

/* Search Overlay Styles */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

body.dark-mode .search-overlay {
    background: rgba(18, 18, 18, 0.98);
}

.search-overlay.active {
    display: flex;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    color: #8e8e93;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border-radius: 12px;
    border: none;
    background: #f2f2f7;
    font-size: 16px;
    outline: none;
}

body.dark-mode .search-input {
    background: #2c2c2e;
    color: #fff;
}

.close-search-btn {
    background: none;
    border: none;
    color: #007AFF;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.search-results {
    flex: 1;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

body.dark-mode .search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.search-result-item i {
    font-size: 18px;
    color: #8e8e93;
    background: #f2f2f7;
    padding: 10px;
    border-radius: 50%;
}

body.dark-mode .search-result-item i {
    background: #2c2c2e;
}

.search-result-item h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

body.dark-mode .search-result-item h4 {
    color: #fff;
}

.search-result-item p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #8e8e93;
}

.no-results {
    text-align: center;
    color: #8e8e93;
    margin-top: 50px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .whatsapp-nav {
        max-width: 100%;
        padding: 6px;
    }

    .whatsapp-nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }

    .whatsapp-nav-item i {
        font-size: 20px;
    }

    .whatsapp-nav-item span {
        font-size: 9px;
    }

    .nav-settings-group .whatsapp-nav-item i {
        font-size: 22px;
    }
}

@media (min-width: 641px) {
    body.dark-mode .whatsapp-nav-item {
        color: #98989d;
    }

    body.dark-mode .whatsapp-nav-item.active {
        background: rgba(10, 132, 255, 0.18);
        color: #0A84FF;
    }

    /* Hover Effect */
    .whatsapp-nav-item:hover:not(.active) {
        background: rgba(0, 0, 0, 0.04);
    }

    body.dark-mode .whatsapp-nav-item:hover:not(.active) {
        background: rgba(255, 255, 255, 0.06);
    }

    /* Active Icon Animation */
    .whatsapp-nav-item.active i {
        transform: scale(1.05);
    }

    /* Badge/Notification Dot */
    .whatsapp-nav-item .notification-badge {
        position: absolute;
        top: 6px;
        right: 10px;
        width: 8px;
        height: 8px;
        background: #FF3B30;
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.9);
    }

    body.dark-mode .whatsapp-nav-item .notification-badge {
        border-color: rgba(30, 30, 30, 0.9);
    }

    /* Search Overlay Styles */
    .search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        z-index: 2000;
        display: none;
        flex-direction: column;
        padding: 20px;
        animation: fadeIn 0.2s ease;
    }

    body.dark-mode .search-overlay {
        background: rgba(18, 18, 18, 0.98);
    }

    .search-overlay.active {
        display: flex;
    }

    .search-header {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .search-input-wrapper {
        flex: 1;
        position: relative;
        display: flex;
        align-items: center;
    }

    .search-input-wrapper i {
        position: absolute;
        left: 15px;
        color: #8e8e93;
    }

    .search-input {
        width: 100%;
        padding: 12px 12px 12px 45px;
        border-radius: 12px;
        border: none;
        background: #f2f2f7;
        font-size: 16px;
        outline: none;
    }

    body.dark-mode .search-input {
        background: #2c2c2e;
        color: #fff;
    }

    .close-search-btn {
        background: none;
        border: none;
        color: #007AFF;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
    }

    .search-results {
        flex: 1;
        overflow-y: auto;
    }

    .search-result-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        cursor: pointer;
    }

    body.dark-mode .search-result-item {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .search-result-item i {
        font-size: 18px;
        color: #8e8e93;
        background: #f2f2f7;
        padding: 10px;
        border-radius: 50%;
    }

    body.dark-mode .search-result-item i {
        background: #2c2c2e;
    }

    .search-result-item h4 {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
        color: #000;
    }

    body.dark-mode .search-result-item h4 {
        color: #fff;
    }

    .search-result-item p {
        margin: 2px 0 0;
        font-size: 13px;
        color: #8e8e93;
    }

    .no-results {
        text-align: center;
        color: #8e8e93;
        margin-top: 50px;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Responsive */
    @media (max-width: 640px) {
        .whatsapp-nav {
            max-width: 100%;
            padding: 6px;
        }

        .whatsapp-nav-item {
            padding: 6px 8px;
            min-width: 50px;
        }

        .whatsapp-nav-item i {
            font-size: 20px;
        }

        .whatsapp-nav-item span {
            font-size: 9px;
        }

        .nav-settings-group .whatsapp-nav-item i {
            font-size: 22px;
        }
    }

    @media (min-width: 641px) {
        .whatsapp-nav {
            padding: 12px;
        }
    }

    /* Safe area padding for iOS */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {}
}

.profile-btn i {
    font-size: 18px;
}

.profile-btn span {
    font-size: 14px;
}

/* Dark mode adjustments */
body.dark-mode .profile-btn {
    background: #1e40af;
}

body.dark-mode .profile-btn:hover {
    background: var(--brand-accent, #10b981);
}

/* New Bottom Navigation (Pill Style) */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 70px;
    background: white;
    border-radius: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #9CA3AF;
    cursor: pointer;
    text-decoration: none;
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    flex: 1.5;
}

.nav-pill {
    background: #0066FF;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.nav-pill i {
    font-size: 18px;
}