/* === Theme Toggle Button === */
.theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-dark);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

/* Sun icon (shown in dark mode) */
.theme-toggle .sun-icon {
    display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle .moon-icon {
    display: block;
}

/* Show/hide icons based on theme */
[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* System preference detection for icons */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun-icon {
        display: block;
    }
    
    :root:not([data-theme="light"]) .theme-toggle .moon-icon {
        display: none;
    }
} 

/* === Right Header Icons Container === */
.header-icons-right {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px; /* Spacing between icons */
}

/* === Generic Header Icon Styling === */
.header-icon-link,
.notification-bell {
    position: relative;
    background: var(--card-bg);
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
}

.header-icon-link:hover,
.notification-bell:hover {
    transform: scale(1.1);
    text-decoration: none;
}

.header-icon-link svg,
.notification-bell svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-dark);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

[data-theme="dark"] .header-icon-link svg,
[data-theme="dark"] .notification-bell svg {
    stroke: var(--text-light);
}


/* === Admin Notification Bell (Specifics) === */
.admin-notification-wrapper {
    /* Wrapper is no longer needed for positioning */
    display: contents;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error-color, #ff4444);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    min-width: 20px;
    font-family: var(--font-body);
}

/* Animation for new notifications */
@keyframes notification-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-bell.has-new {
    animation: notification-pulse 2s infinite;
}



/* Adjust position for smaller screens */
@media (max-width: 768px) { 
    .theme-toggle {
        top: 15px;
        left: 15px;
    }
    
    .header-icons-right {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
} 


/* === City Switcher === */
.city-switcher-container {
    position: relative;
}

.city-switcher {
    background: var(--card-bg);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    min-width: 120px;
}

.city-switcher:hover {
    transform: scale(1.05);
}

.city-switcher .city-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.city-switcher .city-arrow {
    stroke: var(--text-dark);
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.city-switcher-container.open .city-arrow {
    transform: rotate(180deg);
}

/* City Options Dropdown */
.city-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    min-width: 120px;
}

.city-switcher-container.open .city-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.city-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.city-option:hover {
    background-color: var(--hover-bg);
}

.city-option span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Dark mode adjustments */
[data-theme="dark"] .city-switcher .city-text,
[data-theme="dark"] .city-option span {
    color: var(--text-light);
}

[data-theme="dark"] .city-switcher .city-arrow {
    stroke: var(--text-light);
}

/* City icon dark mode switching */
[data-theme="dark"] .city-icon-heidelberg,
[data-theme="dark"] .city-icon[alt="Heidelberg"] {
    content: url("../images/cities/Heidelberg_dark.e062df339c3c.webp");
}

[data-theme="dark"] .city-icon-mannheim,
[data-theme="dark"] .city-icon[alt="Mannheim"] {
    content: url("../images/cities/Mannheim_dark.43920396bb6e.webp");
}

[data-theme="dark"] .city-icon-all,
[data-theme="dark"] .city-icon[alt="Alle Städte"] {
    content: url("../images/cities/All_dark.11746a7989f2.webp");
}

/* City text abbreviations - hidden by default */
.city-text-abbr {
    display: none;
}

.city-text-full {
    display: inline;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .city-switcher {
        min-width: 70px;
        padding: 6px 8px;
        height: 36px;
        gap: 3px;
    }
    
    /* Show abbreviation on mobile instead of full name */
    .city-text-full {
        display: none;
    }
    
    .city-text-abbr {
        display: inline;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.3px;
    }
    
    .city-switcher .city-icon {
        width: 18px;
        height: 18px;
    }
    
    .city-switcher .city-arrow {
        width: 12px;
        height: 12px;
        margin-left: auto;
    }
    
    .city-options {
        min-width: 100px;
    }
}
