/* ── ESTILOS DE LA PÁGINA DE AGRADECIMIENTO (/thanks/) ───────────────────────── */
html, body {
  background-color: #0b1120 !important;
  color: #f8fafc !important;
  font-family: 'Inter', sans-serif !important;
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 32px 16px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* ── CONTENEDOR PRINCIPAL TRES COLUMNAS (GRID) ────────────────────────── */
.thanks-layout-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(320px, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
  box-sizing: border-box;
}

/* Si el visor PDF aún no se muestra, centrar 2 columnas en desktop (> 1024px) */
@media (min-width: 1025px) {
  .thanks-layout-container:has(#pdf-viewer-container[style*="display: none"]) {
    grid-template-columns: minmax(340px, 460px) minmax(300px, 380px);
    justify-content: center;
    max-width: 900px;
  }
}

.thanks-card {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.thanks-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #b0f2ae, #3b82f6, #8b5cf6);
}

.success-icon-badge {
  width: 60px;
  height: 60px;
  background: rgba(176, 242, 174, 0.15);
  border: 2px solid #86efac;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 14px auto;
  box-shadow: 0 0 24px rgba(176, 242, 174, 0.3);
}

.thanks-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.thanks-subtitle {
  font-size: 13.5px;
  color: #94a3b8;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

/* ── SECCIÓN DE VERIFICACIÓN DE TRANSACCIÓN WOMPI ──────────────────────────── */
.transaction-verify-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: left;
}

.wompi-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.wompi-input-group {
  display: flex;
  gap: 8px;
}

.wompi-input {
  width: 100%;
  background: #0f172a;
  border: 1.5px solid #475569;
  border-radius: 10px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.wompi-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: #1e293b;
}

/* ── CÓDIGO ÚNICO DE RECUPERACIÓN DE SEGUNDA VÍA ────────────────────────────── */
.code-display-container {
  background: rgba(59, 130, 246, 0.1);
  border: 1px dashed #3b82f6;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: left;
}

.code-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.code-input {
  width: 100%;
  background: #0f172a;
  border: 1.5px solid #3b82f6;
  border-radius: 10px;
  color: #86efac;
  font-family: monospace, monospace;
  font-size: 16px;
  font-weight: 800;
  padding: 10px 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.code-input:focus {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.25);
}

/* ── BOTONES DE ACCIÓN PRINCIPALES ─────────────────────────────────────────── */
.btn-verify-wompi {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-verify-wompi:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.5);
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.btn-download-main {
  background: #b0f2ae;
  color: #0f172a;
  border: 1px solid #86efac;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 10px 25px rgba(176, 242, 174, 0.3);
  text-decoration: none;
  box-sizing: border-box;
}

.btn-download-main:hover:not(:disabled) {
  background: #86efac;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(176, 242, 174, 0.45);
}

.btn-download-main.disabled,
.btn-download-main:disabled {
  background: #334155;
  color: #94a3b8;
  border-color: #475569;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-home-secondary {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-home-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: #64748b;
}

/* ── ALERTAS DE ESTADO ─────────────────────────────────────────────────────── */
.status-alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  box-sizing: border-box;
}

.status-alert.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}

.status-alert.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fcd34d;
}

.status-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #86efac;
}

/* ── COLUMNA 2: VISOR PDF EMBEBIDO ────────────────────────────────────────── */
.pdf-viewer-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  height: 650px;
  box-sizing: border-box;
}

.pdf-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1e293b;
}

.pdf-viewer-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-fullscreen-btn {
  background: #1e293b;
  color: #3b82f6;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.pdf-fullscreen-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

.pdf-iframe-wrapper {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1e293b;
}

.pdf-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── COLUMNA 3: TARJETA DE AYUDA Y SOPORTE ───────────────────────────────── */
.thanks-help-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.help-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.help-card-icon {
  font-size: 24px;
}

.help-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.help-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.help-contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.help-link {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  word-break: break-all;
}

.help-link:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.help-link.whatsapp {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.08);
}

.help-link.whatsapp:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #22c55e;
}

/* Nota de vigencia de 24 horas */
.download-validity-note {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
}

.validity-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.download-validity-note p {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.download-validity-note strong {
  color: #fbbf24;
}

/* ── DISEÑO ADAPTATIVO MÓVIL Y TABLET (RESPONSIVE) ───────────────────────── */
@media (max-width: 1024px) {
  html, body {
    padding: 24px 16px !important;
  }

  .thanks-layout-container,
  .thanks-layout-container:has(#pdf-viewer-container[style*="display: none"]) {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    max-width: 580px !important;
    margin: 0 auto !important;
    gap: 20px !important;
  }

  .thanks-card,
  .pdf-viewer-card,
  .thanks-help-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pdf-viewer-card {
    height: 520px !important;
  }
}

@media (max-width: 600px) {
  html, body {
    padding: 16px 12px !important;
  }

  .thanks-layout-container {
    max-width: 100% !important;
    gap: 16px !important;
  }

  .thanks-card,
  .thanks-help-card,
  .pdf-viewer-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  .success-icon-badge {
    width: 52px !important;
    height: 52px !important;
    font-size: 26px !important;
    margin-bottom: 10px !important;
  }

  .thanks-title {
    font-size: 20px !important;
  }

  .thanks-subtitle {
    font-size: 13px !important;
  }

  .wompi-input,
  .code-input {
    font-size: 15px !important;
    padding: 11px 12px !important;
  }

  .btn-verify-wompi,
  .btn-download-main,
  .btn-home-secondary {
    padding: 13px 16px !important;
    font-size: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pdf-viewer-card {
    height: 440px !important;
    padding: 14px !important;
  }
}

@media (max-width: 380px) {
  html, body {
    padding: 12px 8px !important;
  }

  .thanks-card,
  .thanks-help-card,
  .pdf-viewer-card {
    padding: 16px 12px !important;
  }

  .thanks-title {
    font-size: 18px !important;
  }

  .pdf-viewer-card {
    height: 380px !important;
  }
}
