/* ========== HEADER STYLE FIXES ========== */

/* 1. Font Consistency */
.nav-desktop .dropdown-trigger,
.nav-desktop .nav-link {
    font-size: 1rem !important;
    font-family: var(--font-body);
    font-weight: 500;
}

/* 2. Login Button - Compact */
.header .nav-container,
.header-actions {
    align-items: center !important;
}

.header-login-btn {
    padding: 0.5rem 1.5rem !important;
    height: auto !important;
    min-height: 30px !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.95rem !important;
    font-weight: 500;
    margin: 0 !important;
    border: none !important;
    background: var(--primary-color);
    color: white;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.header-login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-left-group {
    display: flex;
    align-items: center;
}

/* 3. Scroll-aware Mobile Nav */
@media (max-width: 768px) {
    .mobile-nav-row {
        /* Transition max-height for layout collapse, opacity for fade, and padding for clean collapse */
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, transform 0.3s ease;
        transform: translateY(0);
        opacity: 1;
        max-height: 60px;
        /* Approximate height of the row */
        overflow: hidden;
        /* Required for max-height transition */

        /* Removed sticky positioning to allow parent header to shrink */
        position: relative;
        z-index: 990;
        background: var(--background);
        border-bottom: 1px solid var(--border-color);
    }

    /* Allow overflow when picks dropdown is open */
    .mobile-nav-row:has(.mobile-picks-dropdown.active) {
        overflow: visible !important;
    }

    .mobile-nav-row.nav-hidden {
        transform: translateY(-20%);
        /* Slight upward movement for visual cue */
        max-height: 0;
        /* Collapse layout space completely */
        opacity: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-bottom: 1px solid transparent;
        /* Hide border */
        pointer-events: none;
    }
}

/* Picks Dropdown Items */
.dropdown-menu {
    width: 320px !important;
}

.pick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.pick-item:last-child {
    border-bottom: none;
}

.pick-item:hover {
    background: var(--background-light);
}

.pick-image-wrapper {
    position: relative;
    width: 40px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--background-light);
    border: 1px solid var(--border-color);
}

.pick-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pick-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-bottom-left-radius: 4px;
    font-weight: bold;
    line-height: 1.2;
}

.pick-content {
    flex: 1;
    min-width: 0;
}

.pick-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.pick-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pick-item-no-img {
    padding-left: 20px;
}

/* Mobile Picks Styles with Truncation */
.mobile-picks-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.mobile-picks-item:active {
    background: var(--background-light);
}

.mobile-pick-image-wrapper {
    width: 30px;
    height: 40px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.mobile-pick-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-pick-content {
    flex: 1;
    min-width: 0;
    /* Ensures truncation works */
}

.mobile-pick-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.mobile-pick-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.mobile-pick-badge-inline {
    font-size: 0.6rem;
    background: var(--primary-color);
    color: white;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 6px;
    flex-shrink: 0;
}