/* ============================================================
   minimal.css — shared styles for the /v2/ mini-site
   Self-contained, no dependency on main.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --amber:      #F59E0B;
  --amber-dim:  rgba(245,158,11,0.15);
  --sky:        #0477BF;
  --charcoal:   #172026;
  --stone:      #637381;
  --border:     rgba(255,255,255,0.10);
  --surface:    #1A2830;
  --surface2:   #1F3040;
  --header-bg:  #0E1A22;
  --radius:     8px;
  --radius-sm:  5px;
  --nav-h:      52px;
  --header-h:   44px;
}

html {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background: var(--header-bg);
  color: #fff;
}

/* map page needs overflow:hidden; inner pages need to scroll */
html.v2-map, html.v2-map body { height: 100%; overflow: hidden; }
html.v2-inner { overflow: auto; }
html.v2-inner body { min-height: 100dvh; display: flex; flex-direction: column; }

a { color: var(--amber); text-underline-offset: 3px; text-decoration: none; }
a:hover { color: #fff; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: -9999px; top: 1rem;
  background: var(--amber); color: #000;
  padding: 0.5rem 1rem; border-radius: var(--radius);
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { left: 1rem; }

/* ---- Header ---- */
.m-header {
  background: var(--header-bg);
  height: var(--header-h);
  padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 200;
}
.m-logo {
  display: flex; align-items: center; gap: 0.4rem;
  color: #fff; font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap;
}
.m-logo span { color: var(--amber); }
.m-stat { font-size: 0.78rem; color: rgba(255,255,255,0.45); white-space: nowrap; }
.m-stat strong { color: rgba(255,255,255,0.85); font-weight: 600; }

/* ---- Bottom nav ---- */
.m-nav {
  position: sticky; bottom: 0; z-index: 200;
  background: var(--header-bg);
  border-top: 1px solid var(--border);
  height: var(--nav-h);
  display: flex; align-items: stretch;
  flex-shrink: 0;
}
.m-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: rgba(255,255,255,0.45);
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.02em;
  text-transform: uppercase;
  border: none; background: none; cursor: pointer;
  font-family: inherit;
  transition: color 0.12s, background 0.12s;
  padding: 0 0.25rem;
}
.m-nav__item:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.04); }
.m-nav__item.active { color: var(--amber); }
.m-nav__icon { font-size: 1.15rem; line-height: 1; }

/* ---- Map page layout ---- */
.v2-map .page {
  display: grid;
  grid-template-rows: var(--header-h) auto 1fr var(--nav-h);
  height: 100dvh;
}

/* ---- Map controls ---- */
.m-controls {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  flex-shrink: 0;
}
.m-search { position: relative; flex: 1; min-width: 180px; max-width: 340px; }
.m-search__icon {
  position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.35); font-size: 1rem; pointer-events: none; line-height: 1;
}
.m-search input {
  width: 100%; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 6px;
  color: #fff; font-size: 0.85rem; padding: 0.4rem 0.75rem 0.4rem 2rem;
  font-family: inherit; outline: none; transition: border-color 0.15s;
}
.m-search input::placeholder { color: rgba(255,255,255,0.32); }
.m-search input:focus { border-color: var(--amber); }

.m-pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.m-pill, .pill {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px; color: rgba(255,255,255,0.65);
  font-size: 0.75rem; font-weight: 500; padding: 0.25rem 0.65rem;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.m-pill:hover, .pill:hover { background: rgba(255,255,255,0.14); color: #fff; }
.m-pill.active, .pill.active {
  background: var(--amber); border-color: var(--amber); color: #000; font-weight: 600;
}
.m-locate {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px; color: rgba(255,255,255,0.65);
  font-size: 0.8rem; font-weight: 500; padding: 0.35rem 0.65rem;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: background 0.12s, color 0.12s;
}
.m-locate:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ---- Map container ---- */
.map-shell { position: relative; min-height: 0; overflow: hidden; }
#aircon-map { width: 100%; height: 100%; }

.map-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface); gap: 0.75rem;
  font-size: 0.9rem; color: rgba(255,255,255,0.45); z-index: 1;
}
.map-loading__spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--amber);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Inner page layout ---- */
.v2-inner .page { display: flex; flex-direction: column; min-height: 100dvh; }
.m-content { flex: 1; padding: 1.5rem 1rem 2rem; max-width: 900px; margin: 0 auto; width: 100%; }

/* ---- Page title ---- */
.m-page-title {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  color: #fff;
}
.m-page-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.5rem;
}

/* ---- Section divider ---- */
.m-section { margin-bottom: 2.5rem; }
.m-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

/* ---- Guide cards ---- */
.m-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.m-guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 0.15s, background 0.15s;
}
.m-guide-card:hover { border-color: rgba(255,255,255,0.25); background: var(--surface2); }
.m-guide-card__tag {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber);
}
.m-guide-card__title {
  font-size: 0.95rem; font-weight: 600; color: #fff; line-height: 1.3;
}
.m-guide-card__excerpt { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.45; }
.m-guide-card__arrow { font-size: 0.75rem; color: rgba(255,255,255,0.25); margin-top: auto; padding-top: 0.5rem; }

/* ---- Product cards ---- */
.m-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.m-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.m-product-card:hover { border-color: rgba(255,255,255,0.25); background: var(--surface2); }
.m-product-card__img {
  aspect-ratio: 4/3; overflow: hidden; background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
}
.m-product-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 0.75rem; }
.m-product-card__body { padding: 0.85rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.m-product-card__for { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.m-product-card__title { font-size: 0.88rem; font-weight: 600; color: #fff; line-height: 1.3; }
.m-product-card__cta {
  margin-top: auto; padding-top: 0.65rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.35);
}
.m-product-card__overlay {
  position: absolute; inset: 0; z-index: 1;
}
.m-affiliate-note {
  font-size: 0.72rem; color: rgba(255,255,255,0.28);
  margin-top: 1rem; line-height: 1.5;
}
.m-affiliate-note a { color: rgba(255,255,255,0.4); text-decoration: underline; }

/* ---- Disclaimer footer strip ---- */
.m-disclaimer {
  border-top: 1px solid var(--border);
  padding: 0.6rem 1rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  line-height: 1.6;
  flex-shrink: 0;
}
.m-disclaimer a { color: rgba(255,255,255,0.35); text-decoration: underline; }
.m-disclaimer a:hover { color: var(--amber); }

/* visually-hidden helper */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---- Map markers ---- */
.aircon-marker { cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.aircon-marker__pin {
  width: 14px; height: 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--sky); border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35); transition: transform 0.15s;
}
.aircon-marker:hover .aircon-marker__pin,
.aircon-marker:focus .aircon-marker__pin { transform: rotate(-45deg) scale(1.25); }
.aircon-marker__pin::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.aircon-marker--pub        .aircon-marker__pin { background: #2563EB; }
.aircon-marker--bar        .aircon-marker__pin { background: #7C3AED; }
.aircon-marker--cafe       .aircon-marker__pin { background: #0F766E; }
.aircon-marker--restaurant .aircon-marker__pin { background: #16A34A; }
.aircon-marker--public     .aircon-marker__pin { background: #B45309; }
.aircon-marker--other      .aircon-marker__pin { background: #64748B; }

/* ---- Map popup ---- */
.map-popup { font-size: 0.85rem; min-width: 180px; max-width: 260px; line-height: 1.4; }
.map-popup p { margin-bottom: 0.4rem; }
.map-popup__name { font-weight: 700; font-size: 0.95rem; }
.map-popup__symbol { font-size: 1.1rem; }
.map-popup__cat { font-size: 0.75rem; color: #555; text-transform: capitalize; }
.map-popup__badge {
  display: inline-block; background: #ECFDF5; color: #065F46;
  border: 1px solid #A7F3D0; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600; padding: 1px 6px; margin-top: 0.2rem;
}
.map-popup__addr, .map-popup__hours, .map-popup__verified { color: #555; font-size: 0.78rem; }
.map-popup__links { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.map-popup__link { font-size: 0.75rem; color: var(--sky); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Guide content ---- */
.m-prose {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.9rem;
}
.m-prose strong { color: #fff; }
.m-prose a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.m-prose a:hover { color: #fff; }

.m-inline-product {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.m-inline-product:hover { color: #fff; }

.m-checklist { display: flex; flex-direction: column; gap: 0.75rem; }
.m-check {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.88rem; line-height: 1.5; color: rgba(255,255,255,0.75);
}
.m-check strong { color: #fff; display: block; margin-bottom: 0.1rem; }
.m-check a { color: var(--amber); }
.m-check__icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 0.1rem; }

.m-product-row { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.m-product-chip {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.65rem 0.85rem;
  transition: border-color 0.15s, background 0.15s;
}
.m-product-chip:hover { border-color: rgba(255,255,255,0.25); background: var(--surface2); }
.m-product-chip img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.m-product-chip div { flex: 1; min-width: 0; }
.m-product-chip strong { display: block; font-size: 0.82rem; color: #fff; line-height: 1.3; }
.m-product-chip span { font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.m-chip-arrow { color: rgba(255,255,255,0.25); font-size: 0.85rem; flex-shrink: 0; }

.m-cta-block {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--amber-dim); border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius); padding: 0.85rem 1rem;
  margin: 0.5rem 0;
  transition: border-color 0.15s, background 0.15s;
}
.m-cta-block:hover { background: rgba(245,158,11,0.22); border-color: rgba(245,158,11,0.5); }
.m-cta-block__icon { font-size: 1.4rem; flex-shrink: 0; }
.m-cta-block div { flex: 1; }
.m-cta-block strong { display: block; font-size: 0.9rem; color: #fff; }
.m-cta-block span { font-size: 0.78rem; color: rgba(255,255,255,0.5); }

.m-guide-more { margin-top: 0.75rem; }
.m-guide-more a { font-size: 0.82rem; color: rgba(255,255,255,0.45); text-decoration: underline; text-underline-offset: 3px; }
.m-guide-more a:hover { color: var(--amber); }

.m-link-list { display: flex; flex-direction: column; gap: 0.5rem; }
.m-link-list a {
  font-size: 0.88rem; color: rgba(255,255,255,0.6);
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.m-link-list a:hover { color: var(--amber); }
.m-link-list a:last-child { border-bottom: none; }

/* ---- Form ---- */
.m-form { display: flex; flex-direction: column; gap: 1rem; }
.m-field { display: flex; flex-direction: column; gap: 0.35rem; }
.m-label { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.m-label-optional { font-weight: 400; color: rgba(255,255,255,0.35); }
.m-input {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.m-input::placeholder { color: rgba(255,255,255,0.25); }
.m-input:focus { border-color: var(--amber); }
.m-select { appearance: none; cursor: pointer; }
.m-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.m-submit-btn {
  background: var(--amber); border: none; border-radius: var(--radius);
  color: #000; font-family: inherit; font-size: 0.92rem; font-weight: 700;
  padding: 0.7rem 1.5rem; cursor: pointer; align-self: flex-start;
  transition: opacity 0.15s;
}
.m-submit-btn:hover { opacity: 0.88; }
.m-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.m-form-status {
  padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem;
}
.m-form-status--ok { background: rgba(16,163,74,0.15); border: 1px solid rgba(16,163,74,0.3); color: #6ee7b7; }
.m-form-status--err { background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.3); color: #fca5a5; }

/* ---- Article body (markdown-rendered HTML in dark theme) ---- */
.m-article h1, .m-article h2, .m-article h3, .m-article h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: #fff; line-height: 1.3; margin: 1.5rem 0 0.6rem;
}
.m-article h1 { font-size: clamp(1.3rem, 4vw, 1.8rem); margin-top: 0; }
.m-article h2 { font-size: clamp(1.1rem, 3vw, 1.35rem); }
.m-article h3 { font-size: 1rem; }
.m-article p { font-size: 0.9rem; line-height: 1.75; color: rgba(255,255,255,0.72); margin-bottom: 0.85rem; }
.m-article strong { color: #fff; }
.m-article a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.m-article a:hover { color: #fff; }
.m-article a[rel~="sponsored"] { color: var(--amber); font-weight: 500; }
.m-article ul, .m-article ol { padding-left: 1.3rem; margin-bottom: 0.85rem; }
.m-article li { font-size: 0.9rem; line-height: 1.65; color: rgba(255,255,255,0.72); margin-bottom: 0.3rem; }
.m-article blockquote {
  border-left: 3px solid var(--amber); padding-left: 1rem; margin: 1rem 0;
  color: rgba(255,255,255,0.5); font-style: italic; font-size: 0.9rem;
}
.m-article hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.m-article .callout {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem; margin: 1rem 0;
  font-size: 0.86rem; color: rgba(255,255,255,0.65); line-height: 1.55;
}
.m-article .callout strong { color: #fff; }
/* hide main-site-only elements that don't translate */
.m-article .article-hero,
.m-article .breadcrumb,
.m-article .article-meta,
.m-article .affiliate-note,
.m-article nav { display: none; }

.m-back { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem;
  color: rgba(255,255,255,0.35); margin-bottom: 1.25rem; }
.m-back:hover { color: var(--amber); }

/* ---- Simple prose page (legal) ---- */
.m-legal h1 { font-family: Georgia, serif; font-size: 1.4rem; color: #fff; margin-bottom: 0.25rem; }
.m-legal .m-page-sub { margin-bottom: 1.5rem; }
.m-legal h2 { font-family: Georgia, serif; font-size: 1rem; color: #fff; margin: 1.25rem 0 0.4rem; }
.m-legal h3 { font-size: 0.9rem; color: rgba(255,255,255,0.8); margin: 0.85rem 0 0.3rem; }
.m-legal p, .m-legal li { font-size: 0.86rem; line-height: 1.7; color: rgba(255,255,255,0.6); margin-bottom: 0.6rem; }
.m-legal a { color: var(--amber); }
.m-legal ul { padding-left: 1.2rem; }

/* ---- Calculator ---- */
.m-calc { display: flex; flex-direction: column; gap: 1.25rem; }
.m-calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.m-calc-result {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.m-calc-result__label { font-size: 0.72rem; color: rgba(255,255,255,0.4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.m-calc-result__value { font-size: 1.5rem; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.m-calc-result__sub { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.m-calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.m-calc-note { font-size: 0.78rem; color: rgba(255,255,255,0.35); line-height: 1.55; }
.m-calc-note a { color: var(--amber); }

/* ---- Responsive ---- */
@media (max-width: 500px) {
  .m-stat { display: none; }
  .m-controls { gap: 0.35rem; }
  .m-guide-grid, .m-product-grid { grid-template-columns: 1fr; }
}
