/**
 * @file extensions-poster.css
 * @author Jouni Miikki
 * SPDX-License-Identifier: MIT
 * @description The Extensions page in the poster face (ex- prefix; design canvas "AIMEAT
 *   Laajennukset-sivu", third round). The shared parts come from organism.css's og- rules; this
 *   file carries what the page adds: the two lists (a status dot, the name, what it does, who uses
 *   it, the doors), the panel that opens under a row with its action table and test box, the filter
 *   chips and the search line, and the install form.
 *   NOTE: this file must be linked in spa.html.
 * @version-history
 *   v1.0.0 — 2026-09-03 — Initial.
 */

.og-ext .og-chip--coral { border-color: var(--accent); color: var(--accent); }
.og-ext .og-doors > a { text-decoration: none; }
.og-ext .og-door:disabled { opacity: .5; cursor: default; }
.og-ext .og-mast-actions .og-slab { text-decoration: none; }
.ex-hint { margin: .7rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--text-dim); }
.ex-empty { margin: 0; padding: .3rem 0 .6rem; font-size: .95rem; line-height: 1.55; font-weight: 600; color: var(--text-dim); }
.ex-empty b { color: var(--text); font-weight: 800; }
.ex-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* ── The status dot: green when the extension or cortex is active, grey when it is switched off ── */
.ex-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--text-dim); margin-right: .45rem; vertical-align: middle; }
.ex-dot.is-on { background: var(--success-fg); }

/* ── Filters and the search line ───────────────────────────────────────────────────────────── */
.ex-facets { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0 .3rem; }
.ex-facet { font-family: var(--font-mono); font-size: .72rem; padding: .15rem .55rem; border: 1px solid var(--text); background: var(--card-bg); color: var(--text); cursor: pointer; line-height: 1.5; }
.ex-facet em { font-style: normal; color: var(--text-dim); margin-left: .35rem; }
.ex-facet.is-on { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.ex-facet.is-on em { color: var(--on-sun); opacity: .75; }
.ex-search { display: flex; align-items: center; gap: 1rem; margin: .8rem 0 .6rem; }
.ex-search .og-input { flex: 1 1 auto; min-width: 0; }
.ex-search small { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); white-space: nowrap; }

/* ── The lists: name, what it does, who uses it, the doors; a panel under one row ──────────── */
.ex-pl { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(9rem, .9fr) auto; gap: 0 .9rem; align-items: stretch; }
.ex-p { display: contents; }
.ex-p > div { padding: .7rem 0; border-bottom: 1px solid var(--border); min-width: 0; display: grid; align-content: center; }
.ex-p--head > div { padding: 0 0 .35rem; border-bottom: 0; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ex-p.is-open > div { border-bottom: 0; }
.ex-p > .ex-nm { display: block; align-self: center; font-size: .95rem; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.ex-nm small { display: block; margin-top: .15rem; font-family: var(--font-mono); font-size: .7rem; font-weight: 400; color: var(--text-dim); }
.ex-tag { display: inline-block; margin-left: .45rem; padding: .05rem .4rem; border: 1px solid var(--border); font-family: var(--font-mono); font-size: .66rem; font-weight: 500; color: var(--text-dim); vertical-align: middle; }
.ex-p > .ex-ds { display: block; align-self: center; font-size: .85rem; line-height: 1.5; color: var(--text-dim); }
.ex-p > .ex-me { display: block; align-self: center; font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; color: var(--text-dim); overflow-wrap: anywhere; }
.ex-me b { display: block; font-weight: 700; color: var(--text); }
.ex-me b.is-dim { color: var(--text-dim); }
.ex-me small { display: block; color: var(--text-dim); }
.ex-p > .ex-go { display: flex; justify-content: flex-end; align-items: center; gap: .8rem; white-space: nowrap; }
.ex-go .og-door { font-size: .72rem; text-decoration: none; }
.ex-p > .ex-open { grid-column: 1 / -1; display: block; margin: 0 0 .4rem; padding: 1rem 1.2rem 1.1rem; border: 3px solid var(--text); box-shadow: 8px 8px 0 var(--sun); background: var(--card-bg); font-size: .9rem; line-height: 1.55; color: var(--text); }
.ex-lead { margin: 0 0 .6rem; font-size: .95rem; line-height: 1.55; }
.ex-open .og-label { display: block; margin: .8rem 0 .2rem; }
.ex-open code { font-family: var(--font-mono); font-size: .76rem; background: var(--bg-dim); padding: .05rem .3rem; overflow-wrap: anywhere; }
.ex-open-doors { margin-top: 1rem; }

/* ── The action table and the test box ─────────────────────────────────────────────────────── */
.ex-act { display: grid; grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr) auto; gap: 0 .9rem; font-size: .85rem; line-height: 1.5; }
.ex-act > div { padding: .45rem 0; border-bottom: 1px solid var(--border); display: grid; align-content: center; min-width: 0; }
.ex-act code { font-weight: 700; }
.ex-act small { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--text-dim); overflow-wrap: anywhere; }
.ex-act .og-door { font-size: .7rem; justify-self: end; }
.ex-test { margin-top: .8rem; padding: .8rem 1rem; border: 1px dashed var(--text); background: var(--bg); }
.ex-test .og-label:first-child { margin-top: 0; }
.ex-test-in { width: 100%; box-sizing: border-box; font-family: var(--font-mono); font-size: .76rem; margin-top: .3rem; }
.ex-test .og-doors { margin-top: .6rem; align-items: center; gap: 1rem; }
.ex-out { margin: .3rem 0 0; padding: .6rem .8rem; border: 2px solid var(--text); background: var(--bg-dim); font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14rem; overflow: auto; color: var(--text); }
.ex-out--tall { max-height: 28rem; }
.ex-api { margin: .2rem 0 0; padding: .5rem .7rem; border: 2px solid var(--text); background: var(--bg); font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }

/* ── The facts under an opened row ─────────────────────────────────────────────────────────── */
.ex-kv { display: grid; grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr); gap: .7rem 1.2rem; align-items: start; margin-top: .8rem; }
.ex-kv--wide { grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); margin-top: .2rem; }
.ex-k { font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding-top: .25rem; }
.ex-v { font-size: .9rem; line-height: 1.5; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.ex-v small { display: block; margin-top: .15rem; font-size: .8rem; line-height: 1.45; color: var(--text-dim); }
.ex-v small.is-coral { color: var(--accent); }
.ex-v .og-crumb-link { font-size: inherit; }
.ex-inst { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .5rem; }
.ex-inst .og-input { flex: 1 1 12rem; }
.ex-more { display: flex; align-items: center; gap: 1rem; margin-top: .8rem; }
.ex-more small { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); }

/* ── The install form ──────────────────────────────────────────────────────────────────────── */
.ex-fold { display: flex; align-items: center; gap: .9rem; width: 100%; margin-top: 1rem; padding: .7rem 0; border: 0; border-bottom: 1px solid var(--border); background: none; cursor: pointer; text-align: left; font-size: .95rem; font-weight: 800; color: var(--text); }
.ex-fold i { font-style: normal; font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.ex-fold-r { margin-left: auto; font-family: var(--font-mono); font-size: .72rem; font-weight: 400; color: var(--text-dim); }
.ex-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem 1.8rem; margin-top: .8rem; }
.ex-choice { grid-column: 1 / -1; display: flex; gap: 0; }
.ex-field { display: block; min-width: 0; }
.ex-field .og-label { display: block; margin-bottom: .3rem; }
.ex-field .og-input, .ex-field .og-textarea { width: 100%; box-sizing: border-box; font-family: var(--font-mono); font-size: .76rem; }
.ex-field--wide { grid-column: 1 / -1; }
.ex-form-doors { display: flex; justify-content: space-between; align-items: center; }

/* ── Phone ─────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .ex-search { flex-wrap: wrap; }
  .ex-pl { grid-template-columns: minmax(0, 1fr); }
  .ex-p--head > div { display: none; }
  .ex-p > .ex-nm, .ex-p > .ex-ds, .ex-p > .ex-me { border-bottom: 0; padding-bottom: .15rem; }
  .ex-p > .ex-ds, .ex-p > .ex-me { padding-top: 0; }
  .ex-p > .ex-go { justify-content: flex-start; padding-top: .1rem; flex-wrap: wrap; }
  .ex-act { grid-template-columns: minmax(0, 1fr); }
  .ex-act > div { border-bottom: 0; padding: .15rem 0; }
  .ex-act > div:nth-child(3n) { border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
  .ex-act .og-door { justify-self: start; }
  .ex-kv, .ex-kv--wide { grid-template-columns: 1fr; gap: .3rem 0; }
  .ex-k { padding-top: .6rem; }
  .ex-form { grid-template-columns: 1fr; }
}
