/* RIE Odontología — Modal novedad William Hope + franja */
:root {
  --rie-navy: #0b1f3a;
  --rie-azul: #1f5fa8;
  --rie-turquesa: #19b8c4;
  --rie-hueso: #f7f4ee;
  --rie-texto: #33415c;
}

/* ---------- Franja superior ---------- */
.wh-bar {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: linear-gradient(90deg, var(--rie-navy), var(--rie-azul) 60%, var(--rie-turquesa));
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 10px 16px;
  line-height: 1.4;
}
.wh-bar a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 6px;
  white-space: nowrap;
}

/* ---------- Modal ---------- */
.wh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.wh-overlay.is-open { opacity: 1; visibility: visible; }
.wh-overlay[hidden], .wh-overlay [hidden] { display: none !important; }

.wh-modal {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: #ffffff;
  color: var(--rie-texto);
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 20px;
  padding: 36px 28px 28px;
  position: relative;
  box-shadow: 0 24px 60px rgba(11, 31, 58, .35);
  transform: translateY(16px);
  transition: transform .25s ease;
  text-align: center;
}
.wh-overlay.is-open .wh-modal { transform: translateY(0); }

.wh-modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--rie-navy), var(--rie-azul), var(--rie-turquesa));
}

.wh-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rie-navy);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.wh-close:hover, .wh-close:focus-visible { background: rgba(11, 31, 58, .08); outline: none; }

.wh-logo {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 18px;
}
.wh-logo img { display: block; width: 150px; height: auto; }

.wh-modal h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--rie-navy);
  margin: 0 0 10px;
  line-height: 1.25;
}
.wh-modal p.wh-sub {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.wh-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.wh-form input[type="text"],
.wh-form input[type="email"] {
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  border: 1.5px solid #d6dbe4;
  border-radius: 10px;
  background: #fff;
  color: var(--rie-navy);
  width: 100%;
  box-sizing: border-box;
}
.wh-form input:focus { outline: none; border-color: var(--rie-turquesa); box-shadow: 0 0 0 3px rgba(25, 184, 196, .2); }

.wh-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0 6px;
  cursor: pointer;
}
.wh-consent input { margin-top: 2px; accent-color: var(--rie-azul); width: 16px; height: 16px; flex-shrink: 0; }

.wh-btn {
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--rie-navy), var(--rie-azul));
  color: #fff;
  transition: filter .2s ease;
}
.wh-btn:hover { filter: brightness(1.12); }
.wh-btn[disabled] { opacity: .6; cursor: wait; }

.wh-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rie-azul);
  text-decoration: none;
}
.wh-link:hover { text-decoration: underline; }

.wh-error { color: #b42318; font-size: 13px; min-height: 1em; margin: 0; }

.wh-success h2 { margin-top: 8px; }
.wh-success .wh-check {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rie-azul), var(--rie-turquesa));
  color: #fff;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}

.wh-hp { display: none; }

@media (max-width: 480px) {
  .wh-modal { padding: 32px 20px 22px; border-radius: 16px; }
  .wh-modal h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .wh-overlay, .wh-modal { transition: none; }
}
