/* Styles for the operator pages (sign-up, sign-in, link, checks list, new check, security). Prefix: op-. Tokens come from app.css. */

/* ---- sign-up, sign-in and link pages ---- */
.op-auth { max-width: 560px; margin: 0 auto; }
.op-auth > h1 { margin-bottom: .4em; }
.op-after { margin-top: 16px; }
.op-addr { overflow-wrap: anywhere; }
.op-fieldset, .op-sub { min-width: 0; }
.op-fieldset > legend, .op-sub > legend { font-weight: 650; }
.op-fieldset > .choice + .choice { margin-top: 8px; }
.op-sub { border: 0; padding: 0; margin: 18px 0 0; }
.op-sub > legend { padding: 0; margin-bottom: 6px; }
.op-choice-off { background: var(--surf2); border-style: dashed; }
.op-choice-off label, .op-choice-off strong { color: var(--mu); }
.op-choice-off input { cursor: not-allowed; }
.choice label { min-width: 0; overflow-wrap: anywhere; }
.choice label .small { display: block; margin-top: 2px; }
.op-reveal { margin-top: 16px; }
.op-reveal .field { margin-top: 12px; }
.op-err { color: var(--no); font-size: .9rem; margin-top: 6px; font-weight: 560; }
.op-err::before { content: "\26A0\FE0E  "; }
.op-indent { margin: 4px 0 0 32px; }
.stack > .card + .card { margin-top: var(--gap); }

/* ---- checks list: a table on wide screens, stacked cards on phones (same markup) ---- */
.op-head { margin-bottom: 4px; }
.op-head h1 { margin: 0; }
.op-why { margin: 0; }
.op-list { table-layout: auto; }
.op-list td.op-c-label { min-width: 11rem; font-weight: 600; overflow-wrap: anywhere; }
.op-list td.op-c-label a { font-weight: 650; }
.op-list td.op-c-year, .op-list td.op-c-created { white-space: nowrap; }
.op-list tbody tr:hover { background: var(--surf2); }
.op-badge { margin-left: 8px; font-weight: 600; }
.op-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.op-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 650; font-size: .875rem; border: 1.5px solid var(--bd); background: var(--surf2); color: var(--tx); white-space: nowrap; }
.op-shape { width: 15px; height: 15px; flex: 0 0 auto; }
.op-state-failed { color: var(--no); background: var(--nobg); border-color: var(--no); }
.op-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.op-pager p { margin: 0; }
.op-legend > summary { min-height: 42px; display: flex; align-items: center; }
.op-legend ul { margin: 8px 0 0; padding-left: 1.2rem; }
.op-legend li + li { margin-top: 4px; }

@media (max-width: 759px) {
  .op-list-wrap.table-wrap { border: 0; background: transparent; border-radius: 0; overflow: visible; }
  .op-list, .op-list tbody, .op-list tr, .op-list td { display: block; width: 100%; }
  .op-list thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .op-list tr { position: relative; background: var(--surf); border: 1px solid var(--bd2); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px 12px; margin-bottom: 12px; }
  .op-list tr:focus-within { outline: 3px solid var(--fc); outline-offset: 2px; }
  .op-list tbody tr:hover { background: var(--surf); }
  .op-list td { display: flex; align-items: baseline; gap: 10px; border: 0; padding: 4px 0; }
  .op-list td::before { content: attr(data-label); flex: 0 0 5.2rem; color: var(--mu); font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
  .op-list td > .op-v { flex: 1 1 0; min-width: 0; }
  .op-list td.op-c-label { display: block; min-width: 0; font-size: 1.05rem; padding-bottom: 6px; }
  .op-list td.op-c-label::before { content: none; }
  .op-list td.op-c-label a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
  .op-list td.op-c-year, .op-list td.op-c-created { white-space: normal; }
}

/* ---- new check ---- */
.op-newcheck { max-width: 820px; margin: 0 auto; }
.op-newcheck > h1 { margin-bottom: .3em; }
.op-pack { padding: 16px; }
.op-pack + .op-pack { margin-top: var(--gap); }
.op-pack h2 { font-size: 1.15rem; }
.op-pack-choice { margin-bottom: 12px; }
.op-pack-choice label { font-size: 1.05rem; }
.op-pack .kv { margin-bottom: 12px; }
.op-digest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.op-digest .btn, .op-secret-row .btn { white-space: nowrap; flex: 0 0 auto; }
.op-note { display: block; margin-top: 2px; }
.op-pack-details { margin-top: 8px; }
.op-pack-details > summary { min-height: 42px; display: flex; align-items: center; }
.op-pack-details h4 { margin: 18px 0 8px; }
.op-rules { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.op-rule { border: 1px solid var(--bd2); border-radius: 8px; padding: 12px; background: var(--surf2); }
.op-rule p { margin: 6px 0 0; }
.op-rule .quote { background: var(--surf); margin-top: 8px; }
.op-rule-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.op-limits { margin: 0 0 8px; padding-left: 1.2rem; }
.op-limits li + li { margin-top: 6px; }

/* ---- security ---- */
.op-security { max-width: 760px; margin: 0 auto; }
.op-steps { margin: 0; padding-left: 1.5rem; display: grid; gap: 22px; }
.op-steps > li::marker { font-weight: 700; }
.op-steps > li > p { margin: 8px 0; }
.op-secret-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
code.op-secret { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .06em; word-spacing: .45em; background: var(--surf2); border: 1px solid var(--bd2); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; user-select: all; }
input.op-code-input { font-family: var(--mono); font-size: 1.5rem; letter-spacing: .22em; text-align: center; width: 100%; max-width: 18rem; }
.op-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.op-codes li { background: var(--surf2); border: 1px solid var(--bd2); border-radius: 8px; padding: 10px 8px; text-align: center; }
.op-codes code { font-size: 1.05rem; letter-spacing: .06em; }
@media (min-width: 560px) { .op-codes { grid-template-columns: repeat(2, max-content); gap: 8px 16px; } }

/* touch targets of at least 42px for the controls this module adds or restyles */
.op-newcheck .btn.small, .op-security .btn.small { min-height: 42px; }
.op-security .link-btn { min-height: 42px; padding: 0 2px; }
.op-auth .check label, .op-newcheck .check label { padding: 8px 0; }
.op-auth .check input, .op-newcheck .check input { margin-top: 10px; }

/* ships against regulations (pages/overview.js): the pack columns are wider than the list's, and a pack id is long */
.ov-list td.ov-c-pack { min-width: 13rem; vertical-align: top; }
.ov-list td.ov-c-ship { vertical-align: top; }
.ov-year { max-width: 14rem; }
@media (max-width: 759px) {
  .ov-list td.ov-c-pack::before { flex: 0 0 8.5rem; overflow-wrap: anywhere; }
}

/* passkeys on the Security page */
.op-keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.op-key { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--surf2); border: 1px solid var(--bd2); border-radius: 8px; padding: 10px 12px; }
.op-key-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.op-key .btn { flex: 0 0 auto; }
