.theme-switcher-slot {
    position: relative;
    display: flex;
    align-items: center;
}

.theme-switcher-dropdown {
    position: relative;
}

.theme-switcher-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 50px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    background: var(--surface, rgba(255, 255, 255, 0.08));
    color: var(--text, #fff);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.theme-switcher-btn:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
}

.theme-switcher-name {
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-actions .theme-switcher-name,
.navbar-actions .theme-switcher-name {
    display: none;
}

@media (min-width: 1100px) {
    .navbar-actions .theme-switcher-name {
        display: inline;
    }
}

.theme-switcher-chevron {
    font-size: 0.7rem;
    opacity: 0.75;
    transition: transform 0.2s;
}

.theme-switcher-dropdown.open .theme-switcher-chevron {
    transform: rotate(180deg);
}

.theme-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.theme-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 240px;
    max-height: 320px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    background: rgba(var(--bg-rgb), 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 1200;
}

.theme-menu-head {
    padding: 10px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light, #cbd5e1);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}

.theme-menu-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.theme-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text, #fff);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.theme-option:hover,
.theme-option.active {
    background: rgba(var(--primary-rgb), 0.12);
}

.theme-option-label {
    flex: 1;
    font-weight: 500;
}

.theme-option .check-icon {
    color: var(--primary);
    font-size: 0.75rem;
}

@media (max-width: 991px) {
    .navbar-actions .theme-menu {
        right: 0;
        left: auto;
        width: min(240px, calc(100vw - 24px));
    }
}

[data-theme="highcontrast"] .theme-menu {
    background: var(--bg);
    color: var(--text);
}

[data-theme="highcontrast"] .theme-option {
    color: var(--text);
}
