/* ==========================================================================
   FSTORE - Checkout Page Styles
   Optimized for mobile-first Yape & Plin Peruvian payments
   ========================================================================== */

.checkout-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.order-header-banner {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.order-code-badge {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.order-amount-badge {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
}

/* QR Code Section */
.qr-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.qr-box {
  width: 195px;
  height: 195px;
  margin: 1rem auto;
  background: #fff;
  padding: 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   CHECKOUT STEPPER WIZARD - MODERN GAMER / FINTECH UI
   ========================================================================== */
.checkout-stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 18, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.4rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(14px);
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  user-select: none;
}

.stepper-step:hover {
  background: rgba(255, 255, 255, 0.05);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: var(--font-heading);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.step-check-icon {
  display: none;
}

.step-title-wrap {
  display: flex;
  flex-direction: column;
}

.step-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.step-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #cbd5e1;
  transition: color 0.25s ease;
}

/* Active Step */
.stepper-step.active .step-circle {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border-color: #00f2fe;
  color: #0b0f19;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.5);
  transform: scale(1.05);
}

.stepper-step.active .step-tag {
  color: var(--neon-cyan);
}

.stepper-step.active .step-name {
  color: #ffffff;
}

/* Completed Step */
.stepper-step.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.stepper-step.completed .step-num-txt {
  display: none;
}

.stepper-step.completed .step-check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-step.completed .step-tag {
  color: #34d399;
}

.stepper-step.completed .step-name {
  color: #e2e8f0;
}

/* Stepper Connecting Divider */
.stepper-divider {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.stepper-divider.completed {
  background: linear-gradient(90deg, #10b981, #00f2fe);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

/* Wizard Panes */
.step-wizard-pane {
  display: none;
}

.step-wizard-pane.active {
  display: block;
  animation: paneFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes paneFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Step Navigation Bottom Bar */
.step-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-step-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  color: #0b0f19;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.3);
  transition: all 0.25s ease;
}

.btn-step-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.45);
  color: #000;
}

.btn-step-prev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-step-prev:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Mandatory Proof Notice in Step 3 */
.mandatory-proof-notice {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.08) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.1);
}

.mandatory-proof-notice .notice-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.mandatory-proof-notice strong {
  color: #fbbf24;
  font-size: 0.96rem;
  display: block;
  margin-bottom: 2px;
}

.mandatory-proof-notice span {
  color: #e2e8f0;
  font-size: 0.86rem;
  line-height: 1.35;
}

/* Proof Status Live Pill */
.proof-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.proof-status-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.proof-status-badge.success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

/* Shake Animation for Invalid Inputs */
.input-error-shake {
  animation: inputShake 0.5s ease-in-out;
  border-color: #f43f5e !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45) !important;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Quick Summary Box in Step 2 & 3 */
.step-order-recap-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.recap-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: #94a3b8;
}

.recap-item strong {
  color: #fff;
}

.phone-copy-box {
  background: rgba(13, 16, 25, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.phone-copy-box:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.phone-number {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Voucher Upload Box */
.voucher-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(13, 16, 25, 0.4);
  position: relative;
}

.voucher-dropzone:hover, .voucher-dropzone.dragover {
  border-color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.05);
}

.voucher-preview {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  display: none;
  object-fit: contain;
}

.voucher-dropzone.has-file {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15) !important;
}

.voucher-dropzone.required-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3) !important;
  animation: dropzoneShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes dropzoneShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

.btn-checkout.btn-checkout-locked {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.75;
}

.btn-checkout.btn-checkout-locked:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-checkout.btn-checkout-unlocked {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45) !important;
  animation: pulseUnlocked 2s infinite ease-in-out;
}

@keyframes pulseUnlocked {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.countdown-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--neon-amber);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Grilla de Campos de Notificación Dúo */
.checkout-fields-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   Mobile Responsive Adjustments (Max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
  }

  /* Navbar en checkout móvil */
  .site-header,
  .site-header.master-header {
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 12px !important;
  }

  .nav-container {
    gap: 6px !important;
  }

  .navbar-brand-img {
    height: 44px !important;
    max-height: 44px !important;
  }

  .header-nav-tabs,
  .header-nav-divider,
  .nav-currency-pill,
  .header-center-zone {
    display: none !important;
  }

  .btn-nav-vip {
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    height: 36px !important;
    border-radius: 8px !important;
  }

  .nav-wallet-pill {
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
  }

  .nav-wallet-pill .btn-quick-recharge {
    display: none !important;
  }

  .btn-nav-user {
    height: 36px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
  }

  .btn-nav-user .btn-user-text,
  .btn-nav-user .user-display-name,
  .btn-nav-user .chevron-icon {
    display: none !important;
  }

  .checkout-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 14px !important;
    margin: 1rem auto 2.5rem auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .order-header-banner {
    padding: 1.1rem 1rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.8rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    border-radius: 14px !important;
  }

  .order-header-banner > div:last-child {
    text-align: left !important;
    width: 100% !important;
  }

  .step-card {
    padding: 1.2rem 1rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    border-radius: 14px !important;
  }

  /* Colapso de Formulario Dúo a 1 Columna en Celular */
  .checkout-fields-duo {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .payment-selector {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .payment-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .qr-box {
    max-width: 200px !important;
    max-height: 200px !important;
    width: 100% !important;
  }

  .phone-copy-box {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .phone-number {
    font-size: 1.12rem !important;
  }

  .voucher-dropzone {
    padding: 1.4rem 1rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .btn-action-primary,
  .btn-upload-voucher {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-stepper-container {
    padding: 0.65rem 0.75rem !important;
    border-radius: 12px !important;
  }

  .step-name {
    display: none !important;
  }

  .stepper-step {
    padding: 0.2rem !important;
    gap: 0.4rem !important;
  }

  .stepper-divider {
    margin: 0 0.35rem !important;
  }

  .step-circle {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.82rem !important;
  }

  .step-nav-bar {
    flex-direction: column-reverse !important;
    gap: 0.75rem !important;
  }

  .btn-step-next,
  .btn-step-prev {
    width: 100% !important;
    justify-content: center !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 440px) {
  .btn-nav-vip {
    padding: 0 8px !important;
    width: 36px !important;
    justify-content: center !important;
  }

  .btn-nav-vip span {
    display: none !important;
  }

  .order-code-badge {
    font-size: 1.15rem !important;
    word-break: break-word !important;
  }

  .order-amount-badge {
    font-size: 1.45rem !important;
  }

  .step-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.78rem !important;
  }

  .checkout-container {
    padding: 0 10px !important;
  }

  .step-card {
    padding: 1rem 0.8rem !important;
  }
}

