/* ============================================================================
   Theme switcher (floating bottom-right widget)
   ============================================================================ */
.theme-switcher {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.theme-switcher__toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--m-accent, #4272d7);
    color: #fff;
    border: 0;
    box-shadow: 0 8px 24px rgba(var(--m-accent-rgb, 66, 114, 215), 0.40);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.theme-switcher__toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(var(--m-accent-rgb, 66, 114, 215), 0.50);
}
.theme-switcher__toggle:active {
    transform: scale(0.95);
}
.theme-switcher__panel {
    background: var(--m-surface, #fff);
    border: 1px solid var(--m-border, #e4e7ec);
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    padding: 16px;
    width: 240px;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
    transform-origin: bottom right;
    font-family: var(--m-font, system-ui);
}
.theme-switcher.is-open .theme-switcher__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.theme-switcher__title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--m-text-faint, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
}
.theme-switcher__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.theme-switcher__swatch {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 120ms ease;
    position: relative;
}
.theme-switcher__swatch:hover { transform: scale(1.06); }
.theme-switcher__swatch-color {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.theme-switcher__swatch.is-active .theme-switcher__swatch-color {
    border-color: var(--m-text, #1f2937);
    box-shadow: 0 0 0 2px var(--m-surface, #fff), 0 0 0 4px var(--m-text, #1f2937);
}
.theme-switcher__swatch-label {
    display: block;
    text-align: center;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--m-text-muted, #475569);
    margin-top: 4px;
    text-transform: capitalize;
}
.theme-switcher__swatch.is-active .theme-switcher__swatch-label {
    color: var(--m-text, #1f2937);
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .theme-switcher { bottom: 12px; right: 12px; }
    .theme-switcher__panel { width: 220px; }
}


