/**
 * @file        sg-passport.css
 * @description Styles of the passport module: cover and pages, ink stamps and leader stamps, mastery ring, sticker and dish albums, photo picker, home explorer, collection layer dots, admin tabs
 *
 * @author      Thomas Dobler - SYNTHETIXMIND LTD
 * @company     SYNTHETIXMIND LTD, Paphos, Cyprus
 * @url         https://synthetixmind.com
 *
 * @uid         66437658-6d07-4fdc-9ac6-303801b6d11d
 * @version     0.2.0.2
 * @created     2026-12-02
 * @updated     2026-12-04
 *
 * @copyright   (c) 2026 by SYNTHETIXMIND LTD
 * @license     Proprietary — All rights reserved
 */

/* Shared pieces: page head, eyebrow, notes, banner, chips, pills, arrow links, icons. */
.sg-pass-icon { flex: none; }
.sg-pass-head { margin: 0 0 16px; }
.sg-pass-head h1 { margin: 0 0 4px; }
.sg-pass-lead { margin: 0; color: var(--ink-muted); max-width: 62ch; }
.sg-pass-eyebrow { margin: 0; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.sg-pass-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin: 0 0 16px; }
.sg-pass-banner { display: flex; gap: 8px; align-items: flex-start; background: var(--beige); color: var(--warm-ink); border: 1px solid var(--border-warm); border-radius: var(--radius-lg); padding: 12px 16px; margin: 0 0 16px; }
.sg-pass-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin: 0; font-family: var(--font-mono); font-size: 0.85rem; background: var(--surface); }
.sg-pass-chip .sg-pass-icon { width: 16px; height: 16px; color: var(--orange); }
.sg-pass-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.sg-pass-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.sg-pass-pills li { border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 0.9rem; background: var(--bg); overflow-wrap: anywhere; }
.sg-pass-arrow-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.sg-pass-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.sg-pass-links .sg-button, .sg-pass-page__foot .sg-button, .sg-pass-controls .sg-button, .sg-pass-dish .sg-button { display: inline-flex; align-items: center; gap: 6px; }

/* Passport (Q7-10): cover card beside the stamp page from 1,024 px; one column below. */
.sg-pass { display: grid; gap: 16px; max-width: 1040px; }
.sg-pass > .sg-pass-head { margin: 0; }
.sg-pass-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 16px; }
.sg-pass-bar p { margin: 0; }
.sg-pass-motion { display: none; border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { .sg-pass-motion { display: inline-block; } }
.sg-pass-spread { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 1024px) { .sg-pass-spread { grid-template-columns: 5fr 7fr; align-items: stretch; } }
.sg-pass-cover { background: var(--navy); color: #F2F4F6; border: 2px solid var(--orange); border-radius: var(--radius-xl); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 260px; min-width: 0; }
@media (min-width: 1024px) { .sg-pass-cover { min-height: 400px; } }
.sg-pass-cover--mahogany { background: var(--mahogany); color: #EADDD3; }
.sg-pass-cover__top { display: flex; justify-content: space-between; align-items: center; margin: 0; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.sg-pass-cover__top .sg-pass-icon { color: var(--orange); width: 24px; height: 24px; }
.sg-pass-cover__holder p { margin: 0; }
.sg-pass-cover .sg-pass-eyebrow { color: inherit; opacity: 0.8; }
.sg-pass-cover__holder .sg-pass-cover__name { font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; margin: 4px 0; overflow-wrap: anywhere; }
.sg-pass-cover__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid rgba(242, 244, 246, 0.3); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.sg-pass-empty { background: var(--beige); color: var(--warm-ink); border: 1px solid var(--border-warm); border-radius: var(--radius-xl); padding: 24px; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.sg-pass-empty h2, .sg-pass-empty p { margin: 0; color: inherit; }
.sg-pass-empty > .sg-pass-icon { width: 32px; height: 32px; }

.sg-pass-pages { min-width: 0; }
.sg-pass-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sg-pass-page + .sg-pass-page { margin-top: 16px; }
.sg-pass-page__head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.sg-pass-page__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sg-pass-page__foot { display: flex; justify-content: flex-end; margin: 0; }
/* With JavaScript only the current page shows; without it every page stays readable in a column. */
.sg-pass[data-pass-ready] .sg-pass-page { display: none; }
.sg-pass[data-pass-ready] .sg-pass-page[data-current] { display: flex; animation: sg-pass-turn 280ms ease-out; }
@keyframes sg-pass-turn { from { opacity: 0; transform: perspective(900px) rotateY(-12deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sg-pass[data-pass-ready] .sg-pass-page[data-current] { animation: none; } }
.sg-pass-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.sg-pass-controls [hidden] { display: none !important; }
.sg-pass-pagelist { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; }
.sg-pass-pagelist a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-family: var(--font-mono); text-decoration: none; color: var(--ink-muted); }
.sg-pass-pagelist a[aria-current="page"] { background: var(--navy); color: #F2F4F6; }

/* Stamp row cards: seal, eyebrow, country, trip and the date in IBM Plex Mono on the right. */
.sg-pass { --sg-pass-ink: var(--mahogany); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sg-pass { --sg-pass-ink: var(--accent); } }
:root[data-theme="dark"] .sg-pass { --sg-pass-ink: var(--accent); }
.sg-pass-ink--navy { --sg-pass-ink: var(--ink); }
.sg-pass-ink--orange { --sg-pass-ink: var(--accent); }
.sg-pass-stamp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; border: 2px solid var(--sg-pass-ink); border-radius: var(--radius-lg); padding: 12px; background: var(--surface); min-width: 0; }
.sg-pass-stamp__date { grid-column: 2; font-size: 0.9rem; color: var(--ink-muted); }
@media (min-width: 640px) {
  .sg-pass-stamp { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sg-pass-stamp__date { grid-column: 3; grid-row: 1; text-align: right; }
}
.sg-pass-seal { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 2px solid var(--sg-pass-ink); color: var(--sg-pass-ink); border-radius: var(--radius); font-weight: 600; flex: none; }
.sg-pass-seal--image { border-radius: 50%; overflow: hidden; }
.sg-pass-seal--image img { width: 100%; height: 100%; object-fit: contain; }
.sg-pass-seal--leader { border-radius: 50%; }
.sg-pass-seal .sg-pass-icon { width: 26px; height: 26px; }
.sg-pass-stamp__text { min-width: 0; }
.sg-pass-stamp__country { font-size: 1.05rem; margin: 2px 0; overflow-wrap: anywhere; }
.sg-pass-stamp__line { margin: 0; color: var(--ink-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.sg-pass-stamp--leader { border-color: var(--orange); background: var(--beige); }
.sg-pass-stamp--leader .sg-pass-seal { border-color: var(--orange); color: var(--warm-ink); background: var(--surface); }
.sg-pass-stamp--leader .sg-pass-eyebrow, .sg-pass-stamp--leader .sg-pass-stamp__line, .sg-pass-stamp--leader .sg-pass-stamp__date { color: var(--warm-ink); }
.sg-pass-stamp--ended { border-color: var(--border-strong); background: var(--bg); }
.sg-pass-stamp--ended .sg-pass-seal { border-color: var(--border-strong); color: var(--ink-muted); background: transparent; }
.sg-pass-stamp--ended .sg-pass-stamp__country, .sg-pass-stamp--ended .sg-pass-eyebrow, .sg-pass-stamp--ended .sg-pass-stamp__line, .sg-pass-stamp--ended .sg-pass-stamp__date { color: var(--ink-muted); }

/* Mastery in the country panel (Q7-12): head with the ring on the right, then one row per part. */
.sg-pass-mastery { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.sg-pass-mastery__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sg-pass-mastery__head p { margin: 2px 0 0; }
.sg-pass-mastery__title { display: flex; align-items: center; gap: 6px; font-size: 1rem; margin: 0; }
.sg-pass-mastery--home { background: var(--beige); color: var(--warm-ink); border: 1px solid var(--border-warm); border-radius: var(--radius-lg); padding: 12px; }
.sg-pass-mastery--home p { margin: 4px 0 0; }
.sg-pass-ring { position: relative; width: 72px; height: 72px; flex: none; }
.sg-pass-ring svg { width: 72px; height: 72px; }
.sg-pass-ring__track { fill: none; stroke: var(--border); stroke-width: 7; }
.sg-pass-ring__fill { fill: none; stroke: var(--orange); stroke-width: 7; stroke-linecap: round; }
.sg-pass-ring__figure { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.sg-pass-parts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.sg-pass-part { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.sg-pass-part:last-child { border-bottom: 0; }
.sg-pass-part > .sg-pass-icon { color: var(--ink-muted); }
.sg-pass-part--done > .sg-pass-icon { color: var(--orange); }
.sg-pass-part__text { display: grid; flex: 1; min-width: 0; }
.sg-pass-part__value { font-size: 0.85rem; color: var(--ink-muted); }
.sg-pass-part__end { flex: none; font-size: 0.9rem; }
span.sg-pass-part__end { font-family: var(--font-mono); color: var(--ink-muted); }

/* Albums (Q7-13, Q7-14): country chips with counts, then the cards. */
.sg-pass-tabbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; }
.sg-pass-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sg-pass-tabbar .sg-pass-tabs { margin: 0; }
.sg-pass-tab { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--surface); }
.sg-pass-tab .sg-mono { color: var(--ink-muted); font-size: 0.85rem; }
.sg-pass-tab[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #F2F4F6; }
.sg-pass-tab[aria-current="page"] .sg-mono { color: #EADDD3; }
.sg-pass-album { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.sg-pass-sticker { border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 12px; text-align: center; min-width: 0; }
.sg-pass-sticker--earned { border-style: solid; background: var(--surface); }
.sg-pass-sticker:not(.sg-pass-sticker--earned) .sg-pass-sticker__face img { filter: grayscale(1); opacity: 0.4; }
.sg-pass-sticker__face img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.sg-pass-sticker__mark { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--border-strong); font-family: var(--font-head); font-size: 1.5rem; }
.sg-pass-sticker__name { font-family: var(--font-head); font-weight: 600; margin: 8px 0 4px; overflow-wrap: anywhere; }
.sg-pass-album--dishes { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sg-pass-dish { border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); overflow: hidden; min-width: 0; background: var(--surface); display: flex; flex-direction: column; }
.sg-pass-dish--done { border-style: solid; border-color: var(--border); }
.sg-pass-dish__face { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--beige); color: var(--warm-ink); }
.sg-pass-dish__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-pass-dish__face .sg-pass-icon { width: 40px; height: 40px; }
.sg-pass-dish__body { padding: 12px; display: grid; gap: 6px; }
.sg-pass-dish__body p, .sg-pass-dish__body form { margin: 0; }
.sg-pass-dish__name { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.sg-pass-dish__name .sg-pass-icon { color: var(--orange); }
.sg-pass-dish__date { font-size: 0.85rem; color: var(--ink-muted); }

/* Tick dialog (Q7-14): head with a close link, refusal, empty state, photo grid. */
.sg-pass-picker__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.sg-pass-picker__head h2 { margin: 2px 0 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.sg-pass-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); flex: none; }
.sg-pass-refusal { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--mahogany); color: var(--warm-ink); background: var(--beige); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; }
.sg-pass-refusal p { margin: 0; }
.sg-pass-picker__empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.sg-pass-picker__empty .sg-pass-icon { width: 32px; height: 32px; color: var(--ink-muted); }
.sg-pass-picker__empty p { margin: 0; }
.sg-pass-picker__empty-title { font-weight: 600; }
.sg-pass-picks { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.sg-pass-pick { position: relative; display: block; cursor: pointer; }
.sg-pass-pick input { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; }
.sg-pass-pick img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 3px solid transparent; }
.sg-pass-pick input:checked + img { border-color: var(--orange); }
.sg-pass-pick input:focus-visible + img { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Home explorer (Q7-15): country card with the small map, then the regions and cities blocks. */
.sg-pass-home { display: grid; gap: 16px; }
@media (min-width: 1024px) { .sg-pass-home { grid-template-columns: 5fr 7fr; align-items: start; } }
.sg-pass-home > .sg-panel { margin: 0; min-width: 0; }
.sg-pass-home__card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sg-pass-home__card-head a { min-height: 44px; display: inline-flex; align-items: center; }
.sg-pass-home__country { font-size: 1.25rem; margin: 0; }
.sg-pass-home__map { margin-top: 12px; }
.sg-pass-home__map svg { width: 100%; height: auto; max-height: 320px; }
.sg-pass-home__blocks { display: grid; gap: 20px; }
.sg-pass-home__blocks > p { margin: 0; }
.sg-pass-home__block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0 0 8px; }
.sg-pass-home__block-head h2 { font-size: 1.1rem; margin: 0; }
.sg-pass-progress { width: 100%; height: 10px; accent-color: var(--orange); }

/* Collection layers (Q7-16): switch rows with "n / m", counter chips, dots in visited and open tones. */
.sg-pass-layers { margin: 12px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.sg-pass-layers__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0 0 8px; }
.sg-pass-layers__title { display: flex; align-items: center; gap: 6px; font-size: 1rem; margin: 0; }
.sg-pass-layers__form { display: grid; gap: 8px; margin: 0 0 8px; }
.sg-pass-layers__form .sg-button { justify-self: start; }
.sg-pass-switches { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (min-width: 640px) { .sg-pass-switches { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.sg-pass-switch { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--bg); }
.sg-pass-switch:has(input:checked) { border-color: var(--navy); }
.sg-pass-switch__icon { display: inline-flex; color: var(--ink-muted); }
.sg-pass-switch__text { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sg-pass-switch__text .sg-mono { font-size: 0.8rem; color: var(--ink-muted); }
/* The checkbox drawn as a two-state switch; it stays a real form field. */
.sg-pass-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; }
.sg-pass-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FBFCFF; transition: transform 160ms ease-out; }
.sg-pass-switch input:checked { background: var(--navy); }
.sg-pass-switch input:checked::after { transform: translateX(16px); }
.sg-pass-switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:root[data-theme="dark"] .sg-pass-switch input:checked { background: var(--ink); }
:root[data-theme="dark"] .sg-pass-switch input:checked::after { background: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sg-pass-switch input:checked { background: var(--ink); } :root:not([data-theme="light"]) .sg-pass-switch input:checked::after { background: var(--navy); } }
@media (prefers-reduced-motion: reduce) { .sg-pass-switch input::after { transition: none; } }
.sg-pass-layer-svg { width: 100%; height: auto; display: block; }
.sg-pass-layer-svg[data-pass-merged] { display: none; }
.sg-pass-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 8px 0 0; }
.sg-pass-dot, .sg-pass-cluster circle { fill: var(--surface); stroke: var(--ink-muted); stroke-width: 1.2; }
.sg-pass-dot--done, .sg-pass-cluster.sg-pass-dot--done circle { fill: var(--orange); stroke: var(--navy); }
.sg-pass-dot--part, .sg-pass-cluster.sg-pass-dot--part circle { fill: var(--beige); stroke: var(--orange); }
.sg-pass-cluster text { font-family: var(--font-mono); font-size: 6px; fill: var(--ink); pointer-events: none; }
span.sg-pass-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink-muted); background: var(--surface); margin-right: 6px; vertical-align: middle; }
span.sg-pass-dot--done { background: var(--orange); border-color: var(--navy); }

/* Admin (D7-08 to D7-12). */
.sg-pass-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.sg-pass-admin-thumb { width: 40px; height: 40px; object-fit: contain; vertical-align: middle; background: var(--beige); border-radius: var(--radius-sm); }
.sg-pass-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.sg-field__error { color: var(--orange); margin: 4px 0 0; font-size: 0.9rem; }
