:root {
  --bg: #f7f8f9;
  --surface: #ffffff;
  --ink: #1a1f24;
  --muted: #6b7480;
  --line: #e6e8ec;
  --brand: #0d6e3f;
  --brand-soft: #d8f0e2;
  --warn: #b6651e;
  --warn-soft: #fbe8d3;
  --danger: #b73838;
  --shadow-1: 0 1px 2px rgba(15, 23, 30, 0.06), 0 4px 12px rgba(15, 23, 30, 0.05);
  --shadow-2: 0 8px 28px rgba(15, 23, 30, 0.18);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Cairo", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;        /* belt-and-braces — no rogue 100vw element should scroll the page sideways */
}

/* App shell uses a flex column so the map can simply fill remaining space. */
body.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
}

button { font: inherit; }

/* ============= Hugeicons inline SVG sizing ============= */
.i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.18em;
  line-height: 0;
}
.i svg {
  width: 1.15em;
  height: 1.15em;
  stroke-width: 1.5;
  flex: 0 0 auto;
}
.btn-i svg, .tab .i svg, .chip .i svg { width: 1.05em; height: 1.05em; }
.card-i svg { width: 1.6em; height: 1.6em; color: var(--brand); }
.loc-i svg { width: 1em; height: 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============= Login ============= */

.login-body {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--brand-soft) 0%, transparent 60%),
    var(--bg);
  padding: 24px;
}

.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-1);
  text-align: center;
}

.login-logo { font-size: 48px; line-height: 0; color: var(--brand); }
.login-logo svg { width: 56px; height: 56px; }
.login-card h1 { margin: 12px 0 4px; font-size: 22px; }
.login-subtitle { color: var(--muted); margin: 0 0 24px; }

.login-card input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: var(--bg);
}
.login-card input:focus { border-color: var(--brand); background: var(--surface); }

.login-card button {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font-size: 16px; font-weight: 700;
  background: var(--brand); color: white;
  border: none; border-radius: var(--radius);
  cursor: pointer;
}
.login-card button:disabled { opacity: 0.6; cursor: progress; }

.login-error {
  color: var(--danger);
  margin: 12px 0 0;
  font-size: 14px;
}

/* ============= Top bar / search / filters ============= */

.topbar {
  flex: 0 0 auto;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 8px;
  padding-top: max(env(safe-area-inset-top, 0px), 12px);
}

.topbar-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}

.brand { margin: 0; font-size: 18px; }
.brand-tier { color: var(--brand); font-weight: 700; }

.view-toggle {
  display: inline-flex;
  background: var(--bg);
  border-radius: 999px;
  padding: 3px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.searchbar { margin-top: 10px; }
/* iOS-safe input baseline: anything below 16px triggers Safari's auto-zoom on focus,
   which shifts the sticky header out of place. */
input, select, textarea { font-size: 16px; }

.searchbar input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  outline: none;
}
.searchbar input:focus { border-color: var(--brand); background: var(--surface); }

.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 10px -16px 0;
  padding: 4px 16px 6px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active { background: var(--brand); color: white; border-color: var(--brand); }
.chip[data-access="er"].active { background: var(--warn); border-color: var(--warn); }

.meta-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted);
  margin-top: 8px;
}

/* On the card view, hide network-specific topbar rows. */
body.view-card .searchbar,
body.view-card .filters,
body.view-card #count { display: none !important; }
body.view-card .meta-row { justify-content: flex-end; margin-top: 0; }
.link-btn {
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 12px; text-decoration: underline;
  padding: 0;
}

/* ============= Views ============= */

main {
  flex: 1 1 auto;
  min-height: 0;          /* allow children to shrink/scroll */
  display: flex;
  flex-direction: column;
}

.view { display: none; flex: 1 1 auto; min-height: 0; }
.view.active { display: flex; flex-direction: column; }

/* List view scrolls; map view fills remaining space. */
#view-list.active {
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px max(96px, env(safe-area-inset-bottom, 16px));
}

#view-map.active {
  padding: 0;
  margin: 0;
}
.map-canvas {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
}

/* ============= Map pins ============= */

.map-pin {
  --pin-bg: #2c7be5;
  --pin-border: rgba(255, 255, 255, 0.95);
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--pin-bg);
  border: 2px solid var(--pin-border);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.28),
    inset 0 -2px 6px rgba(0, 0, 0, 0.18),
    inset 0 2px 4px rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-pin:hover {
  transform: rotate(-45deg) scale(1.12);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.32),
    inset 0 -2px 6px rgba(0, 0, 0, 0.18),
    inset 0 2px 4px rgba(255, 255, 255, 0.18);
  z-index: 10;
}

.map-pin-glyph {
  display: inline-flex;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  color: #fff;
}

.map-pin-glyph svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Subtle ring to distinguish hospitals from other clinics at zoom-out. */
.map-pin-hospital {
  --pin-border: #fff7e6;
  outline: 2px solid rgba(192, 57, 43, 0.35);
  outline-offset: 2px;
}

.map-pin-er {
  --pin-border: #ffe1b8;
  box-shadow:
    0 0 0 2px rgba(182, 101, 30, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.28),
    inset 0 -2px 6px rgba(0, 0, 0, 0.18);
}

/* "You are here" — round, blue, pulse to draw the eye. */
.map-pin-user {
  --pin-bg: #1a73e8;
  --pin-border: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  transform: none;
  width: 28px;
  height: 28px;
  box-shadow:
    0 0 0 0 rgba(26, 115, 232, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.3);
  animation: enaya-user-pulse 1.8s ease-out infinite;
}

.map-pin-user:hover {
  transform: scale(1.1);
}

.map-pin-user .map-pin-glyph {
  transform: none;
  width: 16px;
  height: 16px;
}

@keyframes enaya-user-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(26, 115, 232, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3); }
  70%  { box-shadow: 0 0 0 14px rgba(26, 115, 232, 0),    0 2px 6px rgba(0, 0, 0, 0.3); }
  100% { box-shadow: 0 0 0 0   rgba(26, 115, 232, 0),    0 2px 6px rgba(0, 0, 0, 0.3); }
}

/* ============= Provider card ============= */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
}

.card-head {
  display: flex; align-items: flex-start; gap: 10px;
}
.card-icon {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  border-radius: 10px;
  font-size: 22px;
}
.card-title { flex: 1; }
.card-name-ar { font-size: 15px; font-weight: 700; line-height: 1.35; }
.card-name-en { font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.3; }

.card-loc {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
  margin-top: 8px;
}

.badges {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
}
.badge {
  font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
}
.badge.direct  { background: var(--brand-soft); color: var(--brand); }
.badge.er      { background: var(--warn-soft);  color: var(--warn); }
.badge.moh     { background: #e2ecf7;           color: #1a4d7d; }

.card-rating {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
  font-size: 13px;
}
.card-rating .stars-display { color: #d4a017; letter-spacing: 1px; }
.card-rating.empty { color: var(--muted); }
.card-note {
  margin-top: 6px;
  background: #fafbe8;
  border-right: 3px solid #d4a017;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: pre-wrap;
}

.card-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ============= Modal ============= */

.modal {
  border: none;
  padding: 0;
  border-radius: var(--radius-lg);
  width: 100%; max-width: 420px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.modal::backdrop { background: rgba(0,0,0,0.4); }

#rating-form { padding: 22px 22px 18px; }
.modal h2 { margin: 0 0 4px; font-size: 18px; }
.muted { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.stars {
  display: flex; gap: 4px; justify-content: center;
  margin: 8px 0 18px;
}
.star {
  background: transparent;
  border: none;
  font-size: 36px;
  line-height: 1;
  color: #d8d8d8;
  cursor: pointer;
  padding: 0;
}
.star.on { color: #d4a017; }

.field {
  display: block;
  margin-bottom: 12px;
}
.field span {
  display: block;
  font-size: 13px; color: var(--muted);
  margin-bottom: 5px;
}
.field textarea, .field input[type="date"], .field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  outline: none;
}
.field textarea:focus, .field input:focus { border-color: var(--brand); background: var(--surface); }

.modal-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.btn-ghost, .btn-primary {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn-ghost.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-primary { background: var(--brand); color: white; border-color: var(--brand); }

/* ============= Toast ============= */

.toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: white;
  padding: 10px 16px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow-2);
  z-index: 100;
  max-width: 90vw;
}
.toast.danger { background: var(--danger); }

/* ============= Bottom sheet (map detail) ============= */

.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow-2);
  z-index: 60;
  max-height: 60vh; overflow: auto;
}
.sheet .card { margin-bottom: 0; box-shadow: none; border: none; padding: 0; }

@media (min-width: 720px) {
  #view-list.active { padding: 16px 32px max(96px, env(safe-area-inset-bottom, 16px)); }
  .modal { max-width: 480px; }
}

/* ============= Card view (policy benefits) ============= */

#view-card.active {
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px max(120px, env(safe-area-inset-bottom, 16px));
}

.person-pills {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 4px;
  margin: 0 -16px;
  padding-inline: 16px;
  background:
    linear-gradient(to bottom, var(--bg) 70%, transparent 100%);
  scrollbar-width: none;
}
.person-pills::-webkit-scrollbar { display: none; }

.person-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s;
}
.person-pill[aria-selected="true"] {
  border-color: transparent;
  background: var(--accent, var(--brand));
  color: white;
  box-shadow: var(--shadow-1);
}
.person-pill:active { transform: scale(0.97); }

.person-pill-avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--brand)) 18%, white);
  color: var(--accent, var(--brand));
  font-weight: 800; font-size: 14px;
  line-height: 1;
}
.person-pill[aria-selected="true"] .person-pill-avatar {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

/* Holder card hero --------------------------------------- */

.holder-card {
  margin-top: 4px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(140% 80% at 100% 0%, color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent) 0%, transparent 60%),
    linear-gradient(150deg, var(--accent, var(--brand)) 0%, color-mix(in srgb, var(--accent, var(--brand)) 70%, #1a1f24) 100%);
  color: white;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.holder-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.holder-card-top {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.92;
}
.holder-card-top .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}
.holder-card-top .status-pill {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.holder-card-top .status-pill::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6ce58e;
  box-shadow: 0 0 0 3px rgba(108, 229, 142, 0.25);
}

.holder-name-ar {
  font-size: 22px; font-weight: 800;
  margin: 14px 0 2px;
  line-height: 1.25;
}
.holder-name-en {
  font-size: 12px; font-weight: 600;
  opacity: 0.78;
  letter-spacing: 0.05em;
}

.holder-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 12px;
}
.holder-chip {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.holder-rows {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.holder-row {
  display: block;
  font-size: 11px;
  opacity: 0.82;
  letter-spacing: 0.02em;
}
.holder-row strong {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700;
  margin-top: 2px;
  opacity: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.holder-row.full { grid-column: 1 / -1; }
.copy-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: background 0.15s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.22); }
.copy-btn svg { width: 14px; height: 14px; }

.holder-dates {
  margin-top: 14px;
  display: flex; align-items: stretch; gap: 8px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
}
.holder-date {
  flex: 1;
  font-size: 11px;
  opacity: 0.82;
}
.holder-date strong {
  display: block;
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  opacity: 1;
}
.holder-date.arrow {
  flex: 0 0 auto;
  align-self: center;
  font-size: 18px;
  opacity: 0.7;
}

/* Hero coverage tile ------------------------------------- */

.hero-tile {
  margin-top: 14px;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
}
.hero-tile-icon {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--brand);
  color: white;
  display: grid; place-items: center;
}
.hero-tile-icon svg { width: 28px; height: 28px; stroke-width: 1.6; }
.hero-tile-body { flex: 1; min-width: 0; }
.hero-tile-label {
  font-size: 13px; font-weight: 600;
  color: var(--brand);
  margin: 0 0 2px;
}
.hero-tile-value {
  font-size: 26px; font-weight: 800;
  color: #0a4a2a;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.hero-tile-sub {
  font-size: 12px; color: var(--muted);
  margin-top: 4px;
}

/* Section title ------------------------------------------ */

.card-section-title {
  margin: 22px 2px 10px;
  font-size: 14px; font-weight: 700;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.card-section-title::after {
  content: "";
  flex: 1; height: 1px; background: var(--line);
}

/* Benefit grid ------------------------------------------- */

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.benefit-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 112px;
  transition: transform 0.08s ease, border-color 0.15s, box-shadow 0.15s;
}
.benefit-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-1); }
.benefit-tile:active { transform: translateY(1px); }
.benefit-tile-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
}
.benefit-tile-icon svg { width: 20px; height: 20px; }
.benefit-tile-label {
  font-size: 13px; font-weight: 700;
  line-height: 1.3;
}
.benefit-tile-value {
  font-size: 13px; color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.benefit-tile-sub {
  font-size: 11px; color: var(--muted);
}

/* Single-column on very small screens */
@media (max-width: 359px) {
  .benefit-grid { grid-template-columns: 1fr; }
}

/* Contact cards ------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.contact-card-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
}
.contact-card-head .i {
  color: var(--brand);
}
.contact-card-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.contact-card-actions .btn {
  flex: 1 1 calc(50% - 3px);
  padding: 8px;
  font-size: 12px;
}
.contact-card-meta {
  font-size: 11px; color: var(--muted);
  word-break: break-all;
}
@media (max-width: 419px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Coverage area + footer note ---------------------------- */

.coverage-strip {
  margin-top: 14px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 12px; color: var(--muted);
}
.coverage-strip strong { color: var(--ink); font-weight: 700; }

/* Benefit modal ------------------------------------------ */

.benefit-modal { max-width: 460px; }
#benefit-modal-body { padding: 22px 22px 18px; }

.benefit-modal-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.benefit-modal-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.benefit-modal-icon svg { width: 24px; height: 24px; }
.benefit-modal-titles { flex: 1; min-width: 0; }
.benefit-modal-titles h2 {
  margin: 0;
  font-size: 18px; font-weight: 800;
}
.benefit-modal-titles .muted { margin: 2px 0 0; font-size: 12px; }

.benefit-modal-value {
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.benefit-modal-value-ar {
  font-size: 18px; font-weight: 800;
  color: #0a4a2a;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.benefit-modal-value-en {
  font-size: 12px; color: var(--brand);
  margin-top: 4px; direction: ltr; text-align: left;
}

.benefit-modal-desc p {
  margin: 0 0 12px;
  font-size: 14px; line-height: 1.7;
  white-space: pre-line;
}
.benefit-modal-desc p.muted { font-size: 13px; line-height: 1.6; }

/* Card-view tablet tweaks -------------------------------- */

@media (min-width: 720px) {
  #view-card.active { padding: 0 32px max(120px, env(safe-area-inset-bottom, 16px)); }
  .holder-rows { grid-template-columns: repeat(3, 1fr); }
  .benefit-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-tile-value { font-size: 32px; }
}
