/* ============================================================================
   RebScrub (Rebreather Scrubber Logger): ONLY what is RebScrub's own. Written 2026-11-15.
   🔴 ONE SUITE: everything shared comes from the parent (as divesites.css and airlog.css say):
        /assets/css/toolbox.css   the site (tokens, type, .wrap, .btn, .notice)
        /assets/css/watb-app.css  every app (the app bar, the forms' rows, the footer band)
      Nothing here restates a token or restyles a shared part.
   🔴 THE BANDS (D7): OK green, Low yellow, Close orange ("amber"), Discard red: the colour is never the only sign, the
      word is always beside it (View::band), so a diver who can't tell yellow from orange still reads it.
   ========================================================================= */

/* RebScrub's accent: green (toolbox.css --accent-scrubber). */
body.app--rebscrub { --accent: var(--accent-scrubber); --tint: var(--accent-scrubber); }

/* The views' "button" is the suite's .btn, by another name (Qwen's views say "button"). */
.app--rebscrub .button {
  text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.5rem;
  border: 1px solid var(--base2); border-radius: 980px; background: var(--base2); color: var(--base03);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity var(--speed) var(--ease);
}
.app--rebscrub .button:hover { text-decoration: none; opacity: .85; }
/* A button that can't be used yet (ADD DIVE TIME with no fill): there, but plainly not now. */
.app--rebscrub .button[aria-disabled="true"] { background: transparent; color: var(--base1); border-color: rgba(88, 110, 117, .6); cursor: default; opacity: 1; }
.app--rebscrub .card__actions .button, .app--rebscrub .action .button { padding: .45rem 1rem; font-size: 14px; }

/* The logbook statement in every footer: AirLog's rule (airlog.css), the same, so it never runs to the window's edges. */
.appfoot .statement { max-width: 40rem; margin: 0 auto; padding: 1rem; font-size: .9rem; color: var(--text-muted); text-align: center; }

.lead { color: var(--base1); max-width: 40rem; }
.empty, .idle, .back { color: var(--base1); margin: 1.25rem 0 0; }
.hint { color: var(--text-muted, var(--base0)); font-size: 14px; }

/* The notices: a band's colour down the left (View::notice). */
.notice--ok     { border-left-color: var(--green); }
.notice--yellow { border-left-color: var(--yellow); }
.notice--amber  { border-left-color: var(--orange); }
.notice--red    { border-left-color: var(--red); }
.notice + .notice { margin-top: .6rem; }
.nudge { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.nudge p { flex-basis: 100%; margin: 0; }
.action { display: inline; margin: 0; }

/* The band's badge: the word, in its colour. */
.band { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
        border-radius: 980px; padding: .1rem .55rem; border: 1px solid currentColor; white-space: nowrap; }
.band--ok     { color: var(--green); }
.band--yellow { color: var(--yellow); }
.band--amber  { color: var(--orange); }
.band--red    { color: var(--base3, #fdf6e3); background: var(--red); border-color: var(--red); }

/* The landing screen: a card per fill being dived, then the three buttons (D20). */
.cards { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .9rem;
         grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { background: var(--bg-raised); border-radius: var(--radius-sm, 8px); padding: 1rem 1.1rem;
        border-left: 4px solid var(--green); display: flex; flex-direction: column; gap: .4rem; }
.card h2 { font-size: 1.15rem; margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.fill--yellow { border-left-color: var(--yellow); }
.fill--amber  { border-left-color: var(--orange); }
.fill--red    { border-left-color: var(--red); }
.meta { color: var(--base1); font-size: 14px; margin: 0; }
.minutes { display: flex; gap: 1.25rem; align-items: baseline; margin: .2rem 0; font-variant-numeric: tabular-nums; }
.minutes .left { font-size: 1.6rem; font-weight: 600; color: var(--base2); }
.minutes .used { color: var(--base1); }
.card .notice { padding: .55rem .75rem; font-size: 14px; margin: 0; }
.card__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1rem 0 0; padding: 0; list-style: none; }

/* VIEW LOGS: each fill, its dives as a table, its summary. */
section.fill { margin: 1.75rem 0 0; padding: 0 0 0 .9rem; border-left: 4px solid var(--green); }
section.fill h2 { font-size: 1.15rem; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: baseline; }
.state { color: var(--base1); margin: .2rem 0 0; }
.note { color: var(--base1); font-style: italic; margin: .2rem 0 0; }
.summary { font-weight: 600; color: var(--base2); margin: .5rem 0 0; }
/* A phone is narrower than the table: the table scrolls sideways, never the page. */
table.log { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: .6rem 0 0; font-size: 14px;
            font-variant-numeric: tabular-nums; }
table.log th, table.log td { text-align: left; padding: .4rem .6rem .4rem 0; border-bottom: 1px solid rgba(88, 110, 117, .3); white-space: nowrap; }
table.log th { color: var(--base1); font-weight: 500; }
table.log td:last-child { white-space: normal; }

/* The unit column wide enough for "minutes left" on one line (Paul, 2026-11-15: it wrapped in the suite's 4.75rem). */
.app--rebscrub .form .row { grid-template-columns: minmax(0, 1fr) 6rem 6.5rem; }
.app--rebscrub .form .row .unit { white-space: nowrap; }
@media (max-width: 420px) {
  .app--rebscrub .form .row { grid-template-columns: minmax(0, 1fr) 4.75rem 5.75rem; }
}

/* 🔴 THE RADIOS (the bailout's Yes/No; Paul, 2026-11-15: "same alignment problem for RADIO vs LABEL spacing"). The suite's
   text-input rule (.form .row input:not([type="checkbox"]), watb-app.css) reaches radios too and makes each 100% wide, so
   its label sat a column away. Here a radio is its own size, beside its word, and the question (the fieldset's legend,
   floated so it lays out as an ordinary item) takes the label column, as every other row's label does. */
.app--rebscrub .form fieldset.row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.5rem; margin: 0; min-width: 0;
                                    border: 0; border-top: 1px solid rgba(88, 110, 117, .3); padding: .55rem 0; }
.app--rebscrub .form fieldset.row legend { float: left; flex: 1 1 10rem; padding: 0; color: var(--base1); font-size: 15px; font-weight: 400; }
.app--rebscrub .form .row input[type="radio"] { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.app--rebscrub .form fieldset.row .error { flex-basis: 100%; }

/* The account's units on the setup screen: one line of text, the way to the account page under it. */
.app--rebscrub .form .fixed { margin: 0; padding: .55rem 0; color: var(--base2); font-size: 15px; }
.app--rebscrub .form .fixed .hint { display: block; margin-top: .2rem; }

/* The forms' own parts the suite doesn't have yet (DiveSites' rules, the same): a select, the yes/no, the note. */
.form .row select { grid-column: 2 / 4; min-width: 0; width: 100%; box-sizing: border-box; }
.form .row--error select { border-color: var(--yellow); border-width: 2px; }
.form .row--wide .choice { grid-column: 1 / -1; }
.form .fixed { color: var(--base1); font-size: 14px; }
.form textarea {
  font: inherit; font-size: 16px; color: var(--base2); background: var(--base02); width: 100%; box-sizing: border-box;
  border: 1px solid rgba(88, 110, 117, 0.6); border-radius: var(--radius-sm); padding: .5rem .6rem;
}
