/* Navbar theme switcher. Tokens live in polish.css. */
.theme-switcher {
    margin-left: 1rem;
    display: flex;
    align-items: center;
    position: relative;
}

.theme-dropdown {
    position: relative;
}

.theme-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--cc-surface-95);
    border: 1px solid var(--cc-line-10);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cc-text);
    white-space: nowrap;
    min-width: 120px;
    justify-content: space-between;
}

.theme-dropdown-btn:hover {
    background: var(--cc-green-08);
    border-color: var(--cc-green-25);
    transform: translateY(-1px);
}

.theme-dropdown-btn:focus-visible {
    outline: 2px solid var(--cc-green-ink);
    outline-offset: 2px;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: var(--cc-muted);
}

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

.theme-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cc-paper);
    border: 1px solid var(--cc-line-15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    z-index: 1000;
    margin-top: 0.25rem;
    overflow: hidden;
}

.theme-dropdown.open .theme-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid var(--cc-line-05);
}

.theme-option:last-child {
    border-bottom: none;
}

.theme-option:hover {
    background: var(--cc-green-05);
    color: var(--cc-green-ink);
}

.theme-option.active {
    background: var(--cc-green-10);
    color: var(--cc-green-ink);
}

.theme-option.active .theme-option-name {
    font-weight: 600;
}

.theme-option-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.theme-option-name {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
}

.theme-option-desc {
    font-size: 0.75rem;
    color: var(--cc-muted);
    margin-top: 0.1rem;
}

.theme-check {
    color: var(--cc-green-ink);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-option.active .theme-check {
    opacity: 1;
}

.theme-option:focus-visible {
    outline: 2px solid var(--cc-green-ink);
    outline-offset: -2px;
    background: var(--cc-green-08);
}

/* Theme-specific styling */
.theme-modern .theme-dropdown-btn {
    background: var(--cc-green-10);
    border-color: var(--cc-green-20);
    color: var(--cc-green-ink);
}

.theme-classic .theme-dropdown-btn {
    background: var(--cc-grey-10);
    border-color: var(--cc-grey-20);
    color: var(--cc-muted);
}

/* Responsive design */
@media (max-width: 991.98px) {
    .theme-switcher {
        margin-left: 0.75rem;
        margin-top: 0.5rem;
    }

    .theme-dropdown-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        min-width: 110px;
    }

    .theme-option {
        padding: 0.6rem 0.8rem;
    }

    .theme-option-name {
        font-size: 0.8rem;
    }

    .theme-option-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .theme-switcher {
        order: -1;
        margin-left: 0;
        margin-right: 0.75rem;
        margin-top: 0.25rem;
    }

    .theme-dropdown-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
        min-width: 100px;
        gap: 0.4rem;
    }

    .theme-option {
        padding: 0.5rem 0.7rem;
        gap: 0.6rem;
    }

    .theme-option-name {
        font-size: 0.75rem;
    }
}

@media (hover: none) {
    .theme-option:hover {
        background: transparent;
        color: inherit;
    }
}
