/* paddle-ui.css
   The shared on-screen paddle dock (paddle-ui.js) — an in-flow block inside
   each app's #paddle-dock-slot, directly below the playing/content area.
   Self-contained palette in the cwchat family — the apps' own variable sets
   differ, so the dock carries its colors and blends with every dark
   workspace. */

.paddle-dock {
    --pd-panel: #242a34;
    --pd-panel-soft: #20262f;
    --pd-line: #39424f;
    --pd-line-soft: #303844;
    --pd-text: #edf1f6;
    --pd-text-soft: #c3ccd7;
    --pd-muted: #8f9baa;
    --pd-blue: #6bc7ff;
    --pd-blue-strong: #2faeea;
    --pd-blue-soft: rgba(107, 199, 255, .16);
    --pd-mint: #72dea7;
    max-width: 720px;
    margin: 12px auto;
    background: var(--pd-panel);
    border: 1px solid var(--pd-line);
    border-radius: 12px;
    color: var(--pd-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

/* The hidden attribute must beat the explicit display values below
   (display:flex on .pd-strip would otherwise override it). */
.paddle-dock[hidden],
.pd-strip[hidden],
.pd-body[hidden] { display: none; }

.pd-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.pd-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pd-line);
    flex: none;
}

.pd-led.lit { background: var(--pd-mint); }

.pd-strip-label {
    flex: 1;
    color: var(--pd-text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-toggle {
    background: none;
    border: none;
    color: var(--pd-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}

.pd-body { padding: 8px 10px 10px; }

.pd-zones {
    display: flex;
    gap: 8px;
    height: 96px;
}

.pd-zones.pd-swapped { flex-direction: row-reverse; }

.pd-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: var(--pd-panel-soft);
    border: 1px solid var(--pd-line);
    border-radius: 10px;
    cursor: pointer;
    touch-action: none;
}

.pd-zone .pd-zone-name {
    font-size: 15px;
    color: var(--pd-text-soft);
    letter-spacing: .04em;
}

.pd-zone .pd-zone-hint {
    font-size: 11px;
    color: var(--pd-muted);
    text-align: center;
    padding: 0 6px;
}

.pd-zone.lit {
    background: var(--pd-blue-soft);
    border-color: var(--pd-blue-strong);
}

.pd-zone.lit .pd-zone-name { color: var(--pd-blue); }

.pd-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 8px;
    color: var(--pd-text-soft);
}

.pd-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-field > label {
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pd-muted);
}

.pd-settings select,
.pd-settings input[type="number"],
.pd-settings button {
    background: var(--pd-panel-soft);
    color: var(--pd-text);
    border: 1px solid var(--pd-line);
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 12px;
    font-family: inherit;
}

.pd-settings button { cursor: pointer; }

.pd-settings button:hover { border-color: var(--pd-blue-strong); }

.pd-wpm-input { width: 44px; text-align: center; }

.pd-tone-input { width: 56px; text-align: center; }

.pd-settings input[type="range"] {
    width: 72px;
    accent-color: var(--pd-blue-strong);
}

.pd-settings input[type="checkbox"] {
    accent-color: var(--pd-blue-strong);
    width: 14px;
    height: 14px;
    margin: 0 4px 0 0;
    vertical-align: -2px;
}

.pd-step {
    min-width: 24px;
}

/* The key readout is status text, not a control — "Redefine…" beside it is
   what gets clicked. Dimmed while the app has the bindings muted, so the
   note that comes with it reads as the reason and not as decoration. */
.pd-keys-label { color: var(--pd-text-soft); }

.pd-keys-label.pd-keys-muted { color: var(--pd-muted); }

/* WinKey session row on the collapsed strip (mode + WPM). The strip stays
   a monitor for other hardware links; these controls only show for WinKey. */
.pd-winkey {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.pd-winkey[hidden] { display: none; }
.pd-winkey label { color: var(--pd-text-soft); }
.pd-wk-wpm { min-width: 2ch; text-align: center; }

@media (max-width: 640px), (pointer: coarse) {
    .paddle-dock { margin: 10px 6px; }
    .pd-zones { height: 128px; }
    .pd-zone .pd-zone-hint { display: none; }
}
