/*
 * Radio Wunschbox – Formular im Frontend
 *
 * Farben kommen aus dem Theme: Schrift erbt ihre Farbe, Flächen bleiben
 * durchsichtig, Linien sind ein neutrales Grau. So sieht die Wunschbox auch
 * in einem selbst gebauten Theme richtig aus.
 */

.wb {
    --wb-line: rgba(128, 128, 128, .30);
    --wb-soft: rgba(128, 128, 128, .08);
    --wb-accent: var(--rs-accent, var(--accent, #2563eb));

    color: inherit;
    font-size: 15px;
    line-height: 1.55;
    max-width: 760px;
}

.wb * { box-sizing: border-box; }

.wb-title {
    margin: 0 0 6px;
    font-size: 1.25em;
    font-weight: 700;
    color: inherit;
}

.wb-intro {
    margin: 0 0 16px;
    opacity: .85;
}

.wb-note {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--wb-line);
    background: var(--wb-soft);
}

.wb-note-ok { border-left: 4px solid #16a34a; }
.wb-note-error { border-left: 4px solid #dc2626; }

.wb-form { display: block; }

.wb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.wb-row > .wb-field {
    flex: 1 1 220px;
    min-width: 0;
}

.wb-field { margin-bottom: 14px; }

.wb-field label {
    display: block;
    margin-bottom: 5px;
    font-size: .92em;
    font-weight: 600;
    opacity: .9;
}

.wb-req { color: #dc2626; }

.wb-field input,
.wb-field select,
.wb-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wb-line);
    border-radius: 9px;
    background: var(--wb-soft);
    color: inherit;
    font: inherit;
    font-size: 15px;
}

.wb-field textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.55;
}

.wb-field input:focus,
.wb-field select:focus,
.wb-field textarea:focus {
    outline: none;
    border-color: var(--wb-accent);
    box-shadow: 0 0 0 3px rgba(128, 128, 128, .18);
}

/* Falle für Formularroboter */
.wb-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.wb-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 4px;
}

.wb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 0;
    border-radius: 9px;
    background: var(--wb-accent);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.wb-btn:hover { filter: brightness(1.08); }

/* Themes färben Links oft in der Akzentfarbe (z. B. „.theme a") – dann stünde
   orange Schrift auf orangem Grund. Die Schaltfläche behält immer ihre Farben. */
.wb a.wb-btn,
.wb a.wb-btn:link,
.wb a.wb-btn:visited,
.wb a.wb-btn:hover,
.wb a.wb-btn:focus,
.wb a.wb-btn:active {
    background: var(--wb-accent) !important;
    color: #fff !important;
    text-decoration: none !important;
}
.wb-btn:focus-visible { outline: 3px solid rgba(128, 128, 128, .45); outline-offset: 2px; }

.wb-count {
    display: inline-block;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
    font-size: .85em;
    text-align: center;
}

.wb-privacy {
    margin: 0;
    font-size: .85em;
    opacity: .75;
}

/* Geschlossene Wunschbox */
.wb-offline {
    padding: 20px;
    border: 1px solid var(--wb-line);
    border-radius: 12px;
    background: var(--wb-soft);
    text-align: center;
}

.wb-offline-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.wb-offline-text { margin: 10px 0 0; }

/* Schaltfläche allein in einer Box */
.wb-monitor-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

/* Moderatoren-Bereich: Wunschbox an und aus */
.wb-state {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: 100%;
}

.wb-state-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .14);
    color: #16a34a;
    font-size: .9em;
    font-weight: 700;
}

.wb-state-pill i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}

.wb-monitor-link.is-closed .wb-state-pill {
    background: rgba(220, 38, 38, .14);
    color: #dc2626;
}

.wb-state-form { margin: 0; }

.wb-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--wb-line);
    border-radius: 999px;
    background: var(--wb-soft);
    color: inherit;
    font: inherit;
    font-size: .9em;
    font-weight: 600;
    cursor: pointer;
}

.wb-switch:focus-visible { outline: 2px solid var(--wb-accent); outline-offset: 2px; }

.wb-switch-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #9aa3b2;
    transition: background .2s;
}

.wb-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s;
}

.wb-switch.is-on .wb-switch-track { background: #16a34a; }
.wb-switch.is-on .wb-switch-knob { transform: translateX(18px); }

.wb-state-info {
    margin: -2px 0 2px;
    font-size: .82em;
    opacity: .7;
}

@media (max-width: 520px) {
    .wb-row { gap: 0; }
    .wb-row > .wb-field { flex: 1 1 100%; }
}
