/* =====================================================
   CHECKOUT.CSS (PRO) — Tienda AppCloud
   Panel tipo UberEats/Rappi
   - Slide (derecha)
   - Backdrop
   - Header/Footer sticky
   - Métodos de pago (cards)
   - Fecha/Hora entrega
===================================================== */

/* =====================
   Backdrop
====================== */
.checkout-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.55);
  backdrop-filter: blur(2px);
  z-index: 2050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.checkout-backdrop.show{
  opacity: 1;
  pointer-events: auto;
}

/* =====================
   Slide Panel
====================== */
.checkout-slide{
  position: fixed;
  top: 0;
  right: -100%;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: -10px 0 28px rgba(0,0,0,.18);
  transition: right .32s cubic-bezier(.4,0,.2,1);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.checkout-slide.show{ right: 0; }

@media (max-width: 420px){
  .checkout-slide{ width: 100vw; }
}

/* =====================
   Header / Body / Footer
====================== */
.checkout-header{
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 16px;
  background: #fff8f3;
  border-bottom: 1px solid rgba(17,24,39,.08);
}

.checkout-title{
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0;
  color: #111;
}

.checkout-subtitle{
  margin: 2px 0 0;
  font-weight: 700;
  color: rgba(17,24,39,.70);
  font-size: .9rem;
}

.checkout-body{
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  background: #fff;
}

/* Footer siempre visible + safe area */
.checkout-footer{
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid rgba(17,24,39,.08);
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
}

.checkout-footer .btn{
  border-radius: 14px;
  font-weight: 900;
  padding: 12px 14px;
}

/* Espacio extra interno para que el contenido no quede bajo el footer */
.checkout-body{
  padding-bottom: 24px;
}

/* =====================
   Secciones internas
====================== */
.checkout-section{
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.checkout-section-title{
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

/* =====================
   Métodos de pago (cards)
====================== */
.metodo-pago-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid #ffe0cc;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.metodo-pago-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.08);
  border-color: rgba(255,102,0,.45);
}

.metodo-pago-item.is-active{
  border-color: rgba(255,102,0,.70);
  background: rgba(255,102,0,.06);
}

.metodo-pago-item .form-check{
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.metodo-pago-item .form-check-input{
  margin: 0;
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}

.metodo-pago-item .form-check-label{
  margin: 0;
  font-weight: 900;
  color: #111;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metodo-pago-meta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.metodo-pago-chip{
  font-weight: 900;
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.04);
  color: rgba(17,24,39,.75);
}

.metodo-pago-chip.is-recommended{
  background: rgba(255,102,0,.10);
  border-color: rgba(255,102,0,.25);
  color: var(--primary);
}

@media (max-width: 420px){
  .metodo-pago-item .form-check-label{ white-space: normal; }
}

/* =====================
   Fecha/Hora entrega
====================== */
#fechaHoraEntregaBlock{
  background: #fffaf4;
  border: 1px solid #ffe0cc;
  border-radius: var(--radius-md);
}

#fechaHoraEntregaBlock .badge{
  border-radius: 999px;
  font-weight: 900;
}

#entregaFechaHora{
  border-radius: 14px;
  font-weight: 800;
}

#entregaFechaHoraError{
  font-weight: 800;
}

/* =====================
   Botón cerrar (si existe)
====================== */
.checkout-close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.10);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.checkout-close:hover{ background: rgba(17,24,39,.04); }