/* app-v2-extra.css -- additions that the approved prototype stylesheet does not contain.
   Scoped under .fsi2 like app-v2.css. These cover only things the embedded page needs and the
   standalone prototype did not: the host-theme reset, new notices, and the server-rendered about text. */

/* The component sits inside a WordPress theme: give it its own surface and keep theme styles out. */
.fsi2.alignwide { max-width: 1100px; width: 100%; }   /* theme wideSize; see templates/app-v2.php */
.fsi2 {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-4) 0;
  max-width: 1200px;
  margin: 0 auto;
}
.fsi2 .layout { padding-top: 0; padding-bottom: 0; }
/* Host-theme isolation: WordPress themes commonly style bare button/input/heading/link elements globally.
   The component's own classes win for what they set; these resets cover what the prototype never set
   because it ran on a blank page. Values are the browser defaults, so the approved look is unchanged. */
.fsi2 { font-family: "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Segoe UI", sans-serif; font-size: var(--font-size-base); line-height: 1.5; color: var(--color-text); text-align: left; }
.fsi2 button, .fsi2 input { font: inherit; letter-spacing: normal; text-transform: none; text-shadow: none; }
.fsi2 input { font-size: var(--font-size-base); }
.fsi2 h2, .fsi2 h3 { color: inherit; font-weight: 700; letter-spacing: normal; text-transform: none; line-height: 1.3; }
.fsi2 p, .fsi2 ul, .fsi2 dl, .fsi2 dd { line-height: inherit; }
.fsi2 a { color: var(--color-primary); }
.fsi2 mark { background: var(--color-primary-soft); color: inherit; }
.fsi2 .panel { scroll-margin-top: 72px; }
.fsi2 [hidden] { display: none !important; }

/* Unlinked permit cards are information, not links. */
.fsi2 div.entry-card { cursor: default; }

/* Freshness / source line under the dashboard tabs. */
.fsi2 .freshness-note {
  margin: var(--space-3) 0 var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.fsi2 .freshness-note:empty { display: none; }

/* Inline notice used for "unlinked" and "unavailable" sections. */
.fsi2 .fsi2-notice {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.fsi2 .fsi2-noscript {
  padding: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Server-rendered explanation. Plain, readable text; same tokens as the rest of the component. */
.fsi2 .fsi2-about {
  margin: var(--space-6) var(--space-4) 0;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}
.fsi2 .fsi2-about h2 { font-size: var(--font-size-md); margin: 0 0 var(--space-3); }
.fsi2 .fsi2-about h3 { font-size: var(--font-size-base); margin: var(--space-5) 0 var(--space-2); }
.fsi2 .fsi2-about p { margin: 0 0 var(--space-2); }
.fsi2 .fsi2-about ul { margin: 0; padding-left: var(--space-5); }
.fsi2 .fsi2-about li { margin: 0 0 var(--space-2); }
@media (min-width: 1024px) {
  .fsi2 .fsi2-about { margin-left: var(--space-5); margin-right: var(--space-5); }
}

/* BETA-APT-5 / mobile: the date navigation (previous, selected date, calendar, next) stays on ONE row at every width.
   The prototype rule wraps (flex-wrap) and gives the label a 140px minimum, so the four items overflowed onto a second line on phones
   (the usable width is only ~230px at 320px: page 12 + layout 16 + panel 16 on each side). Same four elements, same markup and behaviour.
   On narrow screens the native date input is shown as a calendar button (it already repeats the date that the label shows); it stays the real
   <input type="date">, so tapping it opens the platform's own picker, and the label keeps the full "YYYY년 M월 D일 (요일)" text. */
.fsi2 .date-nav { flex-wrap: nowrap; min-width: 0; }
.fsi2 .date-nav__label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsi2 .date-nav__input { flex: 0 1 auto; min-width: 0; }
@media (max-width: 480px) {
  .fsi2 .date-nav { gap: var(--space-1); }
  .fsi2 .date-nav__btn { width: 36px; height: 36px; }
  .fsi2 .date-nav__label { font-size: var(--font-size-sm); padding: 0 var(--space-1); }
  .fsi2 .date-nav__input {
    flex: 0 0 36px; width: 36px; height: 36px; padding: 0; position: relative; overflow: hidden; cursor: pointer;
    color: transparent; -webkit-appearance: none; appearance: none;
    background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  }
  .fsi2 .date-nav__input::-webkit-datetime-edit { display: none; }
  .fsi2 .date-nav__input::-webkit-calendar-picker-indicator { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
}

/* Hotfix (live-theme geometry: the WordPress content area has 24px side padding, so the row is only ~222px wide at 320px and ~246px at 360px):
   up to 380px the row uses 8px of the panel's 16px side padding and the label gives up its own side padding (the full date then fits at 13px from 360px up);
   up to 359px the gaps are 2px and the label is 12px with slightly tighter letter spacing; up to 340px (320px phones) the row uses 10px of the panel padding and the label is 11px with tighter word spacing (about 6px of headroom).
   Control sizes (36px) are unchanged; the date text and format are unchanged. */
@media (max-width: 380px) {
  .fsi2 .date-nav { margin-left: calc(-1 * var(--space-2)); margin-right: calc(-1 * var(--space-2)); }
  .fsi2 .date-nav__label { padding: 0; }
}
@media (max-width: 359px) {
  .fsi2 .date-nav { gap: 2px; }
  .fsi2 .date-nav__label { font-size: var(--font-size-xs); letter-spacing: -0.02em; }
}
@media (max-width: 340px) {
  .fsi2 .date-nav { margin-left: -10px; margin-right: -10px; }
  .fsi2 .date-nav__label { font-size: 11px; letter-spacing: -0.03em; word-spacing: -0.1em; }
}

/* BETA-APT-5 / R3: the original (parcel-style) apartment name kept as secondary text next to the readable address label. */
.fsi2 .name-orig { font-weight: 400; font-size: var(--font-size-xs); color: var(--color-text-faint); margin-left: var(--space-1); white-space: nowrap; }
.fsi2 .pdp-header__orig { margin: 0; }

/* FSI-RD-PALETTE:BEGIN release=apps-palette-2026-11-02 (do not edit inside; see docs/APPS-PALETTE.md) */
/* ==== 반셀처음 palette alignment (fsi-rd tokens) — colours only =========================================
   Token values for the existing .fsi2 variables, so every rule in app-v2.css that already uses them follows.
   Source of truth: the deployed WordPress redesign (--fsi-rd-*): teal #1D6B6B / hover #165757, navy ink #0F2742,
   muted #52627A, off-white #FBF8F2, mint #E3F2EE, border #E4E2DC.
   Deliberately NOT changed (meaning, not brand): --color-up/--color-up-soft (price rise / changed), --color-down,
   the ok / warn / deny status tokens (permit status), the permit status badges themselves. */
.fsi2 {
  --color-bg: #fbf8f2;
  --color-border: #e4e2dc;
  --color-border-strong: #cfcbc0;
  --color-text: #0f2742;
  --color-text-muted: #52627a;
  --color-text-faint: #5f6e85;
  --color-primary: #1d6b6b;
  --color-primary-dark: #165757;
  --color-primary-soft: #e3f2ee;
  --color-focus: #1d6b6b;
  --color-info: #1a5fb4;        /* "received" status keeps its blue so it stays distinct from teal brand and green "approved" */
  --color-info-soft: #e8f0fb;
}
.fsi2 .badge--received { background: var(--color-info-soft); color: var(--color-info); }
/* text-entry boundaries: 3.6:1 on white (WCAG 1.4.11), same value as the WordPress forms and the community/planner inputs */
.fsi2 .search-box__input, .fsi2 .date-nav__input { border-color: #7b8798; }
/* FSI-RD-PALETTE:END */
