/* Brand layer for the static try-on page (vto-web/index.html).
 *
 * vto.css is the PrestaShop module's stylesheet and reads the theme's
 * `--optica-*` tokens. Here the page defines them per brand, with the values
 * of each Jumpseller theme, selected by the body class boot.js adds
 * (`vto-web--<brand>`).
 *
 * Fonts: no third-party font is loaded (no Google Fonts, no Nexa). The theme
 * faces come first in each stack, so a visitor who has them installed gets
 * them; everyone else gets the nearest system face.
 *
 * The page is one full-screen iframe: the dialog is the page, so the document
 * itself never scrolls (only the dialog body does).
 */

/* --- Page frame --------------------------------------------------------- */

html {
  height: 100%;
  overflow: hidden;
}

body {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: clamp(1rem, 3vw, 3rem);
  overflow: hidden;
  background: var(--optica-soft, #f3f3f1);
  color: var(--optica-ink, #111111);
  font-family: var(--optica-font-body, Inter, "Helvetica Neue", Arial, sans-serif);
}

/* What the visitor sees if the dialog is dismissed: one button, centred. */
body > .optica-vto {
  width: min(100%, 26rem);
  margin: 0;
}

.js-vto-web-error {
  max-width: 32rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

/* The dialog fills the iframe's height; a wide frame leaves the page colour on
   both sides. Its body scrolls on its own, so there is no second scrollbar. */
.optica-vto-dialog {
  height: 100vh;
  height: 100dvh;
  border-block-width: 0;
}

.optica-vto-dialog__inner {
  height: 100%;
}

/* vto.css gives this panel `width: min(100%, ...)` plus padding and border on
   a content box, so it spills 30px past a phone-width dialog and the body
   grows a horizontal scrollbar next to the vertical one. */
.optica-vto__controls--top {
  box-sizing: border-box;
}

.optica-vto-dialog__body {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--optica-muted, #6a6a66) transparent;
}

/* --- Mood Eyewear (Jumpseller tema 251104) ------------------------------
 * Monochrome: #000 ink, #FFF paper, #F4F4F4 top bar, #DDD rules, #666 muted.
 * Type: Noto Sans body, Manrope headings (Nexa on lens pages is a licensed
 * face and is not used here).
 * The theme's cyan #35A8E0 reaches only 2.7:1 on white, so the focus ring is
 * the same hue darkened to 4.0:1 on white and 4.7:1 on the dark stage.
 */

body.vto-web--mood123 {
  --optica-ink: #000000;
  --optica-paper: #ffffff;
  --optica-soft: #f4f4f4;
  --optica-lens: #eeeeee;
  --optica-rule: #dddddd;
  --optica-muted: #666666;
  --optica-focus: #1b87ba;
  --optica-radius: 0px;
  --optica-font-body: "Noto Sans", "Segoe UI", system-ui, -apple-system, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --optica-font-technical: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --optica-vto-aspect: 4 / 3;
  --vto-web-display: Manrope, "Noto Sans", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* vto.css derives the --vto-* set on .optica-vto itself, so the brand values
   are restated at that element with higher specificity. */
body.vto-web--mood123 .optica-vto {
  --vto-ink: #000000;
  --vto-paper: #ffffff;
  --vto-soft: #f4f4f4;
  --vto-lens: #eeeeee;
  --vto-rule: #dddddd;
  --vto-focus: #1b87ba;
  --vto-muted: #666666;
  --vto-success: #146b4a;
  --vto-success-soft: #e2f2ea;
  --vto-warning: #815000;
  --vto-warning-soft: #fff1d6;
  --vto-radius: 0px;
  --vto-body: var(--optica-font-body);
  --vto-technical: var(--optica-font-technical);
}

body.vto-web--mood123 .optica-vto-dialog::backdrop {
  background: #f4f4f4;
}

body.vto-web--mood123 .optica-vto-dialog__title {
  font-family: var(--vto-web-display);
  font-weight: 700;
}

body.vto-web--mood123 ::selection {
  background: #000000;
  color: #ffffff;
}

/* --- Ópticas Quezada & Siles (Jumpseller tema 1032061) -------------------
 * #1C1B1B ink, #FBCE00 yellow header, #241FAF indigo hover, #F6F6F6 / #DDD /
 * #666 neutrals. Type: Poppins body, Bebas Neue headings (condensed caps).
 * The yellow carries the dialog's head, as it carries the store's header; the
 * indigo is the focus ring (11:1 on white, 7.4:1 on the yellow).
 */

body.vto-web--opticas-quezada-siles {
  --optica-ink: #1c1b1b;
  --optica-paper: #ffffff;
  --optica-soft: #f6f6f6;
  --optica-lens: #fff4bf;
  --optica-rule: #dddddd;
  --optica-muted: #666666;
  --optica-focus: #241faf;
  --optica-radius: 0px;
  --optica-font-body: Poppins, "Avenir Next", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --optica-font-technical: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --optica-vto-aspect: 4 / 3;
  --vto-web-display: "Bebas Neue", "Arial Narrow", "Roboto Condensed",
    "Helvetica Neue Condensed", sans-serif-condensed, "Segoe UI", system-ui, sans-serif;
}

body.vto-web--opticas-quezada-siles .optica-vto {
  --vto-ink: #1c1b1b;
  --vto-paper: #ffffff;
  --vto-soft: #f6f6f6;
  --vto-lens: #fff4bf;
  --vto-rule: #dddddd;
  --vto-focus: #241faf;
  --vto-muted: #666666;
  --vto-success: #146b4a;
  --vto-success-soft: #e2f2ea;
  --vto-warning: #815000;
  --vto-warning-soft: #fff1d6;
  --vto-radius: 0px;
  --vto-body: var(--optica-font-body);
  --vto-technical: var(--optica-font-technical);
}

body.vto-web--opticas-quezada-siles .optica-vto-dialog::backdrop {
  background: #f6f6f6;
}

body.vto-web--opticas-quezada-siles .optica-vto-dialog__head {
  background: #fbce00;
  border-block-end-color: #1c1b1b;
}

body.vto-web--opticas-quezada-siles .optica-vto-dialog__title {
  font-family: var(--vto-web-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-synthesis: none;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

body.vto-web--opticas-quezada-siles ::selection {
  background: #fbce00;
  color: #1c1b1b;
}
