/* ── Admin Subdomains page, in the poster face ──
 * @file admin-subdomains.css
 * @author Jouni Miikki
 * SPDX-License-Identifier: MIT
 * @description The operator's subdomain page (design canvas "AIMEAT Admin Subdomains"): the search
 *   and the four chips that make a hundred and fifty addresses findable, the row with its state
 *   chip and its quiet delete, the add form with what it refuses, and the empty state. The
 *   sections, the numeral strip, the doors and the slab come from admin.css and organism.css;
 *   only what this page adds lives here. Every value is a theme.css token.
 * @version-history
 *   v1.1.0 -- 2026-09-13 -- Compose ink row boundaries from poster.css.
 *   v1.0.0 — 2026-09-12 — Initial.
 */

.adm-subs-lead { margin: 0 0 18px; font-size: .95rem; line-height: 1.6; color: var(--text); max-width: 92ch; }
.adm-subs .og-strip { margin-top: 0; margin-bottom: 1.5rem; }
.adm-subs .og-strip small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }

/* The search and the filters sit on one line above the list. */
.adm-subs-tools { display: flex; align-items: flex-end; gap: 28px; }
.adm-subs-find { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; border-bottom: 3px solid var(--text); padding: 4px 2px 6px; }
.adm-subs-find:focus-within { border-bottom-color: var(--accent); }
.adm .adm-subs-find input[type="text"] { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; background: none; padding: 0; font: inherit; font-size: .95rem; font-weight: 600; color: var(--text); outline: none; box-shadow: none; }
.adm .adm-subs-find input[type="text"]::placeholder { color: var(--text-dim); font-weight: 600; }
.adm-subs-find svg { width: 16px; height: 16px; flex: none; stroke: var(--text); fill: none; stroke-width: 2.5; }
.adm-subs-chips { display: flex; gap: 8px; align-items: center; padding-bottom: 6px; flex-wrap: wrap; }
.adm .adm-subs-chip { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; padding: 3px 10px; border: 2px solid var(--border); border-radius: 0; background: none; color: var(--text-dim); cursor: pointer; }
.adm .adm-subs-chip:hover { border-color: var(--text); color: var(--text); }
.adm .adm-subs-chip.on { background: var(--sun); border-color: var(--text); color: var(--on-sun); box-shadow: 0 2px 0 var(--text); }

/* One mapping: the address, where it points, when it was made, and its two controls. */
.adm-subs-rows { border-top: 2px solid var(--text); margin-top: 14px; }
.adm-subs-row { display: grid; grid-template-columns: 260px minmax(0, 1fr) 190px 108px; gap: 0 20px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.adm-subs-row:hover { background: var(--bg-surface); }
.adm-subs-name { font-family: var(--font-mono); font-size: .92rem; font-weight: 500; color: var(--text); overflow-wrap: anywhere; text-decoration: none; }
.adm-subs-name:hover { color: var(--accent); }
.adm-subs-name em { font-style: normal; color: var(--text-dim); }
.adm-subs-target { font-family: var(--font-mono); font-size: .78rem; color: var(--text); overflow-wrap: anywhere; }
.adm-subs-target i { font-style: normal; color: var(--text-dim); }
.adm-subs-who { display: block; font-family: var(--font); font-size: .72rem; line-height: 1.4; color: var(--accent); margin-top: 3px; }
.adm-subs-made { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); text-align: right; }
.adm-subs-acts { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
/* The state chip IS the switch: pressing it turns the address off and on. */
.adm .adm-subs-state { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; text-transform: uppercase; padding: 2px 8px; border: 2px solid var(--text); border-radius: 0; background: var(--sun); color: var(--on-sun); cursor: pointer; }
.adm .adm-subs-state.is-off { background: none; border-color: var(--border); color: var(--text-dim); }
.adm .adm-subs-state:hover { border-color: var(--text); }
/* Delete is a word, not a red button: there is one of these on every row. */
.adm .adm-subs-kill { background: none; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; padding: 0 0 1px; font: inherit; font-size: .78rem; font-weight: 700; color: var(--text-dim); cursor: pointer; }
.adm .adm-subs-kill:hover { color: var(--accent); border-bottom-color: var(--accent); }
.adm-subs-row.is-off .adm-subs-name, .adm-subs-row.is-off .adm-subs-target { color: var(--text-dim); }
.adm-subs-kind { display: inline-block; white-space: nowrap; font-family: var(--font-mono); font-size: .66rem; font-weight: 500; text-transform: uppercase; padding: 1px 7px; background: var(--bg-surface); color: var(--text-dim); margin-left: 8px; }
.adm-subs-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 12px 2px 0; font-size: .78rem; color: var(--text-dim); }
.adm-subs-foot .adm-subs-sort { font-family: var(--font-mono); font-size: .72rem; }

/* The form: the address, what it serves, the target, and what you are making. */
.adm-subs-two { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 0 48px; align-items: start; }
.adm-subs-lbl { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 7px; }
.adm-subs-field + .adm-subs-field { margin-top: 26px; }
.adm-subs-fld { display: flex; align-items: baseline; gap: 6px; border-bottom: 3px solid var(--text); padding: 4px 2px 6px; }
.adm-subs-fld:focus-within { border-bottom-color: var(--accent); }
.adm .adm-subs-fld input[type="text"] { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; background: none; padding: 0; font-family: var(--font-mono); font-size: .95rem; font-weight: 500; color: var(--text); outline: none; box-shadow: none; }
.adm .adm-subs-fld input[type="text"]::placeholder { color: var(--text-dim); }
.adm-subs-suffix { font-family: var(--font-mono); font-size: .95rem; color: var(--text-dim); white-space: nowrap; }
.adm-subs-hint { margin: .55rem 0 0; font-size: .78rem; line-height: 1.5; color: var(--text-dim); }
.adm-subs-err { margin: .55rem 0 0; font-size: .82rem; line-height: 1.5; font-weight: 600; color: var(--accent); }
.adm-subs-prev { border: 2px solid var(--text); background: var(--bg-surface); padding: 14px 16px; margin-top: 26px; }
.adm-subs-prev-l { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 8px; }
.adm-subs-prev-u { font-family: var(--font-mono); font-size: .95rem; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.adm-subs-prev-a { display: block; font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); margin-top: 6px; overflow-wrap: anywhere; }
.adm-subs-act { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }

/* What the door refuses, in the words the route itself answers with. */
.adm-subs-rule { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .84rem; line-height: 1.5; color: var(--text); }
.adm-subs-rule:last-child { border-bottom: 0; }
.adm-subs-rule b { display: block; font-weight: 700; margin-bottom: 3px; }
.adm-subs-kept { font-family: var(--font-mono); font-size: .74rem; line-height: 1.7; color: var(--text-dim); overflow-wrap: anywhere; }

/* A fresh node has none of these, and the empty state says what one would be for. */
.adm-subs-empty { border-bottom: 3px solid var(--text); padding: 40px 0 44px; text-align: center; }
.adm-subs-empty h3 { margin: 0 0 12px; font-family: var(--font-poster); font-weight: var(--font-poster-weight, 400); font-size: 1.9rem; line-height: var(--font-poster-leading, 1); letter-spacing: var(--font-poster-tracking, .01em); text-transform: uppercase; color: var(--text); }
.adm-subs-empty p { margin: 0 auto 26px; max-width: 52ch; font-size: .95rem; line-height: 1.6; color: var(--text-dim); }
.adm-subs-empty code { font-family: var(--font-mono); font-size: .82rem; color: var(--text); }
.adm-subs-note { margin: 18px 0 0; font-size: .78rem; line-height: 1.5; color: var(--text-dim); }

/* The delete dialog's body: what is going, and the name to type. */
.adm-subs-ask { display: block; }
.adm-subs-ask .adm-subs-lbl { display: block; margin-top: 18px; }
.adm-subs-ask-what { display: block; border: 2px solid var(--text); background: var(--bg-surface); padding: 11px 13px; font-family: var(--font-mono); font-size: .9rem; font-weight: 500; }
.adm-subs-ask-what em { display: block; font-style: normal; font-size: .76rem; color: var(--text-dim); margin-top: 5px; }

@media (max-width: 1100px) {
  .adm-subs-two { grid-template-columns: 1fr; gap: 30px 0; }
}
@media (max-width: 860px) {
  .adm-subs-tools { flex-direction: column; align-items: stretch; gap: 12px; }
  .adm-subs-chips { padding-bottom: 0; }
  /* The row stacks: the address and its state on one line, where it points under them, then the
     date and the delete word. Four columns at 390 gave the address six characters. */
  .adm-subs-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
  .adm-subs-target { grid-column: 1 / -1; }
  .adm-subs-made { grid-column: 1; text-align: left; }
  .adm-subs-acts { grid-column: 2; justify-content: flex-end; }
  .adm-subs .og-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .adm-subs .og-strip > div { padding: .8rem 0; border-right: 0; }
  .adm-subs .og-strip > div:nth-child(odd) { border-right: 1px solid var(--border); padding-right: .9rem; }
  .adm-subs .og-strip > div:nth-child(even) { padding-left: .9rem; }
  .adm-subs .og-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
