/* The picture description page (/describe-pictures/, issue #87) inside the Law Reader's frame.
   Its controls are the New York State Design System's elements (nys-select, nys-button,
   nys-textarea, nys-textinput, nys-checkbox), themed for the site by law.css's --nys-* tokens,
   as on every other page; this file lays out the page's own parts, all under .alt-app, and draws
   the two plain inputs (name, email) to match nys-textinput. Every color is a template variable
   or NYSDS's own token; where the site sets no token, the value after the comma is NYSDS
   1.23.2's own fallback for it, copied from its nys-textinput, nys-label and nys-errormessage. */

.alt-app h2 { margin: 32px 0 8px; }
.alt-app h3 { margin: 24px 0 6px; }
.alt-app .row { display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.alt-app nys-textarea, .alt-app nys-textinput, .alt-app nys-checkbox, .alt-app .nys-like-field { display: block; margin-top: 16px; }

/* Name and email: plain inputs, so the browser can fill them in (autocomplete, WCAG 1.3.5),
   drawn as NYSDS 1.23.2's nys-textinput draws its own input, from the same tokens. law.css sets
   --nys-color-neutral-400 (the border) to the template's ink and --nys-border-width-sm to 2px on
   nys-textinput; the same two are set here, so border and focus ring match. */
.alt-app .nys-like-field {
  --nys-color-neutral-400: var(--ink); --nys-border-width-sm: 2px;
  display: flex; flex-direction: column; gap: var(--nys-space-50, 4px);
  font-family: var(--nys-font-family-ui); font-size: var(--nys-font-size-ui-md, 16px);
  line-height: var(--nys-font-lineheight-ui-md, 24px); letter-spacing: var(--nys-font-letterspacing-ui-md, .044px);
  color: var(--nys-color-text);
}
/* nys-label: semibold, in the field's type. */
.alt-app .nys-like-field label { margin: 0; font-weight: var(--nys-font-weight-semibold, 600); color: var(--nys-color-text); }
/* nys-textinput's .nys-textinput__input on its white container (the white is the input's own
   background here: there is no container). Its letter spacing stays the browser's, as NYSDS's does. */
.alt-app .nys-like-input {
  box-sizing: border-box; width: 100%; max-width: 100%; height: var(--nys-size-500, 40px); margin: 0;
  padding: var(--nys-space-100, 8px); border-radius: var(--nys-radius-md, 4px);
  border: solid var(--nys-color-neutral-400) var(--nys-border-width-sm);
  outline: transparent solid var(--nys-border-width-sm); outline-offset: 0;
  background-color: var(--nys-color-ink-reverse); color: var(--nys-color-text);
  font: inherit; font-weight: var(--nys-font-weight-regular, 400); letter-spacing: normal;
}
.alt-app .nys-like-input:hover:not(:disabled):not(:focus) { outline-color: var(--nys-color-neutral-900, #1b1b1b); border-color: var(--nys-color-neutral-900, #1b1b1b); }
.alt-app .nys-like-input:focus, .alt-app .nys-like-input:focus-visible { outline: var(--nys-color-focus) solid var(--nys-border-width-sm); outline-offset: 0; border-color: var(--nys-color-focus); caret-color: var(--nys-color-focus); }
.alt-app .nys-like-input[aria-invalid="true"] { border-color: var(--nys-color-danger, #b52c2c); }
.alt-app .nys-like-input[aria-invalid="true"]:focus { border-color: var(--nys-color-focus); }
/* In forced colors, the ring law.css gives nys-textinput (focus-within), on the input itself. */
@media (forced-colors: active) {
  .alt-app .nys-like-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
}
/* nys-errormessage: the error icon, then the message, in the danger color. */
.alt-app .nys-like-error { display: flex; align-items: center; gap: var(--nys-space-100, 8px); margin: 0; font-weight: var(--nys-font-weight-regular, 400); color: var(--nys-color-danger, #b52c2c); }
.alt-app .nys-like-error[hidden] { display: none; }
.alt-app .nys-like-error nys-icon { margin-top: -2px; }
.alt-app .hint { font-size: 15px; }
.alt-app .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.alt-app .pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 16px 0; }

.alt-app figure { margin: 16px 0; padding: 8px; background: var(--white); border: 1px solid var(--line-soft); }
.alt-app figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.alt-app figcaption { font-size: 15px; margin-top: 8px; }
.alt-app #uses { padding-left: 1.4em; }
.alt-app #uses li { margin-bottom: 16px; }
.alt-app #uses a { overflow-wrap: anywhere; }
.alt-app #uses blockquote { margin: 4px 0; padding: 4px 12px; border-left: 4px solid var(--line-soft); background: var(--bg-blue-lt); white-space: pre-wrap; }

/* What the current description is: reviewed, an AI draft no person has checked, or none. */
.alt-app .label-tag { display: inline-block; font-weight: 600; padding: 2px 8px; border-radius: 4px; border: 2px solid var(--line); }
.alt-app .label-tag[data-kind="draft"] { border-color: var(--warn); }
.alt-app .label-tag[data-kind="reviewed"] { border-color: var(--blue); }

.alt-app fieldset { margin-top: 16px; border: 1px solid var(--line-soft); border-radius: 4px; padding: 8px 12px 16px; }
.alt-app fieldset legend { font-weight: 600; }
.alt-app .payload { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-blue-lt); border: 1px solid var(--line-soft); border-radius: 4px; padding: 8px; font-family: var(--font-mono); font-size: 14px; }
.alt-app #save-status:not(:empty) { font-weight: 600; }

/* The trap field: off screen, out of the tab order and the accessibility tree. People never see
   it; a robot that fills every box fills it, and the intake then files nothing. */
.alt-app .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
