/* ============================================
   HEADER STYLES - Theme Compatible
   ============================================ */

/* Header Container */
.header {
    background: linear-gradient(130deg, var(--theme-primary-dark, #1a3a4f), var(--theme-primary, #1f5068));
    color: var(--theme-text-inverse, white);
    padding: 0.2rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Logo Section */
.logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--theme-text-inverse, white);
}

.logo h1 i {
    margin-right: 8px;
    color: var(--theme-accent, #ff9f4a);
}

/* Right Side Controls */
.header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Language Selector */
.lang-selector {
    background: var(--theme-primary-light, #2a5a74);
    border-radius: 2rem;
    padding: 0.2rem 0.3rem;
    display: flex;
    gap: 0.3rem;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--theme-text-inverse, white);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--theme-accent, #ff9f4a);
    color: var(--theme-primary-dark, #1a3a4f);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 159, 74, 0.3);
}

/* Upload Area */
.upload-area {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: var(--theme-primary-light, #2a5a74);
    padding: 0.3rem 1rem;
    border-radius: 3rem;
}

#fileName {
    font-size: 0.7rem;
    color: var(--theme-text-inverse, rgba(255, 255, 255, 0.9));
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#fileName i {
    color: var(--theme-success, #44ff44);
    font-size: 0.7rem;
}

/* File Label Button */
.file-label {
    background: var(--theme-accent, #ff9f4a);
    color: var(--theme-primary-dark, #1a3a4f);
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.file-label:hover {
    background: var(--theme-accent-dark, #ffb86b);
    transform: translateY(-1px);
}

.file-label:active {
    transform: translateY(0px);
}

.file-label i {
    font-size: 0.7rem;
}

/* Hide default file input */
input[type="file"] {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header {
        padding: 0.8rem;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
    }
    
    .lang-selector {
        width: fit-content;
    }
    
    .upload-area {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .file-label {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    #fileName {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Theme Selector Styles */
.theme-selector {
    position: relative;
}

.theme-btn {
    background: var(--theme-primary-light, #2a5a74);
    border: none;
    color: var(--theme-text-inverse, white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--theme-accent, #ff9f4a);
    transform: rotate(15deg);
}

.theme-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: var(--theme-bgCard, white);
    border-radius: 1rem;
    box-shadow: var(--theme-shadow, 0 4px 12px rgba(0,0,0,0.1));
    min-width: 160px;
    display: none;
    z-index: 10000;
    border: 1px solid var(--theme-borderLight, #e2edf2);
    overflow: hidden;
}

.theme-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease;
}

.theme-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--theme-textPrimary, #1a3a4f);
}

.theme-option:hover {
    background: var(--theme-accent, #ff9f4a);
    color: var(--theme-text-inverse, white);
}

.theme-option i {
    width: 20px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Subtle pulse animation for file name when new data loads */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

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

#fileName i.fa-check-circle {
    animation: pulse 1s ease;
}

/* Hover effects */
.upload-area:hover {
    background: var(--theme-primary, #2a6a84);
    transition: background 0.2s ease;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header {
        background: var(--theme-primary-dark, #1a3a4f);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .lang-selector,
    .upload-area,
    .theme-selector {
        display: none;
    }
}