/* ==========================================================
   GlobPay - Pantalla Final del Asistente
   completion.css
   Diseño fiel a la maqueta oficial de cierre con logotipo GlobPay.
   ========================================================== */

/* 1. RESET Y BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #F8FAFC;
  color: var(--globpay-black, #111111);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  -webkit-font-smoothing: antialiased;
}

/* 2. TARJETA PRINCIPAL CENTRADA */
.completion-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 24px;
  width: 100%;
  max-width: 620px;
  padding: 40px 36px 36px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-width: 0;
}

/* 3. LOGO OFICIAL */
.completion-logo-wrap {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.completion-logo-img {
  width: 135px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1024 / 853;
  object-fit: contain;
  display: block;
}

/* 4. CONTENEDOR DE CELEBRACIÓN / GIF */
.celebration-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.celebration-decor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 120px;
  pointer-events: none;
  user-select: none;
}

.celebration-decor-left {
  left: 6px;
}

.celebration-decor-right {
  right: 6px;
}

.decor-svg {
  width: 100%;
  height: 100%;
}

.celebration-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #EBFBFA;
  border: 1.5px dashed #00D2BA;
  border-radius: 20px;
  padding: 34px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.25s ease;
}

.decor-cone-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  color: #0BB6B5;
}

.decor-cone-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.celebration-placeholder-title {
  font-size: 16px;
  font-weight: 700;
  color: #0BB6B5;
  margin-bottom: 4px;
}

.celebration-placeholder-sub {
  font-size: 13px;
  color: #6B7280;
}

/* GIF activo */
.celebration-active-gif {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  display: block;
}

/* 5. TÍTULO Y SUBTÍTULO */
.completion-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #111111;
  margin-bottom: 8px;
  text-align: center;
}

.completion-title .brand-highlight {
  color: #0BB6B5;
  display: block;
}

.completion-subtitle {
  font-size: 15px;
  color: #4B5563;
  line-height: 1.45;
  margin-bottom: 26px;
  text-align: center;
}

/* 6. BOTONES DE ACCIÓN */
.action-buttons-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.btn-primary-test {
  width: 100%;
  max-width: 420px;
  padding: 13px 26px;
  background-color: #00D2BA;
  color: #111111;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 8px rgba(0, 210, 186, 0.25);
}

.btn-primary-test:hover {
  background-color: #0BB6B5;
  color: #111111;
}

.btn-primary-test:active {
  transform: translateY(1px);
}

.btn-primary-test svg {
  flex-shrink: 0;
  stroke: #111111;
}

.action-subtext {
  font-size: 12.5px;
  color: #6B7280;
  text-align: center;
  margin-top: -4px;
}

.btn-secondary-panel {
  width: 100%;
  max-width: 220px;
  padding: 11px 20px;
  background-color: #FFFFFF;
  color: #111111;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  margin-top: 2px;
}

.btn-secondary-panel:hover {
  background-color: #F9FAFB;
  border-color: #9CA3AF;
}

/* Separador sutil */
.completion-divider {
  width: 100%;
  height: 1px;
  background-color: #E5E7EB;
  margin: 12px 0 24px;
}

/* 7. BLOQUE "ANTES DE VENDER" */
.before-selling-box {
  width: 100%;
  background-color: #F9FAFB;
  border: 1px solid #F3F4F6;
  border-radius: 14px;
  padding: 18px 20px;
  text-align: left;
  margin-bottom: 20px;
}

.before-selling-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 12px;
}

.requirements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.requirement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
}

.requirement-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.requirement-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.requirement-icon {
  width: 18px;
  height: 18px;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.requirement-label {
  font-size: 13px;
  color: #1F2937;
  font-weight: 500;
}

.requirement-badge {
  background-color: #E5E7EB;
  color: #4B5563;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2.5px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

.before-selling-note {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.45;
}

.all-verified-box {
  width: 100%;
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 20px;
  color: #065F46;
  font-size: 13.5px;
  font-weight: 600;
}

/* 8. ENLACE INFERIOR: REVISAR MI CONFIGURACIÓN */
.review-config-link-wrap {
  margin-top: 4px;
}

.btn-review-config {
  background: transparent;
  border: none;
  font-size: 13px;
  color: #6B7280;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s ease;
}

.btn-review-config:hover {
  color: #0BB6B5;
}

/* 9. MODAL RESUMEN DE CONFIGURACIÓN */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.summary-modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.summary-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #111111;
}

.summary-modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #6B7280;
  cursor: pointer;
  padding: 4px 8px;
}

.summary-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: #F9FAFB;
  border: 1px solid #F3F4F6;
  border-radius: 10px;
  gap: 10px;
}

.summary-step-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.summary-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111111;
}

.summary-step-val {
  font-size: 12.5px;
  color: #4B5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-edit-step {
  font-size: 12.5px;
  font-weight: 600;
  color: #0BB6B5;
  text-decoration: none;
  padding: 6px 12px;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-edit-step:hover {
  background: #0BB6B5;
  color: #FFFFFF;
}

/* AVISO DE ASISTENTE INCOMPLETO */
.incomplete-warning-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
  display: none;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  width: 100%;
}

.incomplete-warning-title {
  font-size: 15px;
  font-weight: 700;
  color: #B45309;
}

.incomplete-warning-text {
  font-size: 13px;
  color: #92400E;
  line-height: 1.45;
}

.btn-continue-wizard {
  margin-top: 6px;
  padding: 10px 18px;
  background: #B45309;
  color: #FFFFFF;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  align-self: center;
}

/* 10. RESPONSIVE Y MODOS DE VISTA PREVIA */
@media (max-width: 768px) {
  body {
    padding: 16px 12px 32px;
    justify-content: flex-start;
  }

  .completion-card {
    padding: 28px 18px 24px;
    border-radius: 18px;
  }

  .completion-title {
    font-size: 26px;
  }

  .celebration-box {
    padding: 26px 14px;
    margin-bottom: 18px;
  }

  .btn-primary-test, .btn-secondary-panel {
    max-width: 100%;
    width: 100%;
  }

  .action-buttons-wrap {
    width: 100%;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .celebration-active-gif {
    display: none;
  }
  .celebration-static-fallback {
    display: block !important;
  }
}

/* Modos de preview viewport estrictos */
body.preview-360 {
  max-width: 360px !important;
  margin: 0 auto !important;
}

body.preview-390 {
  max-width: 390px !important;
  margin: 0 auto !important;
}

body.preview-430 {
  max-width: 430px !important;
  margin: 0 auto !important;
}
