/* PawStay app additions: self-hosted fonts and the components the static design did not need
   (form errors, flash messages, modals, notifications menu, demo banner, installer, PWA hints,
   header fit levels). Same tokens as pawstay.css – never edit pawstay.css itself. */

/* ---------- fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Fraunces"; font-style: normal; font-display: swap; font-weight: 400 700; src: url("../fonts/fraunces-latin-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-display: swap; font-weight: 400 700; src: url("../fonts/fraunces-latin-ext-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-display: swap; font-weight: 400 700; src: url("../fonts/fraunces-latin-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-display: swap; font-weight: 400 700; src: url("../fonts/fraunces-latin-ext-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- small helpers ---------- */
.grow { flex: 1; min-width: 0; }
.break-any { overflow-wrap: anywhere; }
.logo img { height: 38px; width: auto; }
.logo .logo-dark { display: none; }
[data-theme="dark"] .logo .logo-light:has(+ .logo-dark) { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }
.icon-btn.is-disabled { opacity: .45; pointer-events: none; }
.prose p:last-child { margin-bottom: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.dd-menu form { margin: 0; }

/* ---------- header fit levels: pawstay.js adds fit-1..fit-5 to .site-header only while its content is still wider
   than the bar (signed-in buttons, longer translations or business name). Same steps as the CSS breakpoints. ---------- */
.site-header.fit-1 .header-search { display: none; }
.site-header.fit-1 .header-search-btn { display: inline-grid; }
.site-header.fit-2 > .container { gap: 14px; }
.site-header.fit-2 .main-nav > a, .site-header.fit-2 .main-nav .more-btn { padding: 0 9px; font-size: 14.5px; }
.site-header.fit-2 .btn-signin span { display: none; }
.site-header.fit-2 .btn-signin { width: 42px; padding: 0; }
.site-header.fit-3 .main-nav .nav-extra { display: none; }
.site-header.fit-3 .main-nav .more { display: block; }
.site-header.fit-4 .header-tools .btn-install { display: none; }
.site-header.fit-5 .main-nav { display: none; }
.site-header.fit-5 .burger { display: inline-grid; }
.site-header.fit-5 .header-tools .hide-m { display: none; }
.site-header.fit-5 .header-tools { margin-left: auto; }

/* ---------- form validation ---------- */
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: 13px; color: var(--danger); font-weight: 600; }
.req { color: var(--danger); margin-left: 2px; }

/* ---------- flash ---------- */
.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.flash-stack .alert { align-items: center; }
.flash-stack .alert .close { margin-left: auto; width: 36px; height: 36px; font-size: 13px; }

/* ---------- empty state ---------- */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 20px; }
.empty-state h3 { margin: 6px 0 0; font-size: 20px; }
.empty-state p { margin: 0; max-width: 420px; font-size: 14.5px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 30, .55); }
.modal-box { position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-box.lg { max-width: 780px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font: 700 17px/1.2 var(--font-ui); letter-spacing: 0; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
body.modal-open { overflow: hidden; }

/* ---------- demo banner ---------- */
.demo-banner { background: var(--accent-fill); color: var(--on-accent, #fff); font-size: 13px; text-align: center; padding: 7px 16px; font-weight: 650; }
.demo-banner a { color: inherit; text-decoration: underline; }

/* ---------- iOS add-to-home-screen hint ---------- */
.ios-hint { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110; display: none; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: 14px; }
.ios-hint.show { display: flex; }
.ios-hint .icon-btn { margin-left: auto; width: 36px; height: 36px; }
.install-bar.hidden, [data-install].hidden { display: none !important; }

/* ---------- notifications menu ---------- */
.notif-menu { width: 340px; max-width: calc(100vw - 32px); }
.notif-menu .dd-title { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px 10px; font: 700 13px/1 var(--font-ui); color: var(--text); }
.notif-menu .dd-title .btn { margin-left: auto; width: auto; min-height: 36px; }
.notif-menu .n-item { display: flex !important; align-items: flex-start !important; gap: 10px; min-height: 0 !important; padding: 10px 12px !important; color: var(--text-2) !important; font-size: 13.5px !important; line-height: 1.4 !important; }
.notif-menu .n-item .bi { color: var(--accent-ink); font-size: 16px; margin-top: 2px; }
.notif-menu .n-item b { color: var(--text); display: block; font-size: 13.5px; }
.notif-menu .n-item.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.notif-menu .n-empty { padding: 18px 14px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* ---------- footer language switcher ---------- */
.lang-form { margin: 0; }
.lang-select { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 4px 2px; min-height: 36px; }
.lang-select option { color: #1A1F3D; }

/* ---------- installer ---------- */
.installer { min-height: 100vh; display: grid; place-items: start center; padding: 48px 16px; background: var(--bg); }
.installer .inst-box { width: 100%; max-width: 700px; }
.installer .inst-steps { display: flex; gap: 6px; margin: 22px 0; flex-wrap: wrap; }
.installer .inst-steps span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 650; background: var(--surface-3); color: var(--muted); }
.installer .inst-steps span.on { background: var(--brand-fill); color: var(--on-brand, #fff); }
.installer .inst-steps span.done { background: var(--ok-soft); color: var(--ok); }
.installer form > .field + .field, .installer form .form-grid + .field, .installer form .field + .form-grid, .installer form hr + .field { margin-top: 14px; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .bi-check-circle-fill { color: var(--ok); }
.req-list .bi-x-circle-fill { color: var(--danger); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent-fill); transition: width .3s; }

/* ---------- placeholder pages (replaced by the page builders) ---------- */
.placeholder-note { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 28px; color: var(--muted); text-align: center; background: var(--surface); }

/* ---------- offline / error pages ---------- */
.offline-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }

/* ---------- reorder (drag handles) ---------- */
[data-sort-item].dragging { opacity: .6; }
