/* Header Responsive Styles */

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

/* Ensure all items in auth-buttons are vertically aligned */
.auth-buttons .btn-sign,
.auth-buttons .cart-icon,
.auth-buttons a.cart-icon {
    vertical-align: middle !important;
}

/* Cart Icon - Improved UI/UX */
.cart-icon,
a.cart-icon {
    position: relative !important;
    color: white !important;
    text-decoration: none !important;
    font-size: 1.4rem !important;
    display: inline-block !important;
    vertical-align: middle !important;
    padding: 8px 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    cursor: pointer !important;
    line-height: 1 !important;
    text-align: center !important;
}

.cart-icon:hover {
    background: rgba(255, 0, 128, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(255, 0, 128, 0.3) !important;
    border-color: rgba(255, 0, 128, 0.5) !important;
}

.cart-icon:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 0, 128, 0.2);
}

.cart-icon i,
a.cart-icon i {
    color: white !important;
    transition: all 0.3s ease;
    z-index: 1;
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.cart-icon:hover i {
    color: #ff0080 !important;
    transform: scale(1.15);
}

.cart-badge,
.cart-icon .cart-badge,
a.cart-icon .cart-badge,
.cart-icon span.cart-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: linear-gradient(135deg, #ff0080, #ff5e98) !important;
    background-color: #ff0080 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border: 2px solid white !important;
    min-width: 20px !important;
    box-shadow: 0 2px 8px rgba(255, 0, 128, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cart-badge:empty {
    display: none !important;
}

.cart-icon:hover .cart-badge,
a.cart-icon:hover .cart-badge,
.cart-icon:hover span.cart-badge {
    transform: scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(255, 0, 128, 0.7) !important;
    background: linear-gradient(135deg, #ff0080, #ff0080) !important;
    background-color: #ff0080 !important;
}

/* Ensure badge is visible when count > 0 */
.cart-badge:not(:empty),
.cart-icon .cart-badge:not(:empty),
a.cart-icon .cart-badge:not(:empty) {
    display: flex !important;
}

/* Override any Bootstrap badge styles */
.cart-icon .cart-badge.badge,
a.cart-icon .cart-badge.badge,
.cart-badge.badge {
    background: linear-gradient(135deg, #ff0080, #ff5e98) !important;
    background-color: #ff0080 !important;
    color: white !important;
    border: 2px solid white !important;
    padding: 0 !important;
}

/* Button Sign Improvements - Master UI/UX */
.btn-sign {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-sign::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-sign:hover::before {
    width: 300px;
    height: 300px;
}

.btn-sign:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 128, 0.3);
}

.btn-sign:active {
    transform: translateY(0);
}

/* Mobile Cart Link in Menu - Master UI/UX */
.mobile-cart-link {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.15), rgba(255, 94, 152, 0.15));
    margin-top: 10px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 0, 128, 0.2);
    color: white !important;
}

.mobile-cart-link:hover {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.25), rgba(255, 94, 152, 0.25));
    color: var(--primary-light) !important;
    padding-left: 20px;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(255, 0, 128, 0.2);
}

.mobile-cart-link i {
    color: var(--primary-color) !important;
    font-size: 1.2rem;
}

/* Medium screens (14-inch Mac: 1440px-1680px) */
@media (min-width: 1200px) and (max-width: 1800px) {
    .top-nav-container {
        right: 5% !important;
        left: auto !important;
        width: auto !important;
        min-width: 200px !important;
        max-width: none !important;
        top: 10px !important;
        transform: none !important;
    }

    .top-nav {
        justify-content: flex-end !important;
        width: auto !important;
        padding: 10px 20px !important;
    }

    .header-container {
        width: 90% !important;
        max-width: 1500px !important;
        top: 50px !important;
    }

    .auth-buttons {
        gap: 10px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .cart-icon,
    a.cart-icon {
        margin-left: 0 !important;
        padding: 8px 12px !important;
        display: inline-block !important;
        vertical-align: middle !important;
        line-height: 1 !important;
    }

    .cart-icon i,
    a.cart-icon i {
        vertical-align: middle !important;
        line-height: 1 !important;
    }

    .btn-sign {
        vertical-align: middle !important;
        line-height: 1.5 !important;
    }
}

/* Tablet Responsive (992px and below) */
@media (max-width: 992px) {
    .header-container {
        width: 90%;
    }

    .header {
        padding: 12px 20px;
    }

    .logo img {
        max-width: 150px !important;
        max-height: 48px !important;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 24px;
    }

    .btn-sign {
        padding: 7px 16px;
        font-size: 13px;
    }
}

/* Mobile Responsive (768px and below) */
@media (max-width: 768px) {
    .header-container {
        width: 95%;
        top: 40px;
        left: 50%;
        transform: translateX(-50%);
    }

    .header {
        padding: 12px 15px;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo {
        font-size: 1.3rem;
        flex-shrink: 0;
        order: 1;
    }

    .logo img {
        max-width: 140px !important;
        max-height: 45px !important;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-shrink: 0;
        order: 2;
    }

    .nav-links {
        display: none;
    }

    .event-request-links {
        display: none !important;
    }

    .auth-buttons {
        gap: 8px;
        flex-shrink: 0;
        order: 3;
        margin-left: auto;
    }

    .btn-sign {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .cart-icon {
        font-size: 1.3rem !important;
        padding: 6px !important;
        flex-shrink: 0;
        min-width: 44px;
        min-height: 44px;
    }

    .cart-badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.65rem !important;
        min-width: 18px !important;
        background: linear-gradient(135deg, #ff0080, #ff5e98) !important;
        border: 2px solid white !important;
    }
}

/* Small Mobile Responsive (576px and below) */
@media (max-width: 576px) {
    .header-container {
        width: 100%;
        top: 30px;
        left: 0;
        transform: none;
        padding: 0 10px;
    }

    .header {
        border-radius: 0;
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.1rem;
        flex: 0 0 auto;
    }

    .logo img {
        max-width: 120px !important;
        max-height: 40px !important;
    }

    .mobile-menu-toggle {
        padding: 6px 10px;
        font-size: 1.2rem;
        min-width: 40px;
        min-height: 40px;
        flex: 0 0 auto;
    }

    .auth-buttons {
        gap: 5px;
        flex: 0 0 auto;
        order: 3;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .btn-sign {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .btn-sign-in {
        padding: 5px 12px !important;
    }

    .btn-sign-up {
        display: none !important;
    }

    .cart-icon {
        font-size: 1.2rem !important;
        padding: 5px !important;
        min-width: 40px;
        min-height: 40px;
    }

    .cart-badge {
        width: 16px !important;
        height: 16px !important;
        font-size: 0.6rem !important;
        min-width: 16px !important;
        border-width: 2px !important;
        background: linear-gradient(135deg, #ff0080, #ff5e98) !important;
        border-color: white !important;
    }

    .mobile-nav {
        border-radius: 0;
        padding: 15px 12px;
        margin-top: 10px;
    }

    .mobile-nav-links a {
        padding: 10px 12px;
        font-size: 24px;
    }

    .event-request-links {
        display: none !important;
    }
}

/* Extra Small Mobile (480px and below) */
@media (max-width: 480px) {
    .header-container {
        top: 25px;
        padding: 0 8px;
    }

    .header {
        padding: 8px 10px;
        gap: 6px;
    }

    .logo img {
        max-width: 100px !important;
        max-height: 35px !important;
    }

    .mobile-menu-toggle {
        padding: 5px 8px;
        font-size: 1.1rem;
        min-width: 36px;
        min-height: 36px;
    }

    .auth-buttons {
        gap: 4px;
        margin-top: 6px;
    }

    .btn-sign {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .cart-icon {
        font-size: 1.1rem !important;
        padding: 4px !important;
        min-width: 36px;
        min-height: 36px;
    }

    .cart-badge {
        width: 14px !important;
        height: 14px !important;
        font-size: 0.55rem !important;
        min-width: 14px !important;
        background: linear-gradient(135deg, #ff0080, #ff5e98) !important;
        border: 1.5px solid white !important;
    }
}
