/**
 * Navigation Component CSS
 * Game-style tier card design with light/dark mode support
 */

/* === NAVIGATION CARD CONTAINER === */
.navigation-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--nav-card-bg);
    border: 1px solid var(--nav-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 40px var(--nav-shadow);
    position: relative;
    overflow: visible;
    font-family: var(--font-primary);
}

/* Diagonal stripe pattern */
.navigation-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        var(--nav-stripe-color) 2px,
        var(--nav-stripe-color) 4px
    );
    opacity: 0.1;
    pointer-events: none;
}

/* === TOP ROW: TWO COLUMNS === */
.nav-top-row {
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* === USER SECTION (LEFT COLUMN) === */
.nav-user-section {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 20px;
    min-width: 0;
}

.nav-user-avatar {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    min-width: 70px;
    background: linear-gradient(135deg, var(--nav-accent), var(--nav-accent-light));
    border: 3px solid var(--nav-text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--nav-glow);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-user-avatar .cat-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
}

.nav-username {
    font-size: 24px;
    font-weight: 800;
    color: var(--nav-text-primary);
    line-height: 1.1;
    margin: 0 0 4px 0;
}

.nav-tier-name {
    font-size: 14px;
    color: var(--nav-tier-color);
    font-weight: 600;
    margin: 0;
    opacity: 0.9;
}

.nav-user-tier {
    font-size: 16px;
    color: var(--nav-tier-color);
    font-weight: 600;
    margin: 0 0 4px 0;
}

.nav-user-code {
    font-size: 14px;
    color: var(--nav-text-secondary);
    font-weight: 500;
    margin: 0;
}

/* === PROGRESS SECTION (RIGHT COLUMN) === */
.nav-progress-section {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    width: 100%;
}

.nav-progress-label {
    font-size: 12px;
    color: var(--nav-text-secondary);
    margin-bottom: 8px;
    text-align: left;
    font-weight: 500;
}

.nav-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--nav-progress-bg);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--nav-border-subtle);
    margin-bottom: 6px;
}

.nav-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nav-accent), var(--nav-accent-light));
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 0 8px var(--nav-glow);
}

.nav-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progress-shimmer 2s infinite;
}

.nav-progress-text {
    font-size: 11px;
    color: var(--nav-text-secondary);
    text-align: left;
    font-weight: 500;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === PROFILE SECTION === */
.nav-profile-section {
    margin-bottom: 20px;
}

.nav-profile-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-profile-bg);
    border: 1px solid var(--nav-border-subtle);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--nav-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-profile-toggle:hover {
    background: var(--nav-profile-hover);
    border-color: var(--nav-accent);
}

.nav-toggle-chevron {
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: transform 0.3s ease;
}

.chevron-line {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 3px solid var(--nav-text-secondary);
    transition: all 0.3s ease;
}

.nav-profile-toggle.expanded .nav-toggle-chevron {
    transform: rotate(180deg);
}

.nav-profile-toggle:hover .chevron-line {
    border-top-color: var(--nav-accent);
}

.nav-profile-content {
    margin-top: 12px;
    background: var(--nav-content-bg);
    border: 1px solid var(--nav-border-subtle);
    border-radius: 8px;
    padding: 16px;
}

.nav-profile-item {
    align-items: center;
    gap: 0;
    padding: 8px 0;
}

.nav-profile-item:not(:last-child) {
    border-bottom: 1px solid var(--nav-border-subtle);
}

.nav-profile-label {
    font-size: 13px;
    color: var(--nav-text-secondary);
    font-weight: 500;
}

.nav-profile-value {
    font-size: 13px;
    color: var(--nav-text-primary);
    font-weight: 600;
}

.nav-profile-value.complete {
    color: var(--status-success);
}

.nav-profile-value.incomplete {
    color: var(--status-warning);
}

/* === ACTION BUTTONS GRID === */
.nav-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nav-action-btn {
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    /* Let btn-gradient handle all the styling */
}

/* === LIGHT MODE VARIABLES === */
:root {
    --nav-card-bg: linear-gradient(135deg, #faf8f9 0%, #f2f0f0 50%, #e8e8e8 100%);
    --nav-border: #ff9eb5;
    --nav-border-subtle: rgba(255, 158, 181, 0.3);
    --nav-shadow: rgba(255, 158, 181, 0.15);
    --nav-stripe-color: #ff9eb5;
    
    --nav-tier-color: #ff9eb5;
    --nav-accent: #ff9eb5;
    --nav-accent-light: #ffb3c6;
    
    --nav-text-primary: #2a2a2a;
    --nav-text-secondary: #6c757d;
    
    --nav-glow: rgba(255, 158, 181, 0.4);
    --nav-tier-header-bg: rgba(255, 158, 181, 0.08);
    --nav-code-bg: rgba(255, 158, 181, 0.15);
    --nav-rate-bg: rgba(255, 158, 181, 0.12);
    --nav-progress-bg: rgba(255, 158, 181, 0.15);
    --nav-profile-bg: rgba(255, 158, 181, 0.08);
    --nav-profile-hover: rgba(255, 158, 181, 0.12);
    --nav-content-bg: rgba(255, 158, 181, 0.05);
    --nav-separator-color: #ff9eb5;
}

/* === DARK MODE VARIABLES === */
[data-theme="dark"] {
    --nav-card-bg: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1f1f1f 100%);
    --nav-border: #ffcd39;
    --nav-border-subtle: rgba(255, 205, 57, 0.3);
    --nav-shadow: rgba(0, 0, 0, 0.3);
    --nav-stripe-color: #ffcd39;
    
    --nav-tier-color: #ffcd39;
    --nav-accent: #ffcd39;
    --nav-accent-light: #ffd666;
    
    --nav-text-primary: #ffffff;
    --nav-text-secondary: #adb5bd;
    
    --nav-glow: rgba(255, 205, 57, 0.4);
    --nav-tier-header-bg: rgba(255, 205, 57, 0.08);
    --nav-code-bg: rgba(255, 205, 57, 0.15);
    --nav-rate-bg: rgba(255, 205, 57, 0.12);
    --nav-progress-bg: rgba(255, 205, 57, 0.15);
    --nav-profile-bg: rgba(255, 205, 57, 0.08);
    --nav-profile-hover: rgba(255, 205, 57, 0.12);
    --nav-content-bg: rgba(255, 205, 57, 0.05);
    --nav-separator-color: #ffcd39;
}

/* === THEMED GRADIENT SEPARATOR === */
.nav-dashboard-separator {
    width: 60%;
    height: 2px;
    margin: 20px auto;
    background: linear-gradient(90deg, transparent 0%, var(--nav-separator-color) 50%, transparent 100%);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 480px) {
    .navigation-card {
        margin: 0 16px;
        padding: 20px;
    }
    
    .nav-tier-level {
        font-size: 20px;
    }
    
    .nav-tier-icon {
        font-size: 28px;
    }
    
    .nav-actions-grid {
        gap: 8px;
    }
}

/* === TIER UPGRADE NOTIFICATION === */
.tier-upgrade-notification {
    position: relative;
    animation: tierUpgradeSlideIn 0.5s ease-out;
}

.tier-upgrade-icon {
    font-size: 24px;
    margin-left: 12px;
    animation: tierUpgradePulse 2s infinite;
}

.tier-upgrade-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 4px;
    padding: 4px;
    transition: color 0.2s ease;
}

.tier-upgrade-close:hover {
    color: var(--color-accent);
}

@keyframes tierUpgradeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tierUpgradePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
