/* ============================================================================
   Shared marketing-site chrome — nav header, brand wordmark, buttons, language
   menu, and modal (contact form + help-center iframe).

   Mirrors the landing page (templates/landing_page.html) 1:1 so any page that
   includes the header/footer/modal partials looks and behaves identically.
   Values are inlined (not var()) so the chrome renders the same regardless of
   the host page's own design tokens.
   ============================================================================ */

:root {
  --wc-ink: #0B0B12;
  --wc-ink-mute: #7A7A88;
  --wc-line: rgba(11,11,18,.08);
  --wc-line-strong: rgba(11,11,18,.14);
  --wc-bg: #FBFAF8;
  --wc-tint: #9381FF;
  --wc-tint-dark: #C7B0FF;
  --wc-bookings-dark: #228381;
  --wc-shadow-lift: 0 4px 12px rgba(11,11,18,.06), 0 30px 60px rgba(11,11,18,.10);
  --wc-f-body: "Manrope","Heebo",system-ui,sans-serif;
  --wc-f-display: "Sora","Manrope","Heebo",system-ui,sans-serif;
}
html[lang="he"], html[lang="ar"], html[dir="rtl"] {
  --wc-f-body: "Heebo","Manrope",system-ui,sans-serif;
  --wc-f-display: "Heebo","Sora",system-ui,sans-serif;
}

/* container */
.wc-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wc-wrap { padding: 0 20px; } }

/* Normalize typography so the chrome renders identically on every page,
   independent of the host page's content typography (e.g. profile.css tightens
   letter-spacing and line-height for the profile body, and only inherits
   font-family onto buttons). The brand keeps its own metrics (defined below). */
.btn, .lang-btn, .lang-row,
.foot, .foot a, .foot button,
.modal, .modal .modal-sub, .modal-submit,
.field label, .field input, .field textarea {
  letter-spacing: normal;
  line-height: 1.55;
}

/* === NAV === */
.nav {
  position: sticky; top: 0; z-index: 40;
  -webkit-backdrop-filter: saturate(140%) blur(20px);
  backdrop-filter: saturate(140%) blur(20px);
  background: rgba(251,250,248,.72);
  border-bottom: 1px solid var(--wc-line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand {
  display: inline-flex; align-items: baseline;
  direction: ltr; unicode-bidi: isolate;
  font-family: "M PLUS Rounded 1c", system-ui, sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--wc-ink);
  line-height: 1;
  text-decoration: none;
}
.brand-x {
  display: inline-block;
  height: 0.50em;        /* matches measured x-height of M PLUS Rounded 1c */
  width: auto;
  margin: 0 0.02em;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Round icon buttons in the nav (help / theme / language) */
.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  padding: 0; border: 0;
  background: none;            /* glyphs are already circular — no backing pill */
  color: var(--wc-ink);
  cursor: pointer;
  transition: color .15s ease, transform .12s ease;
}
.icon-btn:hover  { color: var(--wc-tint); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg    { width: 34px; height: 34px; display: block; }

/* Theme toggle: show moon in light mode, sun in dark mode (CSS-driven, no flicker). */
#pp-theme-btn .ic-sun { display: none; }
[data-theme="dark"] #pp-theme-btn .ic-moon { display: none; }
[data-theme="dark"] #pp-theme-btn .ic-sun  { display: block; }

/* Language trigger: flag-only, same 44px round footprint */
.lang-btn.lang-flagonly {
  width: 44px; height: 44px;
  padding: 0; gap: 0;
  border: 0; background: none;
  border-radius: 50%;
  display: inline-grid; place-items: center;
}
.lang-btn.lang-flagonly:hover { border: 0; }
.lang-btn.lang-flagonly .lang-flag {
  width: 30px; height: 30px;   /* matches the ~30px visible ring of the help/theme glyphs */
  border-radius: 50%; overflow: hidden;
}
.lang-btn.lang-flagonly .lang-flag img { width: 100%; height: 100%; object-fit: cover; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  font-family: var(--wc-f-body);
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease, border-color .15s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: var(--wc-ink);
}
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--wc-ink); }
.btn-ghost:hover { background: rgba(11,11,18,.05); }

/* language menu */
.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--wc-line-strong);
  background: #fff;
  font-weight: 600; font-size: 14px;
  font-family: var(--wc-f-body);
  color: var(--wc-ink);
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--wc-ink); }
.lang-flag { width: 20px; height: 20px; border-radius: 50%; background: #eee; flex: none; display: inline-grid; place-items: center; font-size: 13px; overflow: hidden; }
.lang-flag .flag-img, .lang-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lang-pop {
  position: absolute; top: calc(100% + 8px);
  min-width: 220px;
  background: #fff; border: 1px solid var(--wc-line);
  border-radius: 18px;
  box-shadow: var(--wc-shadow-lift);
  padding: 8px; display: none; z-index: 50;
}
.lang-pop.open { display: block; }
[dir="ltr"] .lang-pop { right: 0; }
[dir="rtl"] .lang-pop { left: 0; }
.lang-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 10px 12px; border-radius: 12px;
  font-size: 15.5px; font-weight: 500; color: var(--wc-ink);
  font-family: var(--wc-f-body);
  text-decoration: none;
  cursor: pointer;
}
[dir="rtl"] .lang-row { flex-direction: row-reverse; justify-content: flex-end; }
.lang-row:hover { background: rgba(11,11,18,.05); }
.lang-row.active { background: rgba(147,129,255,.10); color: var(--wc-tint); }

/* === DARK MODE — chrome (nav, footer, modals) ===
   iOS-style: the blurred nav darkens instead of staying a light/near-white film,
   and chrome text flips to light. Flip the tokens, then override the literal
   light surfaces (nav/lang-pop/modal/fields). Matches the profile palette. */
[data-theme="dark"] {
  --wc-ink: #F3F3F4;
  --wc-ink-mute: #9A9AA2;
  --wc-line: rgba(255,255,255,.10);
  --wc-line-strong: rgba(255,255,255,.16);
}
[data-theme="dark"] .nav {
  background: rgba(18,19,22,.72);
  border-bottom-color: rgba(255,255,255,.10);
}
[data-theme="dark"] .lang-row:hover { background: rgba(255,255,255,.08); }
[data-theme="dark"] .lang-pop { background: #1b1c20; border-color: rgba(255,255,255,.10); }
[data-theme="dark"] .lang-row.active { background: rgba(147,129,255,.18); color: #c8b1ff; }
[data-theme="dark"] .foot a:hover,
[data-theme="dark"] .foot button:hover { color: var(--wc-ink); }
/* Contact form modal */
[data-theme="dark"] .modal { background: #1A1B1F; }
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea { background: #0F1012; }
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus { background: #15161a; }
[data-theme="dark"] .modal-close { background: rgba(255,255,255,.08); }
[data-theme="dark"] .modal-close:hover { background: rgba(255,255,255,.14); }
/* Help/legal iframe modal: the framed page is a light standalone doc, so keep
   the close button a light disc with a dark glyph. */
[data-theme="dark"] .modal-help .modal-close { background: rgba(255,255,255,.92); color: #0B0B12; }

/* === MODAL === */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(11,11,18,.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 100;
  padding: 48px 20px;
  overflow-y: auto;
}
.modal-scrim.open { display: flex; animation: wcFade .2s ease; }
@keyframes wcFade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 560px;
  background: #fff; border-radius: 28px;
  padding: 36px;
  box-shadow: 0 40px 100px rgba(11,11,18,.30);
  position: relative;
  font-family: var(--wc-f-body);
  color: var(--wc-ink);
  animation: wcRise .25s cubic-bezier(.2,.7,.2,1);
}
@keyframes wcRise { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal h3 { font-family: var(--wc-f-display); font-weight: 700; letter-spacing: -.02em; font-size: 28px; margin: 0 0 6px; line-height: 1.05; }
.modal .modal-sub { color: var(--wc-ink-mute); font-size: 15px; margin: 0 0 24px; }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(11,11,18,.05);
  border: 0; cursor: pointer; color: var(--wc-ink);
}
[dir="rtl"] .modal-close { right: auto; left: 18px; }
.modal-close:hover { background: rgba(11,11,18,.1); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--wc-ink); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px;
  background: #FBFAF8;
  border: 1.5px solid var(--wc-line-strong);
  border-radius: 14px;
  font: inherit; font-size: 15px; color: var(--wc-ink);
  font-family: var(--wc-f-body);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--wc-tint);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(147,129,255,.15);
}
.field textarea { min-height: 110px; resize: vertical; }
.char-count { text-align: right; font-size: 12px; color: var(--wc-ink-mute); margin-top: 4px; }
[dir="rtl"] .char-count { text-align: left; }
.modal-submit {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 16px;
  background: var(--wc-tint); color: #fff;
  border: 0; border-radius: 14px; font-weight: 600; font-size: 16px;
  font-family: var(--wc-f-body);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.modal-submit:hover { background: var(--wc-tint-dark); transform: translateY(-1px); }
.modal-submit:disabled { opacity: .6; transform: none; cursor: default; }
.modal-error { color: #c0392b; font-size: 14px; margin-bottom: 14px; padding: 10px 14px; background: rgba(192,57,43,.08); border-radius: 10px; }
.modal-success { padding: 24px; text-align: center; color: var(--wc-bookings-dark); font-weight: 600; }

/* Help center sheet: a roomy modal whose body is the help-center iframe */
.modal-help {
  max-width: 780px; width: 94vw;
  height: calc(100vh - 96px); height: calc(100dvh - 96px); max-height: 860px;
  padding: 0; overflow: hidden; display: flex;
}
.modal-help .modal-close { z-index: 2; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(11,11,18,.14); }
.help-frame { flex: 1; width: 100%; height: 100%; border: 0; border-radius: 28px; }

/* === DOWNLOAD / QR BANNER === (mirrors landing .block + .download) */
.wc-block { padding: 120px 0; }
@media (max-width: 720px) { .wc-block { padding: 80px 0; } }

.download {
  position: relative;
  padding: 80px 56px;
  border-radius: 36px;
  background: #0B0B12; color: #fff;
  overflow: hidden;
  isolation: isolate;
  letter-spacing: normal;
  line-height: 1.55;
}
/* In dark mode lift the band to a slightly elevated dark (matches landing's
   download banner) instead of staying darker than the page. */
[data-theme="dark"] .download { background: #15161a; }
.download-wave {
  position: absolute; left: 0; right: 0; bottom: -40px; width: 100%; height: auto;
  opacity: .85; mix-blend-mode: screen; filter: invert(1) hue-rotate(180deg);
  pointer-events: none; z-index: 0;
}
.download-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
@media (max-width: 980px) {
  .download { padding: 56px 28px; }
  .download-inner { grid-template-columns: 1fr; text-align: center; }
}
[dir="rtl"] .download-inner { text-align: right; }
@media (max-width: 980px) { [dir="rtl"] .download-inner { text-align: center; } }
.download h2 { font-family: var(--wc-f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(32px, 4.4vw, 56px); color: #fff; margin: 0; }
.download p { color: #fff; font-size: 18px; font-weight: 600; margin: 18px 0 0; max-width: 520px; }
@media (max-width: 980px) { .download p { margin-left: auto; margin-right: auto; } }
.download-stores { display: flex; flex-direction: column; gap: 18px; align-items: center; }
@media (max-width: 720px) { .download-stores { width: 100%; } }
.download-row { display: flex; gap: 20px; align-items: center; }
.download-qrcard {
  background: #fff; color: #0B0B12; border-radius: 22px;
  padding: 16px 16px 0; text-align: center; width: 200px;
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease;
}
.download-qrcard:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(0,0,0,.2); }
.download-qrcard .qr { width: 160px; height: 160px; }
.download-qrcard .qr-label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% + 32px); margin: 14px -16px 0;
  height: 50px; padding: 0 12px;
  background: #0B0B12; color: #fff;
  border-radius: 0 0 21px 21px;
  font-weight: 600; font-size: 15px;
  white-space: nowrap;
}
@media (max-width: 720px) { .download-row { display: none; } }
.download-mobile-buttons { display: none; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }
@media (max-width: 720px) { .download-mobile-buttons { display: flex; } }
.store-btn-light {
  display: inline-flex; align-items: center; gap: 12px; justify-content: center;
  padding: 14px 22px; border-radius: 14px;
  background: #fff; color: #0B0B12;
  text-decoration: none;
}
.store-btn-light .small { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; opacity: .7; line-height: 1; }
.store-btn-light .big { font-family: var(--wc-f-display); font-weight: 600; font-size: 18px; line-height: 1.1; margin-top: 2px; }

/* === FOOTER BAR === (mirrors landing footer) */
.foot-bar { padding: 48px 0; border-top: 1px solid var(--wc-line); margin-top: 0; }
.foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-size: 14px; color: var(--wc-ink-mute);
  font-family: var(--wc-f-body);
}
.foot a, .foot button {
  color: var(--wc-ink-mute); text-decoration: none;
  font: inherit; background: none; border: 0; cursor: pointer; padding: 0;
}
.foot a:hover, .foot button:hover { color: var(--wc-ink); }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--wc-ink); font-size: 15px; }
.foot-copyright { font-size: 13px; color: var(--wc-ink-mute); }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .modal-scrim.open, .modal { animation: none; }
  .modal-submit:hover, .btn-primary:hover { transform: none; }
}
