/* =========================================================
   MARK: RESPONSIVE-LETI
   Solo marco de preview y ajustes de dispositivo.
   El layout visual vive en css/estilo.css.
   ========================================================= */

:root {
  --preview-width: 100vw;
  --preview-height: 100svh;
  --preview-scale: 1;
  --app-height: 100dvh;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

.phone-preview-shell,
.phone-preview-stage,
.invite-viewport {
  position: relative;
  width: 100%;
  max-width: 100vw;
  margin-inline: auto;
  overflow-x: clip;
}

.phone-preview-stage {
  transform-origin: top center;
}

body.desktop-phone-preview {
  padding: 18px 0 28px;
}

body.desktop-phone-preview .phone-preview-shell {
  width: var(--preview-width);
  max-width: var(--preview-width);
  min-height: var(--preview-height);
  overflow: hidden;
  border-radius: 34px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.1);
}

body.desktop-phone-preview .phone-preview-stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%) scale(var(--preview-scale));
}

body.desktop-phone-preview .invite-viewport {
  min-height: calc(100vw * 16 / 9);
}

/* MARK: RESPONSIVE-DISPOSITIVOS */
html.is-iphone,
body.is-iphone,
body.is-android {
  min-height: var(--app-height);
}

html.is-iphone,
body.is-iphone {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body.model-leti.is-iphone,
body.model-leti.is-android,
body.model-leti.desktop-phone-preview {
  --leti-fondo-posicion: center top;
  --leti-fondo-size: 100% auto;
  --leti-fondo-repeat: repeat-y;
  --leti-fondo-attachment: scroll;
}

body.is-iphone .invite-viewport,
body.is-android .invite-viewport {
  min-height: var(--app-height);
}

body.is-iphone .opening-envelope {
  min-height: var(--app-height);
  padding-bottom: max(18px, var(--safe-bottom));
}

/* MARK: RELOJ-VICTORIA-MEREDITH */
body.model-leti .count-section.reloj-victoria {
  --rv-clock-size: clamp(270px, 52vw, 410px);
  --rv-clock-y: var(--leti-reloj-y);
  --rv-box-size: clamp(62px, 12vw, 86px);
  --rv-stage-height: calc(var(--rv-clock-y) + var(--rv-clock-size) + clamp(118px, 16vw, 168px));
  width: min(100%, 680px);
  min-height: auto;
  padding: clamp(10px, 3vw, 22px) 0 clamp(8px, 2.4vw, 18px);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.model-leti .count-section.reloj-victoria::before,
body.model-leti .count-section.reloj-victoria::after {
  display: none;
}

body.model-leti .count-section.reloj-victoria .rv-clock-stage {
  width: min(100%, 620px);
}

body.model-leti .count-section.reloj-victoria .rv-img--top,
body.model-leti .count-section.reloj-victoria .rv-img--left,
body.model-leti .count-section.reloj-victoria .rv-img--right,
body.model-leti .count-section.reloj-victoria .rv-img--bottom,
body.model-leti .count-section.reloj-victoria .rv-img--ornamento {
  display: none;
}

@media (max-width: 430px) {
  input,
  textarea,
  button,
  select {
    font-size: 16px;
  }

  body.model-leti .count-section.reloj-victoria {
    --rv-clock-size: min(66vw, 258px);
    --rv-clock-y: -6px;
    --rv-box-size: clamp(50px, 14vw, 60px);
    --rv-stage-height: calc(var(--rv-clock-y) + var(--rv-clock-size) + 188px);
    padding-block: 2px 34px;
  }

  body.model-leti .count-section.reloj-victoria .eyebrow {
    margin-bottom: 8px;
  }

  body.model-leti .count-section.reloj-victoria .rv-clock-stage {
    margin-top: 8px;
  }

  body.model-leti .count-section.reloj-victoria .rv-img--top {
    display: block;
    width: min(132%, 480px);
    height: 126px;
    background-size: auto 126px;
  }

  body.model-leti .count-section.reloj-victoria .rv-pendulo {
    height: 116px;
  }
}

/* MARK: MEREDITH - TITULOS PEQUENOS LEGIBLES */
body.model-leti .count-section.reloj-victoria .eyebrow,
body.model-leti #countdown-title {
  color: #FFFFFF;
  font-size: clamp(2.12rem, 8.5vw, 3rem);
  line-height: 1.05;
  text-shadow:
    0.45px 0 currentColor,
    -0.24px 0 currentColor,
    0 0.38px currentColor,
    0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 14px rgba(70, 0, 0, 0.32);
}
