/*
 * Smile — Popup de lanzamiento Citas Novias & Quinceañeras
 * Aparece en home /es/, /. Vanilla CSS + tokens del handoff.
 * Estilos blindados contra el theme (h2, p, section, etc).
 */

/* Reset blindando contra reglas fuertes del theme (h2/p/section/.section). */
/* Uso :where() para no inflar especificidad y dejar que los hijos con clase ganen. */
:where(.smile-popup-overlay, .smile-pop-reopen),
:where(.smile-popup-overlay, .smile-pop-reopen) * { box-sizing: border-box; }
:where(.smile-popup-overlay) :where(p, h2, h3, span, button, a, div, section) {
  margin: 0; padding: 0;
  font-family: inherit; color: inherit;
  text-transform: none; letter-spacing: normal;
  text-align: left; line-height: inherit;
  background: none; border: 0;
}

.smile-popup-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(36, 24, 22, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease, backdrop-filter .5s ease, background .5s ease;
  --pp-accent: #D9BC85;
  --pp-burgundy: #6B2C2C;
  --pp-burgundy-deep: #501F1F;
  --pp-champagne: #B8924F;
  --pp-champagne-light: #D9BC85;
  --pp-fdisplay: "Playfair Display", Georgia, serif;
  --pp-fbody: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.smile-popup-overlay.is-show {
  opacity: 1; pointer-events: auto;
  background: rgba(36, 24, 22, .46);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.smile-pop {
  position: relative; width: min(940px, 100%); max-height: 92vh;
  overflow: hidden; border-radius: 10px;
  background: var(--pp-burgundy-deep); color: #fff;
  display: grid; grid-template-columns: .92fr 1.08fr;
  box-shadow: 0 50px 110px -40px rgba(20,10,8,.8), 0 0 0 1px rgba(217,188,133,.22);
  transform: translateY(26px) scale(.965); opacity: 0;
  transition: transform .72s cubic-bezier(.16,.84,.3,1), opacity .6s ease;
  font-family: var(--pp-fbody);
}
.smile-popup-overlay.is-show .smile-pop {
  transform: translateY(0) scale(1); opacity: 1;
}

/* Photo column */
.smile-pop__visual {
  position: relative; overflow: hidden;
  min-height: 300px; background: #1c1614;
}
.smile-pop__shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  animation: smilepop-kb 16s ease-in-out infinite alternate;
  display: block;
}
@keyframes smilepop-kb {
  from { transform: scale(1.02); }
  to   { transform: scale(1.12); }
}
.smile-pop__tone {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(80,31,31,.12), transparent 42%, rgba(80,31,31,.7));
}
.smile-pop__vframe {
  position: absolute; inset: 16px;
  border: 1px solid rgba(217,188,133,.5);
  pointer-events: none; border-radius: 3px;
}
.smile-pop__vtag {
  position: absolute; left: 0; bottom: 30px;
  display: flex; flex-direction: column; gap: 7px;
  padding: 11px 18px 11px 26px;
  background: rgba(28,18,16,.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-left: 2px solid var(--pp-accent);
}
.smile-pop__vtag b {
  font-family: var(--pp-fdisplay); font-style: italic; font-weight: 400;
  font-size: 21px; color: #fff;
}
.smile-pop__vtag span {
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.74);
}

/* Content column */
.smile-pop__panel {
  position: relative;
  padding: clamp(30px, 4vw, 52px) clamp(28px, 4vw, 52px) clamp(26px, 3.5vw, 44px);
  display: flex; flex-direction: column; overflow: hidden;
}
.smile-pop__panel::before {
  content: ""; position: absolute;
  top: -150px; right: -150px; width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,146,79,.3), transparent 64%);
  pointer-events: none;
}
.smile-pop__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; height: 100%;
}

.smile-pop__brand {
  display: inline-flex; align-items: baseline; gap: 7px;
  font-family: var(--pp-fdisplay); font-weight: 500;
  font-size: 22px; color: #fff; letter-spacing: -.01em;
}
.smile-pop__brand .bd {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pp-accent); transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(217,188,133,.7);
}
.smile-pop__brand small {
  font-family: var(--pp-fbody); font-weight: 500; font-size: 8.5px;
  letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.66); margin-left: 2px;
}

.smile-pop__eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 26px;
  color: var(--pp-accent); font-weight: 600; font-size: 11.5px;
  letter-spacing: .34em; text-transform: uppercase;
}
.smile-pop__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pp-accent);
  box-shadow: 0 0 0 4px rgba(217,188,133,.16);
}
.smile-pop__eyebrow .ln {
  flex: 1; height: 1px; max-width: 80px;
  background: linear-gradient(90deg, rgba(217,188,133,.6), transparent);
}

.smile-popup-overlay h2.smile-pop__title,
.smile-pop h2.smile-pop__title {
  font-family: var(--pp-fdisplay); font-weight: 400;
  font-size: clamp(30px, 3.5vw, 46px); line-height: 1.04;
  letter-spacing: -.02em; margin: 18px 0 0; padding: 0;
  text-wrap: balance;
  color: #FFFFFF !important;
  text-transform: none;
  text-align: left;
}
.smile-pop h2.smile-pop__title em {
  font-style: italic; color: #D9BC85 !important;
}

.smile-pop__claim {
  margin: 16px 0 0; font-size: 15px; line-height: 1.6;
  color: rgba(255,255,255,.82); max-width: 42ch;
}

.smile-pop__meta {
  margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px;
}
.smile-pop__chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(217,188,133,.28);
  font-size: 11.5px; letter-spacing: .08em;
  color: rgba(255,255,255,.9); font-weight: 500;
}
.smile-pop__chip svg {
  width: 14px; height: 14px; color: var(--pp-accent); flex: none;
}

.smile-pop__actions {
  margin-top: auto; padding-top: 30px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
/* CTA — alta especificidad para vencer reglas de theme sobre <a> */
.smile-popup-overlay .smile-pop a.smile-pop__cta,
.smile-popup-overlay .smile-pop a.smile-pop__cta:visited,
.smile-popup-overlay .smile-pop a.smile-pop__cta:link {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 30px; border-radius: 999px; border: 0;
  background: linear-gradient(180deg, #D9BC85, #B8924F);
  color: #3A1A18 !important;
  font-size: 14.5px; font-weight: 600; letter-spacing: .04em;
  text-decoration: none;
  box-shadow: 0 16px 34px -16px rgba(184,146,79,.8);
  transition: transform .25s ease, box-shadow .25s ease;
  font-family: var(--pp-fbody);
}
.smile-popup-overlay .smile-pop a.smile-pop__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -16px rgba(184,146,79,.9);
  color: #3A1A18 !important; text-decoration: none;
  background: linear-gradient(180deg, #D9BC85, #B8924F);
}
.smile-popup-overlay .smile-pop a.smile-pop__cta svg {
  width: 17px; height: 17px; transition: transform .25s ease;
  color: #3A1A18 !important; stroke: #3A1A18 !important;
}
.smile-popup-overlay .smile-pop a.smile-pop__cta:hover svg { transform: translateX(3px); }

.smile-pop__later {
  background: none; border: 0; padding: 0;
  color: rgba(255,255,255,.6);
  font-size: 12.5px; letter-spacing: .04em;
  text-decoration: underline; text-underline-offset: 3px;
  font-family: var(--pp-fbody); cursor: pointer;
}
.smile-pop__later:hover { color: rgba(255,255,255,.9); }

/* Close button */
.smile-pop__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(28,18,16,.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  color: rgba(255,255,255,.85);
  transition: .2s; cursor: pointer;
  padding: 0;
}
.smile-pop__close:hover {
  background: rgba(28,18,16,.7); color: #fff;
  border-color: rgba(217,188,133,.5);
}
.smile-pop__close svg { width: 15px; height: 15px; }

/* Progress hairline */
.smile-pop__progress {
  position: absolute; left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: rgba(255,255,255,.1); z-index: 4;
}
.smile-pop__progress i {
  display: block; height: 100%; width: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--pp-champagne), var(--pp-champagne-light));
}

/* Reopen pill — full state (after popup closes) y collapsed (badge en esquina) */
.smile-pop-reopen {
  position: fixed; right: 22px; bottom: 22px; z-index: 8500;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 20px 13px 16px; border-radius: 999px; border: 0;
  color: #fff;
  background: linear-gradient(180deg, var(--pp-burgundy, #6B2C2C), var(--pp-burgundy-deep, #501F1F));
  box-shadow: 0 18px 40px -16px rgba(40,16,14,.75), 0 0 0 1px rgba(217,188,133,.3);
  transform: translateY(24px) scale(.92);
  opacity: 0; pointer-events: none;
  overflow: hidden;
  transition:
    transform .55s cubic-bezier(.16,.84,.3,1),
    opacity .4s ease,
    padding .35s ease,
    gap .35s ease,
    right .35s ease,
    bottom .35s ease,
    box-shadow .35s ease;
  cursor: pointer;
  font-family: "Inter", -apple-system, sans-serif;
  --pp-accent: #D9BC85;
  touch-action: pan-y;
}
.smile-pop-reopen.is-show {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: auto;
}
.smile-pop-reopen.is-show:hover { transform: translateY(-2px) scale(1); }

/* Collapsed: solo el ícono, badge circular semioculto en esquina inferior derecha */
.smile-pop-reopen.is-collapsed {
  padding: 7px;
  gap: 0;
  right: 14px; bottom: 14px;
  box-shadow: 0 10px 24px -12px rgba(40,16,14,.6), 0 0 0 1px rgba(217,188,133,.22);
  opacity: .78;
}
.smile-pop-reopen.is-collapsed:hover { opacity: 1; }
.smile-pop-reopen .tx {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1.25; text-align: left;
  max-width: 240px;
  transition: max-width .35s ease, opacity .25s ease, margin .35s ease;
  overflow: hidden;
}
.smile-pop-reopen.is-collapsed .tx {
  max-width: 0; opacity: 0; margin: 0;
  pointer-events: none;
}

.smile-pop-reopen .ic {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(217,188,133,.18); color: var(--pp-accent);
  transition: background .25s ease;
}
.smile-pop-reopen.is-collapsed .ic { background: rgba(217,188,133,.28); }
.smile-pop-reopen .ic svg { width: 17px; height: 17px; }
.smile-pop-reopen .tx b {
  font-family: "Playfair Display", Georgia, serif; font-weight: 500;
  font-size: 14px; white-space: nowrap;
}
.smile-pop-reopen .tx span {
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.66); white-space: nowrap;
}

/* Hint sutil cuando el mouse se acerca al edge derecho — leve "pulse" */
@keyframes smilepop-edgehint {
  0%, 100% { box-shadow: 0 10px 24px -12px rgba(40,16,14,.6), 0 0 0 1px rgba(217,188,133,.22); }
  50% { box-shadow: 0 10px 24px -12px rgba(40,16,14,.6), 0 0 0 1px rgba(217,188,133,.55), 0 0 0 5px rgba(217,188,133,.12); }
}
.smile-pop-reopen.is-collapsed.is-edge-near {
  opacity: 1;
  animation: smilepop-edgehint 1.6s ease-in-out infinite;
}

/* Responsive — móvil ≤760px (handoff polish: foto oculta, card compacta, CTA full width) */
@media (max-width: 760px) {
  .smile-popup-overlay { padding: 18px; }
  .smile-pop {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    max-height: 92vh;
  }
  /* Ocultar foto en móvil — el espacio above-the-fold lo toma el mensaje + CTA */
  .smile-pop__visual { display: none; }
  /* Hairline champagne arriba del modal — mantiene marca sin ocupar espacio */
  .smile-pop::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, #B8924F, #D9BC85, #B8924F);
  }
  .smile-pop__panel {
    min-height: 0; overflow-y: auto;
    max-height: 92vh;
    padding: 28px 24px 26px;
  }
  .smile-pop__brand { font-size: 20px; }
  .smile-pop__eyebrow { margin-top: 20px; }
  .smile-popup-overlay h2.smile-pop__title,
  .smile-pop h2.smile-pop__title { font-size: 30px; }
  .smile-pop__claim { font-size: 14px; margin-top: 12px; }
  .smile-pop__meta { margin-top: 18px; gap: 8px; }
  .smile-pop__chip { padding: 7px 12px; font-size: 11px; }
  /* CTA a ancho completo — el botón domina la tarjeta */
  .smile-pop__actions {
    margin-top: 22px; padding-top: 0;
    flex-direction: column; align-items: stretch;
    gap: 12px;
  }
  .smile-popup-overlay .smile-pop a.smile-pop__cta {
    justify-content: center;
    padding: 16px 24px;
  }
  .smile-pop__later { text-align: center; }
  /* Sin barra de progreso en móvil — espacio limitado */
  .smile-pop__progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .smile-pop, .smile-pop-reopen { transition: opacity .3s ease; }
  .smile-pop__shot { animation: none; }
  .smile-popup-overlay { transition: opacity .3s ease; }
}
