/* Sound Editor: only the layout. Colors, type and every piece come from the FileFortress kit (ff-kit/). */
[hidden] { display: none !important; }
.app { padding: 14px 16px 24px; }
.app-top { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; }
.app-logo { width: 28px; height: 28px; color: var(--ff-brand); flex: none; }
.app-top p { margin: 2px 0 0; }
/* clean up | the sound | fades and save. Narrower: both setting columns on the right; phones: one column, the sound first */
.app-grid { display: grid; gap: 14px; align-items: start; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(270px, 320px);
  grid-template-areas: "left main right"; }
.app-left { grid-area: left; } .app-main { grid-area: main; } .app-right { grid-area: right; }
@media (max-width: 1180px) { .app-grid { grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); grid-template-areas: "main left" "main right"; } }
@media (max-width: 860px) { .app-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "left" "right"; } }
.app-col-title { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.app-col-title:not(:first-child) { margin-top: 6px; }
.app-hint-tight { margin-top: -8px; }
.app-two { grid-template-columns: 1fr 1fr; }
.app-tabs { display: flex; flex-wrap: wrap; }
.app-sub { display: grid; gap: 10px; padding: 2px 0 4px 14px; border-left: 2px solid var(--ff-line); margin-top: -6px; }
.app-drop { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 14px 16px; text-align: left; min-height: 0; }
.app-drop > .ff-icon { position: static; flex: none; }
.app-drop-text { display: grid; gap: 2px; min-width: 0; }
.app-drop-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-wave-bar { flex-wrap: wrap; gap: 10px; }
.app-time { font-family: var(--ff-mono); font-size: 14px; }
/* the waveform with the selection over it */
.app-wave { position: relative; height: 220px; border-radius: var(--ff-radius); border: 1px solid var(--ff-line); background: rgba(0, 0, 0, .25);
  overflow: hidden; touch-action: none; cursor: crosshair; user-select: none; }
.app-wave canvas { display: block; width: 100%; height: 100%; }
.app-wave-small { height: 90px; cursor: default; }
.app-sel { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .1); border-left: 2px solid var(--ff-brand); border-right: 2px solid var(--ff-brand); pointer-events: none; }
.app-handle { position: absolute; top: 0; bottom: 0; width: 14px; pointer-events: auto; cursor: ew-resize; }
.app-handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 6px; height: 34px; margin: -17px 0 0 -3px; border-radius: 3px; background: var(--ff-brand); }
.app-handle.is-a { left: -8px; } .app-handle.is-b { right: -8px; }
.app-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); pointer-events: none; display: none; }
.app-wave-hint { margin: 0; }
.app-help { margin-top: 4px; }
.app-foot { margin: 0; text-align: center; }

/* slider labels: the name on the left, the value on the right, on one line; pairs line up at the bottom */
.ff-field > .ff-label:has(> b[data-out]) { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; }
.ff-label > b[data-out] { font-variant-numeric: tabular-nums; }
.app-two:has(.ff-range) { align-items: end; }

/* a slider's number can be clicked to type a value (js/value-edit.js) */
.ff-label b.ff-value { cursor: text; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.ff-label b.ff-value:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .35); }
.ff-value-edit { width: 6ch; height: 20px; padding: 0 4px; border: 1px solid var(--ff-brand); border-radius: 5px; background: rgba(0, 0, 0, .35);
  color: inherit; font: inherit; text-align: right; -moz-appearance: textfield; }
.ff-value-edit::-webkit-outer-spin-button, .ff-value-edit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ff-value-edit:focus { outline: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }

/* the top row of the sound: the file on the left, undo / redo / reset on the right */
.app-top-row { gap: 10px; align-items: stretch; }
.app-top-row .app-drop { flex: 1; min-width: 0; }
.app-history { gap: 4px; flex: none; align-items: center; }
.app-sel-info { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* section titles with their own Reset on the right */
.app-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-col-head:not(:first-child) { margin-top: 6px; }
.app-col-head .app-col-title { margin: 0; }
.app-reset { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 0; border-radius: 7px; background: none; color: inherit;
  font: 600 11.5px/1 var(--ff-font); opacity: .75; cursor: pointer; }
.app-reset .ff-icon { width: 13px; height: 13px; }
.app-reset:hover:not(:disabled) { opacity: 1; background: rgba(255, 255, 255, .07); }
.app-reset:disabled { opacity: .3; cursor: default; }

/* Wide windows: one panel (a divider between its parts) that fits the window: no page scrolling. The waveform takes the
   height that's left; a setting column that's still too tall scrolls inside itself. Hints become tooltips. */
@media (min-width: 1181px) {
  html, body { height: 100%; overflow: hidden; }
  .app { height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; padding: 10px 16px 12px; }
  .app-top { flex: none; padding: 0 4px 8px; }
  .app-grid { flex: 1; min-height: 0; gap: 0; align-items: stretch; border: 1px solid var(--ff-card-border, var(--ff-line));
    border-radius: var(--ff-card-radius, var(--ff-radius)); background: var(--ff-card-bg, var(--ff-panel)); overflow: hidden; }
  .app-grid > .ff-card { border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .app-grid > .app-left { border-right: 1px solid var(--ff-line); }
  .app-grid > .app-right { border-left: 1px solid var(--ff-line); }
  .app-side { min-height: 0; max-height: 100%; overflow-y: auto; gap: 10px; scrollbar-width: thin; }
  .app-side .ff-hint { display: none; }
  .app-main { min-height: 0; display: flex; flex-direction: column; }
  .app-main > .app-wave-box:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
  .app-wave-main { flex: 1; height: auto; min-height: 140px; }
  .app-main .app-foot { margin-top: auto; font-size: 11px; }
}

/* play / pause / stop */
.app-pi { width: 15px; height: 15px; flex: none; }
.app-play { min-width: 96px; justify-content: center; }

/* the fades drawn over the selection (js: drawFades) */
.app-wave .app-fades { position: absolute; inset: 0; pointer-events: none; }
