/* Pop Up "Tu BYD en 24hs" — estilos autocontenidos (no dependen de Tailwind) */
.byd-popup {
  --bp-accent: #1499e6;
  --bp-accent-dark: #0b7cc0;
  --bp-text: #1f2937;
  --bp-muted: #6b7280;
  --bp-border: #d1d5db;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: inherit;
  color: var(--bp-text);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.byd-popup.is-open { opacity: 1; visibility: visible; }
.byd-popup *, .byd-popup *::before, .byd-popup *::after { box-sizing: border-box; }

.byd-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 35, .65);
  backdrop-filter: blur(3px);
}

.byd-popup__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
  transform: translateY(20px) scale(.97);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.byd-popup.is-open .byd-popup__dialog { transform: none; }

.byd-popup__media { background: #dbeaf6; }
.byd-popup__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.byd-popup__body {
  padding: 28px 28px 24px;
  overflow-y: auto;
}

.byd-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  display: grid;
  place-items: center;
}
.byd-popup__close:hover { background: #fff; }
.byd-popup__close:focus-visible { outline: 3px solid var(--bp-accent); outline-offset: 2px; }

.byd-popup__title {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--bp-accent);
  text-transform: uppercase;
}
.byd-popup__subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--bp-muted);
}

.byd-popup__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.byd-popup__field--full { grid-column: 1 / -1; }

.byd-popup label.byd-popup__label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}
.byd-popup input[type="text"],
.byd-popup input[type="email"],
.byd-popup input[type="tel"],
.byd-popup select,
.byd-popup textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--bp-text);
  background: #fff;
  border: 1px solid var(--bp-border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.byd-popup textarea { resize: vertical; min-height: 64px; }
.byd-popup input:focus,
.byd-popup select:focus,
.byd-popup textarea:focus {
  border-color: var(--bp-accent);
  box-shadow: 0 0 0 3px rgba(20, 153, 230, .2);
}

.byd-popup__consent {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--bp-muted);
}
.byd-popup__consent input { margin-top: 2px; flex-shrink: 0; }
.byd-popup__policy-toggle {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--bp-accent);
  text-decoration: underline;
  cursor: pointer;
}
.byd-popup__policy {
  display: none;
  margin-top: 8px;
  padding: 10px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.45;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.byd-popup__policy.is-open { display: block; }
.byd-popup__policy p { margin: 0 0 6px; }

.byd-popup__submit {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--bp-accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.byd-popup__submit:hover { background: var(--bp-accent-dark); }
.byd-popup__submit[disabled] { opacity: .6; cursor: wait; }

.byd-popup__msg {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.byd-popup__msg[hidden] { display: none; }
.byd-popup__msg.is-error { color: #dc2626; }
.byd-popup__msg.is-success { color: #16a34a; }

body.byd-popup-lock { overflow: hidden; }

/* Mobile: imagen arriba (recortada sobre el claim) y formulario abajo */
@media (max-width: 720px) {
  .byd-popup { padding: 10px; align-items: flex-start; }
  .byd-popup__dialog {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    margin-top: auto;
    margin-bottom: auto;
    overflow-y: auto;
  }
  .byd-popup__media { height: 190px; }
  .byd-popup__media img { object-position: center 33%; }
  .byd-popup__body { padding: 18px 16px 16px; overflow: visible; }
  .byd-popup__title { font-size: 19px; }
  .byd-popup__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .byd-popup, .byd-popup__dialog { transition: none; }
}
