/*
  adverb2.css
  ADverb2 — Audio Damage, Inc.

  The page is only a frame for the panel: the panel itself is drawn entirely
  on the canvas, in the plugin's own pX grid.
*/

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #1E1E23;
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

#stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

#unit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#panel {
    display: block;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 4px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

/* --- toolbar above the panel ------------------------------------------- */

#toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.6rem;
    align-items: center;
    padding: 0 0 0.55rem;
    color: #f0efea;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.picker-label {
    color: #98999d;
    text-transform: uppercase;
    white-space: nowrap;
}

.picker-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    min-width: 11rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid #3a3a3e;
    border-radius: 3px;
    background: #141414;
    color: #f0efea;
    font: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 120ms ease;
}

.picker-button:hover,
.picker.open .picker-button {
    border-color: #b41018;
}

.picker-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #98999d;
    flex: none;
}

.picker-list {
    position: absolute;
    top: calc(100% + 3px);
    left: auto;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    min-width: 11rem;
    max-height: 17rem;
    overflow-y: auto;
    background: #141414;
    border: 1px solid #3a3a3e;
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.picker-item {
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    color: #f0efea;
}

.picker-item:hover { background: #26262a; }

.picker-item.selected {
    color: #b41018;
    background: rgba(180, 16, 24, 0.15);
}

/* --- transport --------------------------------------------------------- */

.transport {
    appearance: none;
    border: 1px solid #3a3a3e;
    border-radius: 3px;
    padding: 0.4rem 1.5rem;
    background: #141414;
    color: #f0efea;
    font: inherit;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: border-color 120ms ease, color 120ms ease;
}

.transport:hover { border-color: #0294D8; }
.transport.on { color: #f0efea; border-color: #3a3a3e; }

/* --- start card --------------------------------------------------------- */
/* Browsers will not start audio without a gesture. No dark overlay: the
   panel shows through untouched, and a rounded card in the lower middle
   carries the start control (per CR 2026-08-03). */

#cover {
    position: absolute;
    inset: 0;
    pointer-events: none;      /* only the card catches clicks */
    transition: opacity 220ms ease;
    z-index: 10;
}

#cover.hidden {
    opacity: 0;
}

.cover-inner {
    pointer-events: auto;
    position: absolute;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem 0.55rem 1rem;
    background: #141414;
    border: 1px solid #3a3a3e;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    color: #f0efea;
    text-align: left;
    white-space: nowrap;
}

#cover.hidden .cover-inner {
    pointer-events: none;
}

.cover-text h1 {
    margin: 0;
    font-size: clamp(0.85rem, 1.75vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.cover-text p {
    margin: 0.1rem 0 0;
    font-size: clamp(0.55rem, 0.9vw, 0.6rem);
    line-height: 1.3;
    color: #98999d;
    letter-spacing: 0.04em;
}

/* iPhone only, unhidden from main.js: the ring/silent switch mutes web audio */
.cover-text .cover-silent {
    font-size: 0.62rem;
    color: #c24444;
}

#start {
    appearance: none;
    border: 0;
    border-radius: 2rem;
    padding: 0.45rem 0.75rem;
    background: #0294D8;
    color: #f0efea;
    font: inherit;
    font-size: 0.65rem;
    line-height: 1;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 140ms ease;
}

#start:hover { background: #2AABE8; }
#start:disabled { background: #55585c; cursor: default; }

/* --- preset stepper ----------------------------------------------------- */
/* Sits immediately right of the preset dropdown, as the arrows do on the
   plugin's preset strip. */

.stepper {
    display: flex;
    gap: 2px;
    margin-left: -1.1rem;   /* pull in tight against the dropdown */
}

.stepper button {
    appearance: none;
    border: 1px solid #3a3a3e;
    border-radius: 3px;
    padding: 0.36rem 0.5rem;
    background: #141414;
    color: #98999d;
    font-size: 0.62rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 120ms ease, color 120ms ease;
}

.stepper button:hover { border-color: #b41018; color: #f0efea; }
.stepper button:disabled { opacity: 0.4; cursor: default; border-color: #3a3a3e; color: #98999d; }
