/* ── StorageCompare Module Styles ────────────────────────────────────────────
   Restored 2026-08-28 to the module's own original design ("Industrial
   Clarity": a calm paper surface, graphite ink, signal-lime accents and
   Manrope + DM Mono type — see the source React/Tailwind template's
   client/src/index.css). An earlier build pass had deliberately stripped
   this out and fallen back to bimbly.eu's generic site-wide purple
   (var(--brand)#7657ff / var(--brand2)#9a7dff) — that homogenization is
   reverted here.

   Everything below is scoped inside `.sc-scope`, the wrapper div that
   templates/header.php opens and templates/footer.php closes around this
   module's own page content (inside <main>, after the shared top ad slot /
   breadcrumbs and before the shared footer ad slot). Custom properties only
   cascade downward, so redefining --brand/--surface/--muted/etc. here can
   never leak into bimbly's shared header, module-nav or footer, which live
   outside `.sc-scope` and keep the site-wide purple untouched.

   Class names sc-* remain module-scoped, unchanged from before — only their
   declarations changed, so no PHP templates needed markup changes for this.
   ───────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

.sc-scope {
  /* Module's own palette tokens */
  --sc-bg: #F5F4EF;           /* paper */
  --sc-surface: #FCFCF9;      /* card surface */
  --sc-surface-2: #ECECE5;    /* secondary section fill */
  --sc-surface-soft: #E9E9E2; /* pill / chip fill */
  --sc-text: #20231E;         /* graphite ink */
  --sc-muted: #6E706A;        /* slate grey */
  --sc-line: #D4D5CE;         /* hairline border */
  --sc-ink: #20231E;          /* primary CTA fill */
  --sc-lime: #C8F15A;         /* signal-lime accent fill */
  --sc-lime-text: #718C24;    /* readable olive-lime for accent text on paper */
  --sc-danger: #B63A31;
  --sc-radius: 4px;
  --sc-radius-lg: 6px;
  --sc-shadow: 6px 7px 0 rgba(32, 35, 30, .14);
  --sc-shadow-sm: 4px 5px 0 rgba(32, 35, 30, .12);

  /* Back-compat: the generic tokens bimbly.css exposes site-wide, overridden
     here only inside this wrapper — inline `style="color:var(--muted)"` etc.
     used across the module's PHP templates keep working, now resolving to
     the module's own palette instead of the shared purple identity. */
  --brand: var(--sc-ink);
  --brand2: var(--sc-lime);
  --bg: var(--sc-bg);
  --surface: var(--sc-surface);
  --surface2: var(--sc-surface-2);
  --surface-soft: var(--sc-surface-soft);
  --text: var(--sc-text);
  --muted: var(--sc-muted);
  --line: var(--sc-line);
  --radius: var(--sc-radius-lg);
  --shadow: var(--sc-shadow);

  display: block;
  background: var(--sc-bg);
  color: var(--sc-text);
  font-family: "Manrope", sans-serif;
}
.sc-scope h1, .sc-scope h2, .sc-scope h3 { font-weight: 800; letter-spacing: -.02em; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.sc-hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 60px);
  padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 80px);
  border-bottom: 1px solid var(--sc-line);
  background: var(--sc-bg);
}
.sc-hero-section .hero-content { padding-top: 0; }
.sc-hero-section h1 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  color: var(--sc-text);
}
.sc-hero-section .hero-copy {
  font-size: 1.08rem;
  color: var(--sc-muted);
  margin: 18px 0 0;
  line-height: 1.6;
  max-width: 520px;
}
.sc-hero-visual { align-self: start; }

/* ── Search form — a dark "console" bar, matching the source's search-console ── */
.sc-search-form { margin-top: 28px; max-width: 720px; }
.sc-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--sc-ink);
  border: 1px solid var(--sc-ink);
  border-radius: var(--sc-radius);
  padding: 14px;
  box-shadow: var(--sc-shadow);
}
.sc-input, .sc-select, .sc-textarea {
  border: 1px solid var(--sc-line);
  background: var(--sc-surface);
  border-radius: var(--sc-radius);
  padding: 12px 14px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--sc-text);
  flex: 1;
  min-width: 120px;
}
.sc-textarea { width: 100%; min-height: 110px; resize: vertical; }
/* Dark-console context: inputs/selects flip to light-on-graphite */
.sc-search-row .sc-input,
.sc-search-row .sc-select {
  background: transparent;
  border-color: #55584F;
  color: #FCFCF9;
}
.sc-search-row .sc-input::placeholder { color: #9C9F96; }
.sc-search-row .sc-btn-primary { background: var(--sc-lime); color: var(--sc-ink); }
.sc-search-row .sc-btn-primary:hover { background: #D8FA81; }

/* ── Buttons — flat fills, no gradients (source uses solid colour blocks) ───── */
.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--sc-radius);
  padding: 12px 20px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.sc-btn-primary { background: var(--sc-ink); color: var(--sc-bg); }
.sc-btn-primary:hover { background: #3A3D36; transform: translateY(-1px); box-shadow: var(--sc-shadow-sm); }
.sc-btn-primary:active { transform: scale(.97); }
.sc-btn-ghost { background: var(--sc-surface-soft); color: var(--sc-ink); border-color: var(--sc-line); }
.sc-btn-ghost:hover { border-color: var(--sc-ink); }
.sc-btn-ghost.is-active { background: var(--sc-lime); border-color: var(--sc-lime); color: var(--sc-ink); }
.sc-btn-sm { padding: 8px 14px; font-size: .76rem; }
.sc-btn-full { width: 100%; }

/* ── Hero stats panel ─────────────────────────────────────────────────────── */
.sc-hero-panel {
  background: var(--sc-surface);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius-lg);
  padding: 24px;
  box-shadow: var(--sc-shadow);
}
.sc-hero-panel-stats { display: flex; gap: 24px; }
.sc-hero-stat { display: flex; flex-direction: column; }
.sc-hero-stat-val { font: 800 1.9rem "DM Mono", monospace; letter-spacing: -1px; color: var(--sc-ink); }
.sc-hero-stat-lbl { font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--sc-muted); margin-top: 4px; }

/* ── Section head ─────────────────────────────────────────────────────────── */
.sc-section-head { margin: 12px 0 20px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.sc-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius-lg);
  padding: 20px;
}

/* ── Location results grid ────────────────────────────────────────────────── */
.sc-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.sc-location-card {
  display: block;
  background: var(--sc-surface);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s cubic-bezier(.23,1,.32,1), box-shadow .18s cubic-bezier(.23,1,.32,1), border-color .18s ease;
}
.sc-location-card:hover { transform: translateY(-3px); box-shadow: var(--sc-shadow); border-color: #C6C7BF; }
.sc-location-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sc-location-card-head h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.02em; }
.sc-location-city { color: var(--sc-muted); font-size: .84rem; margin: 8px 0; }
.sc-location-meta { display: flex; flex-wrap: wrap; gap: 8px; font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .03em; color: var(--sc-muted); margin-bottom: 12px; }
.sc-location-meta span { background: var(--sc-surface-soft); border-radius: 3px; padding: 3px 7px; }
.sc-location-price { display: flex; align-items: baseline; gap: 6px; border-top: 1px dashed var(--sc-line); padding-top: 10px; }
.sc-location-price-label { font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .04em; color: var(--sc-muted); }
.sc-location-price-val { font: 800 1.15rem "DM Mono", monospace; color: var(--sc-ink); }

/* ── Status badges — rectangular tags, not pills (source never uses pill shapes) */
.sc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 3px;
  font: 700 10px "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #20231E;
  background: var(--sc-muted);
  white-space: nowrap;
}
.sc-badge-verified { background: var(--sc-lime); color: #20231E; }
.sc-badge-imported,
.sc-badge-provider_submitted,
.sc-badge-user_submitted { background: #B9BCB0; color: #20231E; }
.sc-badge-stale { background: var(--sc-danger); color: #fff; }
.sc-badge-unverified,
.sc-badge-manual { background: var(--sc-muted); color: #fff; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.sc-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.sc-page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; border-radius: 3px;
  background: var(--sc-surface); border: 1px solid var(--sc-line);
  color: var(--sc-text); text-decoration: none; font: .78rem "DM Mono", monospace;
}
.sc-page-link:hover { border-color: var(--sc-ink); }
.sc-page-link.is-active { background: var(--sc-ink); border-color: var(--sc-ink); color: var(--sc-bg); }

/* ── Facility detail ──────────────────────────────────────────────────────── */
.sc-back-link { color: var(--sc-lime-text); text-decoration: none; font: 700 .8rem "DM Mono", monospace; text-transform: uppercase; letter-spacing: .04em; }
.sc-back-link:hover { color: var(--sc-ink); }
.sc-facility-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.sc-facility-head h1 { margin: 0; }
.sc-facility-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.sc-facility-meta-item {
  display: flex; flex-direction: column; gap: 3px; font-size: .88rem;
  padding: 12px 14px; background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: var(--sc-radius);
}
.sc-facility-meta-label { font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--sc-lime-text); }

/* ── Tables (unit list + compare) ─────────────────────────────────────────── */
.sc-table-wrap { overflow-x: auto; border-radius: var(--sc-radius-lg); border: 1px solid var(--sc-line); }
.sc-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 640px; background: var(--sc-surface); }
.sc-table th, .sc-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--sc-line); }
.sc-table thead th { background: var(--sc-surface-soft); font: 700 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .04em; color: var(--sc-muted); }
.sc-table tbody tr:last-child td { border-bottom: none; }
.sc-table tbody tr:hover td { background: var(--sc-surface-soft); }
.sc-compare-table th:first-child { background: var(--sc-surface-soft); white-space: nowrap; font-family: "DM Mono", monospace; }
.sc-compare-sub { font-size: .72rem; color: var(--sc-muted); font-weight: 400; margin-top: 2px; }

/* ── How it works / FAQ ───────────────────────────────────────────────────── */
.sc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 28px 0; }
.sc-step { background: var(--sc-surface); border: 1px solid var(--sc-line); border-top: 3px solid var(--sc-lime); border-radius: var(--sc-radius); padding: 18px; }
.sc-step h3 { margin: 0 0 8px; font-size: 1rem; color: var(--sc-ink); }
.sc-faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 20px; border-top: 1px solid var(--sc-line); }
.sc-faq-item { border-bottom: 1px solid var(--sc-line); padding: 16px 0; }
.sc-faq-item h3 { margin: 0 0 6px; font-size: 1rem; }
.sc-faq-item p { margin: 0; color: var(--sc-muted); }

/* ── Forms (request / provider onboarding) ───────────────────────────────── */
.sc-form-card { margin-top: 16px; }
.sc-form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sc-form-field label { font: 700 .78rem "DM Mono", monospace; text-transform: uppercase; letter-spacing: .03em; color: var(--sc-muted); }
.sc-honeypot { position: absolute; left: -9999px; top: -9999px; }
.sc-alert { border-radius: var(--sc-radius); padding: 14px 16px; margin: 16px 0; font-size: .88rem; border: 1px solid transparent; }
.sc-alert-info { background: var(--sc-surface-soft); color: var(--sc-text); border-color: var(--sc-line); }
.sc-alert-success { background: #dcfce7; color: #14532d; border-color: #bbf7d0; }
.sc-alert-danger { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; }

/* ── RTL support (ar locale) ─────────────────────────────────────────────── */
[dir="rtl"] .sc-hero-panel-stats,
[dir="rtl"] .sc-location-meta,
[dir="rtl"] .sc-pagination { direction: rtl; }

/* ── Floating "compare selected" bar (assets/js/app.js) ──────────────────────
   Lives on a graphite background matching .sc-btn-primary, so its own CTA
   needs the lime accent instead — otherwise the button disappears into the
   bar. Mirrors the source's dark compare-dock treatment. */
#scCompareBar { font-size: .86rem; }
#scCompareBar .sc-btn-primary { background: var(--sc-lime); color: var(--sc-ink); }
#scCompareBar .sc-btn-primary:hover { background: #D8FA81; }
#scCompareBar .sc-btn-ghost { background: transparent; border-color: #55584F; color: var(--sc-bg); }
#scCompareBar .sc-btn-ghost:hover { border-color: var(--sc-lime); color: var(--sc-lime); }

@media (max-width: 760px) {
  .sc-hero-section { grid-template-columns: 1fr; }
  .sc-search-row { flex-direction: column; align-items: stretch; }
  .sc-input, .sc-select { width: 100%; }
}
