/* Montaro Palette Switcher — floating widget
 *
 * Sits bottom LEFT: Solvent's back-to-top button occupies the bottom right
 * (.qodef-back-to-top-icon), and two stacked round buttons in the same
 * corner would fight each other.
 *
 * Deliberately neutral: the widget must not sit inside the palette it is
 * switching, otherwise it changes appearance with every click and stops
 * being a stable control.
 *
 * @package Montaro_Palette_Switcher
 */

.mtr-ps {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.mtr-ps[hidden] { display: none; }

/* Toggle */

.mtr-ps__toggle {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: #1B2430;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease;
}

.mtr-ps__toggle:hover { transform: scale(1.06); }

.mtr-ps__toggle-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    /* Repainted by switcher.js to the active palette. The conic gradient is
       only the fallback before JS runs. */
    background: conic-gradient(#1F6FA8, #9A5423, #E9A74E, #1F6FA8);
}

/* Panel */

.mtr-ps__panel {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    min-width: 168px;
    /* Widget-Schrift bleibt systemeigen, auch wenn die Font-Vorschau läuft */
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

.mtr-ps__panel * {
    font-family: inherit !important;
}

.mtr-ps.is-open .mtr-ps__panel { display: flex; }

.mtr-ps__option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.mtr-ps__option:hover  { background: #F1F3F5; }
.mtr-ps__option.is-active {
    border-color: #C9CED3;
    background: #F1F3F5;
}

.mtr-ps__swatch {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    flex: 0 0 auto;
}

.mtr-ps__swatch i {
    display: block;
    width: 14px;
    height: 22px;
}

.mtr-ps__label {
    font-size: 13px;
    line-height: 1.2;
    color: #1B2430;
    white-space: nowrap;
}

/* Admin section — font preview */

.mtr-ps__section {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #E3E6E9;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mtr-ps__section-title {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7A828A;
}

.mtr-ps__fontrow {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mtr-ps__fontlabel {
    font-size: 11px;
    color: #7A828A;
}

.mtr-ps__fontselect {
    width: 100%;
    max-width: 230px;
    padding: 6px 8px;
    font-size: 13px;
    color: #1B2430;
    border: 1px solid #C9CED3;
    border-radius: 6px;
    background: #FFFFFF;
}

.mtr-ps__fontnote {
    font-size: 11px;
    line-height: 1.35;
    color: #7A828A;
    max-width: 230px;
}

/* Respect reduced motion */

@media (prefers-reduced-motion: reduce) {
    .mtr-ps__toggle { transition: none; }
    .mtr-ps__toggle:hover { transform: none; }
}
