/* Site additions on top of the design system (tokens.css, theme.css, bundle.css). Only what the renter site needs
   that the system does not ship: the page ground, hidden state, a few record layouts and file inputs. Every value is a
   design token. */

html, body { margin: 0; background: var(--ground); }
body { min-height: 100vh; min-height: 100dvh; }
/* The bundle sets display on most parts, which would override the hidden attribute the app toggles. */
.jj [hidden] { display: none !important; }
html:has(dialog[open]) { overflow: hidden; }
#app:focus { outline: none; }

.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 60; display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--space-4); border-radius: var(--radius-md); background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-pop); }
.skip-link:focus { top: var(--space-2); }

.jj-who span { white-space: nowrap; }
.loading-line { padding: var(--space-2) 0; }

/* A working button keeps its colors and label; the bundle's spinner shows inside it. */
.jj .jj-btn[aria-busy="true"]:disabled { background: var(--surface); border-color: var(--line-strong); color: var(--ink); cursor: progress; }
.jj .jj-btn--primary[aria-busy="true"]:disabled { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Notices with actions, and a whole-form error or success line. */
.notice-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.form-error, .form-success { margin: 0; }

/* Rows: an optional third line, an action under the text, and rows that sit flush inside a card. */
.jj-row__copy { font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-line; }
.row-action { display: block; margin-top: var(--space-2); }
.row-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--ink-3); }
.row-icon svg { width: 22px; height: 22px; }
.repair-row { align-items: flex-start; }
.jj-card > .jj-row { min-height: 0; padding: 0; }
.jj-row__main > .jj-h3 { overflow-wrap: anywhere; }
.photo-strip { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.photo-strip a { display: block; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }

/* Long label and value text (the Home Guide, application answers) reads as stacked lines. */
.kv-stack { grid-template-columns: minmax(0, 1fr); }
.kv-stack dd { font-weight: 400; white-space: pre-line; }

/* Home detail. */
.listing-price { gap: var(--space-4); }
.more-photos { align-self: flex-start; }
.home-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.home-photos > div { aspect-ratio: 3 / 2; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.home-photos img { width: 100%; height: 100%; object-fit: cover; }
.included { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--space-2) var(--space-4); color: var(--ink-2); }
.included li { display: flex; align-items: flex-start; gap: var(--space-2); }
.included svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--ink-3); }
.q-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--surface-2); color: var(--ink-2); font: 600 14px/1 var(--font-sans); font-variant-numeric: tabular-nums; }

/* Welcome filters, shown only for a long list. */
.home-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.home-filters__search { flex: 1 1 220px; }
.home-filters .jj-segment { flex: 1 1 260px; }
.home-filters .jj-selectwrap { flex: 0 1 220px; }

/* Guest forms: owner questions, the Test prefix on a sample home, the inline Fill in test email action. */
.jj-field > small { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.req { font-weight: 400; color: var(--ink-3); }
.choice-list { display: flex; flex-direction: column; }
.prefix-field > .input-prefix { font-weight: 600; }
.prefix-field > .jj-textarea { padding-left: 58px; }
.inline-action { display: inline-flex; align-items: center; min-height: var(--tap-min); }
.jj-fieldrow > .jj-field input[type="date"] { min-width: 0; }

/* Request status: the reference to quote. */
.ref-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.ref-code { flex: 1 1 220px; min-width: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); font: 600 14px/20px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }

/* Uploads: the file input covers its Add photos tile, so the whole tile is the target. */
.jj-photo--add { position: relative; }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.jj-photo--add:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.jj-photo--add.is-busy { color: var(--ink-3); cursor: progress; }

/* Condition report rooms. */
.room-head { display: flex; align-items: flex-end; gap: var(--space-2); }
.room-head > .jj-field { flex: 1; }
.cond-seg span { white-space: normal; text-align: center; line-height: 20px; padding-block: var(--space-1); }
.add-room { align-self: flex-start; }

/* Applications. */
.quote { margin: 0; padding-left: var(--space-4); border-left: 2px solid var(--line); color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }

@container jj (min-width: 900px) {
  .jj-page:has(> .welcome-empty) { justify-content: center; }
}

/* The bundle gives the sheet display: flex, which would show a closed dialog. */
dialog.jj-sheet:not([open]) { display: none; }
/* A standalone link beside a heading is a full target both ways. */
.jj-sectionhead > .jj-link { min-width: var(--tap-min); justify-content: center; }
.prescreen-box:empty { display: none; }
.guest-rest[data-mode="showing"] > .jj-formsection:first-child { padding-top: var(--space-6); border-top: 1px solid var(--line); }
.jj-input[type="date"] { height: var(--control-h); }
/* Below 380px only the plate shows; the brand link stays a full target. */
.jj-brand { min-width: var(--tap-min); }
.price-tbd { font: 600 20px/28px var(--font-sans); color: var(--ink); }
