/* ===========================================
   HEADER.CSS - Header Komponente
   =========================================== */

/* --- HEADER CONTAINER --- */
.header {
    background: var(--bg-elevated);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- LOGO --- */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

/* --- HEADER RIGHT (Actions) --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- THEME TOGGLE --- */
.theme-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.theme-toggle:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

/* --- NOTIFICATION BELL --- */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.notification-bell:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.bell-icon {
    width: 20px;
    height: 20px;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

/* --- LOGIN BUTTON --- */
.btn-login {
    background: var(--primary);
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

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

/* --- PROFILE BUTTON --- */
.btn-profile {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-profile:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.profile-icon {
    width: 20px;
    height: 20px;
}

/* --- LOCATION STATUS BAR --- */
.location-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.location-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.location-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.location-text {
    font-weight: 500;
}

/* --- USER BADGE --- */
.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-subtle);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 4px 10px;
    text-decoration: none;
    transition: var(--transition);
}

.user-badge:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.user-badge-level {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-badge-icon {
    font-size: 16px;
    line-height: 1;
}

.user-badge-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-badge-points {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

.user-badge:hover .user-badge-label,
.user-badge:hover .user-badge-points {
    color: #0f172a;
}

/* --- NOTIFICATION DROPDOWN --- */
.notification-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow: hidden;
    flex-direction: column;
}

.notification-dropdown[aria-hidden="false"] {
    display: flex;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.notification-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.mark-all-read:hover {
    background: var(--primary-subtle);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}

.notification-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* --- RESPONSIVE --- */
@media (max-width: 380px) {
    .logo-text {
        display: none;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .notification-dropdown {
        right: 10px;
        width: calc(100vw - 20px);
    }
}