/* ================================
   BASE / APP SHELL
================================ */
html, body {
  margin:0;
  padding:0;
}

.app-body {
  background-color:#f2f2f7;
  font-family:-apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  color:#111827;
}

/* Centrado general tipo app */
.app-root {
  min-height:calc(var(--vh, 1vh) * 100);
  display:flex;
  flex-direction:column;
  align-items:center;
}

.app-shell {
  width:100%;
  max-width:480px;
  margin:0 auto;
  padding:16px 16px 24px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

/* ================================
   HEADER TIPO IOS
================================ */
.app-header {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding-top:10px;
  padding-bottom:4px;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  background:rgba(242,242,247,0.96);
  border-bottom:1px solid rgba(0,0,0,0.04);
  position:sticky;
  top:0;
  z-index:20;
}

.app-header-inner.centered-layout {
  width:100%;
  max-width:480px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
}

.app-header-logo-wrap {
  display:flex;
  justify-content:center;
  width:100%;
}

.app-logo {
   width: 250px;      /* Tamaño fijo */
    height: auto;
    object-fit: contain;
  display:block;
  margin-bottom: 20px; /* 👈 espacio debajo */
}

.app-header-title.centered {
  text-align:center;
  padding-top: 20px !Important;
  padding-bottom: 20px !Important;
}

.app-header-title.centered h1 {
  font-size:20px;
  font-weight:700;
  margin:0;
}

.app-header-sub {
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#6b7280;
}

/* STEP DOTS */
.app-stepper {
  width:100%;
  max-width:480px;
  margin:4px auto 0;
  display:flex;
  justify-content:center;
  gap:4px;
  padding:0 16px 6px;
}

.app-step-dot {
  width:20px;
  height:20px;
  border-radius:999px;
  border:none;
  font-size:11px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e5e7eb;
  color:#4b5563;
  opacity:.7;
}

.app-step-dot.active {
  background:#007aff;
  color:#fff;
  opacity:1;
}

.app-step-dot.completed {
  background:#34c759;
  color:#fff;
  opacity:1;
}

/* ================================
   STEPS / CONTENT
================================ */
.step {
  display:none;
  margin-top:14px;
}

.step-active {
  display:block;
}

.step-inner {
  background:#fff;
  border-radius:24px;
  padding:20px 18px 18px;
  box-shadow:0 18px 35px rgba(15,23,42,0.08);
  margin:auto;
}

.step-inner h2 {
  font-size:20px;
  font-weight:700;
  margin-bottom:4px;
}

.step-desc {
  font-size:13px;
  color:#6b7280;
  margin-bottom:16px;
}

/* Actions tipo iOS */
.step-actions {
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:18px;
}

/* ================================
   BOTONES IOS
================================ */
.btn-main {
  flex:1;
  border:none;
  border-radius:999px;
  padding:10px 16px;
  background:#007aff;
  color:#fff;
  font-size:15px;
  font-weight:600;
  text-align:center;
}

.btn-main:active {
  opacity:0.85;
}

.btn-soft {
  flex:1;
  border-radius:999px;
  border:1px solid #d1d5db;
  background:#f9fafb;
  color:#374151;
  padding:10px 16px;
  font-size:14px;
}

/* ================================
   AMOUNT CARDS
================================ */
#amountContainer .amount-block {
  margin-bottom:12px;
  padding:12px;
  background:#f9fafb;
  border-radius:16px;
  border:1px solid #e5e7eb;
}

.amount-options {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.amount-card {
  padding:8px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid #e5e7eb;
  cursor:pointer;
  font-size:13px;
  position:relative;
}

.amount-card:hover {
  background:#f3f4ff;
}

.amount-card.selected {
  background:#eef2ff;
  border-color:#6366f1;
}

.amount-card .checkmark {
  display:none;
  position:absolute;
  right:6px;
  top:4px;
  background:#6366f1;
  color:#fff;
  padding:0 6px;
  border-radius:999px;
  font-size:11px;
}

.amount-card.selected .checkmark { display:inline-block; }

.free-input {
  max-width:160px;
}

/* ================================
   CHOICE CARDS (MÉTODO ENTREGA)
================================ */
.choice-row {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.choice-card {
  border-radius:18px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  padding:10px 12px;
  text-align:left;
  width:100%;
}

.choice-card .choice-title {
  display:block;
  font-size:15px;
  font-weight:600;
}

.choice-card .choice-sub {
  display:block;
  font-size:12px;
  color:#6b7280;
}

.choice-card.active {
  border-color:#007aff;
  background:#e0f0ff;
}

/* ================================
   FORMAT CARDS
================================ */
.format-container {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.format-card {
  display:flex;
  gap:10px;
  align-items:center;
  border-radius:16px;
  padding:10px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  cursor:pointer;
}

.format-thumb {
  border-radius:12px;
  background:#e5e7eb;
  flex-shrink:0;
}

.format-thumb.square { width:72px; height:72px; }
.format-thumb.landscape { width:100px; height:60px; }
.format-thumb.portrait { width:60px; height:100px; }

.format-card.selected {
  border-color:#007aff;
  background:#e0f0ff;
}

/* ================================
   RECIPIENTS
================================ */
.recipient-form {
  border-bottom:1px dashed #e5e7eb;
  padding-bottom:10px;
  margin-bottom:14px;
}

.recipient-form:last-child {
  border-bottom:none;
}

/* ================================
   IMAGES PREVIEW STEP 7
================================ */
#imagesPreviewRow img {
  cursor:pointer;
  border-radius:12px;
  max-width:96px;
  height:auto;
  border:2px solid transparent;
}

#imagesPreviewRow img.selected {
  border-color:#007aff;
}

/* ================================
   PREVIEW LIST (STEP 8)
================================ */
.preview-list {
  display:flex;
  flex-direction:column;
  gap:16px;
}

.preview-card-wrap {
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 18px 40px rgba(15,23,42,0.18);
}

.preview-card-wrap img {
  width:100%;
  height:auto;
  display:block;
}

/* ================================
   CHECKOUT LIST (STEP 9)
================================ */
.checkout-list .card {
  border-radius:18px;
  border:none;
  background:#f9fafb;
}

/* ================================
   MODAL DE SELECCIÓN DE IMÁGENES
================================ */
#imgModal .modal-dialog {
  max-width:480px;
  margin:0 auto;
}

#imgModal .modal-content {
  border-radius:24px;
  padding:0 0 10px;
  overflow:hidden;
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:none;
  -webkit-mask-image:-webkit-radial-gradient(white, black);
}

#modalMainImg {
  width:100%;
  max-width:360px;
  height:auto;
  border-radius:18px;
  margin:20px auto 12px;
  box-shadow:0 15px 40px rgba(0,0,0,0.15);
  display:block;
}

#modalThumbs img {
  width:62px;
  height:40px;
  object-fit:cover;
  border-radius:12px;
  cursor:pointer;
  border:2px solid transparent;
  transition:transform .2s,border-color .2s;
}

#modalThumbs img.active {
  border-color:#007aff;
  transform:scale(.96);
}

#modalThumbs {
  max-width:360px;
  margin:0 auto;
  padding-bottom:10px;
}

#confirmImgBtn {
  width:calc(100% - 40px);
  margin:14px auto 8px;
  border-radius:999px;
  padding:10px 0;
  background:#007aff;
  font-weight:600;
}

#prevImg, #nextImg {
  flex:1;
  margin:0 4px;
  border-radius:999px;
  padding:8px 0;
  font-weight:500;
  border:none;
  background:#f2f2f7;
}

/* ================================
   SPINNER OVERLAY
================================ */
#loadingOverlay {
  position:fixed;
  top:0;
  left:0;
  width:100vw;
  height:100vh;
  background:rgba(242,242,247,0.9);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  z-index:999999;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}

#loadingOverlay.active {
  opacity:1;
  pointer-events:all;
}

.spinner {
  width:54px;
  height:54px;
  border-radius:50%;
  border:6px solid #e5e7eb;
  border-top-color:#007aff;
  animation:spin 0.8s linear infinite;
}

.loading-text {
  margin-top:14px;
  font-size:14px;
  color:#374151;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================
   SUCCESS PAGE
================================ */
#successWrapper {
  width:100%;
  min-height:calc(var(--vh, 1vh)*100);
  display:flex;
  justify-content:center;
  align-items:center;
}

.success-card {
  width:100%;
  max-width:480px;
  margin:0 auto;
  padding:16px 0 24px;
}

.page-title {
  font-size:22px;
  font-weight:700;
  text-align:center;
  margin-top:12px;
  margin-bottom:4px;
}

.page-sub {
  font-size:13px;
  color:#6b7280;
  text-align:center;
  padding:0 16px;
  margin-bottom:18px;
}

.gift-preview-wrap {
  width:100vw;
  max-width:100vw;
  margin:0;
  border-radius:0;
  overflow:hidden;
  background:#000;
  position:relative;
  left:50%;
  right:50%;
  margin-left:-50vw;
  -webkit-mask-image:-webkit-radial-gradient(white, black);
}

.gift-preview-wrap img {
  width:100%;
  height:auto;
  display:block;
}

.gift-info {
  padding:16px 18px 22px;
  background:#fff;
  text-align:center;
}

.download-btn {
  width:100%;
  max-width:260px;
  margin:10px auto 0;
}

/* Desktop: centrar preview */
@media (min-width:769px) {
  .gift-preview-wrap {
    position:static;
    width:100%;
    max-width:480px;
    margin:0 auto;
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 20px 40px rgba(15,23,42,0.22);
  }
}

/* ================================
   SAFARI / WEBKIT FIXES
================================ */
.ios-fix {
  min-height:calc(var(--vh, 1vh)*100);
  height:calc(var(--vh, 1vh)*100);
  padding-top:var(--safe-top);
  padding-bottom:var(--safe-bottom);
}

html {
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
}

img {
  image-rendering:-webkit-optimize-contrast;
  transform:translateZ(0);
}

button, a, input {
  -webkit-tap-highlight-color:transparent;
}

/* Fallback gap */
@supports not (gap: 1rem) {
  .app-stepper > * { margin-right:6px; }
  .choice-row > * { margin-bottom:8px; }
}

@media (max-width:480px) {
  #imgModal .modal-dialog {
    margin:0;
    width:100%;
  }
  #modalMainImg {
    max-width:90%;
  }
}

/* ============================================================
   ESTILO PRO PARA TARJETAS DE MONTOS (PASO 2)
============================================================ */

.amount-card-pro {
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  cursor: pointer;
  width: 100%;
  transition: all .25s;
  position: relative;
  text-align: left;
}

.amount-card-pro .ac-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.amount-card/* GRID DE 2 COLUMNAS */
.amount-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

/* TARJETAS DE MONTO */
.amount-card-pro {
  width: 48%;
  background: #fff;
  padding: 14px 16px;
  border-radius: 18px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Selección */
.amount-card-pro.selected {
  background: #eaf2ff;
  border-color: #0d6efd;
  box-shadow: 0 6px 18px rgba(13,110,253,0.25);
}

/* Badge del monto — centrado perfecto */
.amount-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d6efd;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  text-align: center;
 /* min-width: 70px;  opcional, para que todos tengan mismo tamaño */
}


/* Badge libre */
.free-badge {
  background: #6b7280 !important;
}

/* Título */
.ac-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Descripción */
.ac-desc {
  font-size: 13px;
  color: #6b7280;
}

/* Check seleccionado */
.checkmark {
  display: none;
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 18px;
  font-weight: 700;
  color: #0d6efd;
}

.amount-card-pro.selected .checkmark {
  display: block;
}

/* Input libre */
.free-input {
  display: none;
}

.amount-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  width: 160px;
  cursor: pointer;
  transition: transform .2s;
}

.amount-box:hover {
  transform: scale(1.05);
}

.amount-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 10px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
}

.amount-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amount-badge {
  background: #0d6efd;
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-block;
}

.amount-title {
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

.amount-desc {
  font-size: 12px;
  color: #666;
}

.form-control {
  border-radius: 30px !important;
}


/* Centrar todas las preguntas principales */
.step-title,
.step h2,
.step h3,
.step > h2,
.step > h3 {
  text-align: center !important;
  width: 100%;
}

/* Centrar descripciones */
.step p,
.step .step-description {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}


/* Altura exacta restando header + stepper */
.step-active {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  min-height: calc(100vh - 200px); /* ajustable */
  padding: 20px;
}

/* Ajustar ancho máximo del contenido */
.step-active > * {
  max-width: 550px;
  width: 100%;
}

/* Ajuste para pantallas pequeñas */
@media (max-height: 740px) {
  .step-active {
    min-height: calc(90vh - 160px);
  }
}

@media (max-height: 620px) {
  .step-active {
    min-height: calc(90h - 120px);
  }
}


/* Textarea de mensaje personal menos redondeado */
.recipient-message {
  border-radius: 6px !important; /* o 4px si quieres casi cuadrado */
}


/* Contenedor clickable de selección de imagen */
.image-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Recuadro de imagen */
.image-thumb {
  width: 120px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s;
}

.image-thumb.placeholder:hover {
  background: #dcdfe4;
}

.image-select-card:hover .image-thumb {
  transform: scale(1.02);
}

/* Etiqueta debajo */
.image-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* Centrar títulos y descripciones en Paso 2 */
.amount-card-pro .ac-title,
.amount-card-pro .ac-desc {
  text-align: center;
  width: 100%;
}

/* Para asegurar que se centren correctamente dentro de la card */
.amount-card-pro {
  display: flex;
  flex-direction: column;
  align-items: center;
}

