/* Theme-Umschalter – separat vom Website-Design */
.theme-switcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2000;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.theme-switcher__toggle {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.theme-switcher__toggle:hover {
    transform: translateY(-2px);
    background: var(--color-dark);
}

.theme-switcher__toggle:focus-visible,
.theme-switcher__option:focus-visible,
.theme-switcher__close:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

.theme-switcher__panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    width: min(300px, calc(100vw - 36px));
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #fff;
    color: #333;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.theme-switcher__panel[hidden] { display: none; }

.theme-switcher__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.theme-switcher__title {
    margin: 0;
    font-size: 1rem;
    color: var(--color-primary);
}

.theme-switcher__close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--color-light-bg);
    color: var(--color-primary);
    cursor: pointer;
    font-size: 1.1rem;
}

.theme-switcher__grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-switcher__option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #333;
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 0.86rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.theme-switcher__option:hover {
    background: #f7f8f8;
    border-color: var(--color-accent);
}

.theme-switcher__option[aria-pressed="true"] {
    border-color: var(--color-primary);
    box-shadow: inset 0 0 0 1px var(--color-primary);
    font-weight: bold;
}

.theme-switcher__swatches {
    display: inline-flex;
    flex-shrink: 0;
}

.theme-switcher__swatch {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
}

.theme-switcher__swatch + .theme-switcher__swatch { margin-left: -4px; }

@media (max-width: 480px) {
    .theme-switcher { right: 12px; bottom: 12px; }
    .theme-switcher__panel { bottom: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .theme-switcher__toggle,
    .theme-switcher__option { transition: none; }
}
