/* ─────────────────────────────────────────────────────────────────────────────
   Toggle switch padrão (iOS-style) + texto contextual à direita.
   Uso típico:
     <label class="wt-toggle-row">
       <input type="checkbox" class="wt-toggle-input" />
       <span class="wt-toggle-switch"></span>
       <span class="wt-toggle-text">
         <span class="wt-toggle-title">…</span>
         <span class="wt-toggle-hint">…</span>
       </span>
     </label>
───────────────────────────────────────────────────────────────────────────── */

.wt-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.wt-toggle-row:hover {
    border-color: color-mix(in oklch, var(--wt-primary) 35%, var(--wt-border));
}

/* The native checkbox is visually hidden; the .wt-toggle-switch element does the rendering. */
.wt-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.wt-toggle-switch {
    position: relative;
    flex-shrink: 0;
    width: 38px;
    height: 22px;
    margin-top: 1px;
    background: var(--wt-bg-3);
    border: 1px solid var(--wt-border);
    border-radius: 999px;
    transition: background 0.18s, border-color 0.18s;
}

.wt-toggle-switch::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--wt-fg-3);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.18s;
}

.wt-toggle-input:checked ~ .wt-toggle-switch {
    background: var(--wt-primary);
    border-color: var(--wt-primary);
}

.wt-toggle-input:checked ~ .wt-toggle-switch::before {
    background: white;
    transform: translateX(16px);
}

.wt-toggle-input:focus-visible ~ .wt-toggle-switch {
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--wt-primary) 25%, transparent);
}

.wt-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.wt-toggle-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--wt-fg);
    line-height: 1.3;
}

.wt-toggle-subtitle {
    font-weight: 500;
}

.wt-toggle-hint {
    display: block;
    font-size: 11.5px;
    color: var(--wt-fg-3);
    line-height: 1.5;
}
