/* ============================================================
   TIGO - Pagar Facturas
   Archivo: css/styles.css
   Descripción: Estilos globales, componentes y responsividad
                para el clon del flujo "Pagar facturas" de Tigo.
   Autor: GitHub Copilot
   ============================================================ */

/* ------------------------------------------------------------
   1. RESET Y BASE
------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background-color: #f0f2f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------
   2. HEADER
   Barra superior azul marino con el logo Tigo
------------------------------------------------------------ */

.site-header {
  background-color: #00377d; /* azul marino Tigo */
  height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
}

.header-logo {
  display: block;
  width: 50px;
  height: auto;
}

/* ------------------------------------------------------------
   3. MAIN / LAYOUT
   Área de contenido con título y tarjeta centrada
------------------------------------------------------------ */

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 40px;
}

/* Título "Pagar facturas" — solo visible en desktop.
   Usa el mismo max-width que la card para que su borde izquierdo
   quede alineado con el borde izquierdo de la tarjeta. */
.page-title {
  max-width: 560px;
  width: 100%;
  font-size: 2rem;
  font-weight: 600;
  color: #00377d;
  margin-bottom: 16px;
  margin-top: 8px;
  line-height: 1.2;
}

/* ------------------------------------------------------------
   4. TARJETA (CARD)
   Contenedor blanco elevado del formulario
------------------------------------------------------------ */

.card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 28px 32px 28px;
  width: 100%;
  max-width: 560px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #00377d;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 20px;
}

/* ------------------------------------------------------------
   5. TABS (Documento / Hogar / Línea)
   Tres botones de selección tipo tab con icono + etiqueta
------------------------------------------------------------ */

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: #666;
  font-size: 0.8rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease,
    background-color 0.2s ease;
  /* accesibilidad: quitar outline nativo y poner uno propio */
  outline: none;
}

.tab:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.4);
}

/* Tab activo: borde más grueso, fondo gris claro, texto/icono azul marino */
.tab--active {
  border-color: #aaa;
  background-color: #f0f2f5;
  color: #333;
  font-weight: 600;
}

/* Icono SVG dentro del tab — siempre en azul marino Tigo */
.tab-icon {
  width: 22px;
  height: 22px;
  color: #00377d;
  flex-shrink: 0;
}

.tab-label {
  line-height: 1;
}

/* ------------------------------------------------------------
   6. PANELES DE FORMULARIO
   Contenido que cambia según la tab activa
------------------------------------------------------------ */

.tab-panel {
  animation: fadeIn 0.18s ease;
}

/* Ocultar paneles inactivos — se usa el atributo hidden del DOM */
.tab-panel[hidden] {
  display: none;
}

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

/* Fila de campos del formulario */
.field-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

/* Fila con campo único (Hogar y Línea) */
.field-row--single {
  display: block;
}

/* ------------------------------------------------------------
   7. SELECTOR DE TIPO (botón que abre el modal)
------------------------------------------------------------ */

.select-wrapper {
  position: relative;
  width: 120px;
  flex-shrink: 0;
}

/* Etiqueta flotante pequeña encima del botón */
.floating-label {
  position: absolute;
  top: -9px;
  left: 10px;
  font-size: 0.72rem;
  color: #555;
  background: #fff;
  padding: 0 3px;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

/* Botón de selección de tipo — simula un <select> */
.select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.select-btn:hover,
.select-btn:focus-visible {
  border-color: #00aeef;
}

/* Flecha del select */
.select-btn__arrow {
  width: 10px;
  height: 10px;
  color: #00aeef;
  flex-shrink: 0;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

/* Rotar flecha cuando el modal está abierto */
.select-btn[aria-expanded="true"] .select-btn__arrow {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------
   8. INPUT DE TEXTO
------------------------------------------------------------ */

.input-wrapper {
  flex: 1;
}

.input-wrapper--full {
  width: 100%;
}

.text-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #222;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.text-input::placeholder {
  color: #999;
  font-size: 0.93rem;
}

.text-input:focus {
  border-color: #00aeef;
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.15);
}

/* ------------------------------------------------------------
   9. TEXTO DE TÉRMINOS Y CONDICIONES
------------------------------------------------------------ */

.terms-text {
  font-size: 0.82rem;
  color: #555;
  margin-top: 16px;
  line-height: 1.5;
}

.terms-link {
  color: #00aeef;
  text-decoration: none;
  font-weight: 500;
}

.terms-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------
   9b. WIDGET reCAPTCHA v2
   Centrado dentro de la tarjeta con margen superior
------------------------------------------------------------ */

.recaptcha-wrapper {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start; /* alineado a la izquierda igual que el contenido */
}

/* Escalar el widget para que no se desborde en pantallas pequeñas */
@media (max-width: 360px) {
  .recaptcha-wrapper {
    transform: scale(0.85);
    transform-origin: left top;
  }
}

/* ------------------------------------------------------------
   10. BOTÓN CONTINUAR
------------------------------------------------------------ */

.card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-continuar {
  padding: 12px 32px;
  border: none;
  border-radius: 50px; /* pill shape */
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: not-allowed;
  outline: none;
  transition: background-color 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease;

  /* Estado INHABILITADO (por defecto) — color apagado gris-azulado */
  background-color: #b8d8ec;
  color: #ffffff;
  pointer-events: none;
}

/* Estado HABILITADO — se activa vía JS cuando hay valor en el campo */
.btn-continuar--active {
  background-color: #00aeef;
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 3px 10px rgba(0, 174, 239, 0.35);
}

.btn-continuar--active:hover {
  background-color: #008ec4;
}

.btn-continuar--active:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.5);
}

/* ------------------------------------------------------------
   11. MODAL DE TIPO DE DOCUMENTO
   Overlay + diálogo centrado (desktop) o inferior (móvil)
------------------------------------------------------------ */

/* Fondo oscuro semi-transparente */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Animación de entrada */
  animation: overlayIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Caja del modal */
.modal {
  background: #ffffff;
  border-radius: 8px;
  width: 90%;
  max-width: 440px;
  padding: 24px 0 0;
  animation: modalSlideIn 0.22s ease;
  overflow: hidden;
}

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

/* Título "Tipo" del modal */
.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #00aeef;
  padding: 0 24px 14px;
}

/* Línea divisoria */
.modal-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 0;
}

/* Lista de opciones de tipo */
.modal-options {
  list-style: none;
  padding: 8px 0;
}

.modal-option {
  padding: 0;
}

/* Etiqueta clicable de toda la fila */
.radio-label {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.radio-label:hover {
  background-color: #f5f8fc;
}

/* Ocultar el radio nativo */
.radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Radio personalizado */
.radio-custom {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #aaa;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
  background: #fff;
}

/* Punto interior cuando está seleccionado */
.radio-custom::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  transition: background-color 0.2s ease;
}

/* Estilo cuando el radio nativo está checked */
.radio-input:checked + .radio-custom {
  border-color: #00377d;
}

.radio-input:checked + .radio-custom::after {
  background-color: #00377d;
}

/* Texto de la opción */
.radio-text {
  font-size: 0.92rem;
  color: #333;
  line-height: 1.3;
}

/* Acciones del modal: Cancelar / Continuar */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 14px 20px;
  border-top: 1px solid #e0e0e0;
}

.modal-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 6px 4px;
  outline: none;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.modal-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.4);
}

.modal-btn--cancel {
  color: #00aeef;
}

.modal-btn--cancel:hover {
  color: #007bb5;
}

.modal-btn--confirm {
  color: #00aeef;
}

.modal-btn--confirm:hover {
  color: #007bb5;
}

/* ------------------------------------------------------------
   12. RESPONSIVE — MOBILE (≤ 600 px)
   En móvil el modal aparece en la parte inferior (bottom sheet)
------------------------------------------------------------ */

@media (max-width: 600px) {

  /* El título "Pagar facturas" desaparece en móvil
     (va dentro del header azul como texto) */
  .page-title {
    display: none;
  }

  /* Header en móvil muestra título centrado en blanco */
  .site-header {
    position: relative;
    justify-content: center;
  }

  /* Logo a la izquierda absoluto */
  .header-inner {
    justify-content: center;
    position: static;
  }

  /* Texto "Pagar facturas" centrado en el header en móvil */
  .site-header::after {
    content: "Pagar facturas";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
  }

  /* Logo visible en móvil, posicionado a la izquierda */
  .header-logo {
    display: block;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: auto;
  }

  /* Contenido principal sin padding excesivo */
  .page-main {
    padding: 16px 12px 32px;
  }

  /* Tarjeta ocupa todo el ancho con padding reducido */
  .card {
    padding: 20px 16px 20px;
    box-shadow: none;
    border-radius: 8px;
  }

  /* Tabs más compactos */
  .tabs {
    gap: 8px;
  }

  .tab {
    padding: 8px 4px;
    font-size: 0.75rem;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
  }

  /* El selector de tipo más estrecho */
  .select-wrapper {
    width: 90px;
  }

  .select-btn {
    font-size: 0.88rem;
    padding: 0 10px;
  }

  /* Botón continuar a la derecha en móvil */
  .card-footer {
    justify-content: flex-end;
  }

  /* Modal en móvil: bottom sheet deslizable desde abajo */
  .modal-overlay {
    align-items: flex-end;
    justify-content: stretch;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    animation: modalSlideUp 0.25s ease;
    max-height: 80vh;
    overflow-y: auto;
  }

  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }

}

/* ------------------------------------------------------------
   13. RESPONSIVE — TABLET (601 px – 900 px)
------------------------------------------------------------ */

@media (min-width: 601px) and (max-width: 900px) {
  .page-main {
    padding: 24px 20px 40px;
  }

  .page-title {
    max-width: 560px;
  }

  .card {
    padding: 24px 24px;
  }
}

/* ------------------------------------------------------------
   14. RESULTADO DE CONSULTA (inyectado por JS)
   Estilos para el contenedor de resultados de la API
------------------------------------------------------------ */

#result-container {
  margin-top: 16px;
}

/* Estado de carga */
.result--loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0057a8;
  font-size: 0.9rem;
  padding: 12px 0;
}

/* Spinner simple con animación CSS */
.result-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid #b8d8ec;
  border-top-color: #00aeef;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* Resultado exitoso */
.result--success {
  background: #f0f9ff;
  border: 1px solid #b8e4f9;
  border-radius: 6px;
  padding: 14px 16px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.88rem;
  color: #333;
  gap: 8px;
}

.result-row + .result-row {
  border-top: 1px solid #daeef8;
}

.result-label {
  color: #555;
  flex-shrink: 0;
}

.result-value {
  font-weight: 600;
  color: #003087;
  text-align: right;
}

/* Estado de error */
.result--error {
  background: #fff5f5;
  border: 1px solid #f5c0c0;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #c0392b;
}

/* ------------------------------------------------------------
   15. DESKTOP (> 900 px)
   El layout de la imagen de referencia: centrado, página grande
------------------------------------------------------------ */

@media (min-width: 901px) {
  .page-main {
    padding: 40px 24px 60px;
    align-items: center;
  }

  .page-title,
  .card {
    max-width: 560px;
    width: 100%;
  }
}

/* ============================================================
   16. SISTEMA DE VISTAS (Multi-view SPA)
   Controla qué vista se muestra.
   JS agrega/quita `.view--active` y el atributo `hidden`.
============================================================ */

.view {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

.view--active {
  display: flex;
  flex-direction: column;
}

/* ============================================================
   17. SPINNER OVERLAY GLOBAL
   Cubre todo el viewport mientras se espera la respuesta de la API.
============================================================ */

.spinner-overlay {
  position: fixed;
  inset: 0;                    /* top/right/bottom/left: 0 */
  z-index: 9000;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* El atributo [hidden] oculta el overlay de forma nativa */
.spinner-overlay[hidden] {
  display: none;
}

.spinner-gif {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* ============================================================
   18. TOAST / BANNER DE NOTIFICACIÓN "AL DÍA"
   Banner verde que aparece en la parte superior de la vista de búsqueda
   cuando el usuario está al día con su factura.
============================================================ */

.toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.toast--visible {
  transform: translateY(0);
}

.toast--success {
  background: #ffffff;
  border-bottom: 4px solid #27ae60;
}

.toast-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
}

.toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #27ae60;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

.toast-text {
  flex: 1;
  font-size: 0.92rem;
  color: #1a1a1a;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #888;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #333;
}

.toast-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

/* Barra de progreso de auto-cierre */
.toast-progress {
  height: 3px;
  background: #27ae60;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
}

.toast-progress--animating {
  transition: transform linear;
  transform: scaleX(0);
}

/* ============================================================
   19. NAVEGACIÓN INTERNA (botón REGRESAR)
   Aparece en las vistas de Facturas y Métodos de Pago.
============================================================ */

.back-nav {
  margin-bottom: 4px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #00aeef;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 0;
  transition: color 0.2s;
}

.back-btn:hover {
  color: #0088c4;
}

.back-arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* ============================================================
   20. VISTA DE FACTURAS (View 2)
============================================================ */

.page-main--inner {
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.facturas-intro {
  font-size: 0.88rem;
  color: #555;
  margin: 4px 0 18px;
  font-weight: 400;
}

.facturas-intro strong {
  color: #00377d;
  font-weight: 600;
}

.facturas-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tarjeta individual de factura */
.factura-card {
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 55, 125, 0.07);
}

/* Encabezado de la tarjeta: ícono de teléfono + título + badge */
.factura-card-header {
  background: #f5f8fc;
  border-bottom: 1px solid #e0e7ef;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.factura-card-header-icon {
  width: 22px;
  height: 22px;
  color: #00377d;
  flex-shrink: 0;
}

.factura-card-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #00377d;
  flex: 1;
}

.factura-badge {
  background: #00aeef;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 2px 10px;
  line-height: 1.5;
}

/* Cuerpo con cada detalle de la factura */
.factura-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.factura-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: #333;
  gap: 8px;
}

.factura-row-label {
  color: #666;
  font-weight: 400;
  flex-shrink: 0;
}

.factura-row-value {
  font-weight: 600;
  color: #00377d;
  text-align: right;
}

.factura-row-value--urgent {
  color: #c0392b;
}

/* Botón "Pagar" dentro de la tarjeta de factura */
.factura-footer {
  padding: 0 16px 16px;
  display: flex;
  justify-content: flex-end;
}

.btn-pagar {
  background: #00aeef;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-pagar:hover {
  background: #0088c4;
}

.btn-pagar:active {
  transform: scale(0.97);
}

/* ============================================================
   21. VISTA DE MÉTODOS DE PAGO (View 3)
============================================================ */

.page-title--payment {
  font-size: 1.3rem;
  color: #00377d;
  font-weight: 600;
  margin: 0 0 20px;
  font-family: 'Poppins', sans-serif;
}

/* Layout de dos columnas en escritorio, una columna en móvil */
.payment-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

/* Tarjetas de detalles y métodos */
.payment-details,
.payment-methods {
  background: #ffffff;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 55, 125, 0.07);
  box-sizing: border-box;
}

.payment-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #00377d;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef5;
}

/* Filas de detalle de la factura */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.87rem;
  gap: 8px;
}

.detail-row + .detail-row {
  border-top: 1px solid #f0f4f8;
}

.detail-label {
  color: #666;
  font-weight: 400;
}

.detail-value {
  font-weight: 600;
  color: #00377d;
  text-align: right;
}

.detail-value--amount {
  font-size: 1.05rem;
  color: #00377d;
}

/* Lista de métodos de pago */
.methods-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.method-item + .method-item {
  border-top: 1px solid #f0f4f8;
}

.method-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  text-align: left;
  border-radius: 6px;
  transition: background 0.15s;
}

.method-btn:hover {
  background: #f5f9fe;
}

.method-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.method-logo--card {
  width: 48px;
  height: 32px;
}

.method-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
}

.method-chevron {
  width: 8px;
  height: 14px;
  color: #aab4c0;
  flex-shrink: 0;
  stroke: currentColor;
}

/* ============================================================
   22. RESPONSIVE — PAYMENT LAYOUT DESKTOP
============================================================ */

@media (min-width: 700px) {
  .payment-layout {
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
    max-width: 900px;
  }

  .page-main--inner {
    padding: 32px 24px 60px;
  }
}

@media (min-width: 901px) {
  .page-main--inner {
    padding: 40px 24px 60px;
  }

  .payment-layout {
    max-width: 860px;
  }
}

/* ============================================================
   23. BADGE DE DESCUENTO EN FACTURAS
============================================================ */

.factura-row--discount .factura-row-label {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  display: flex;
}

.discount-badge {
  display: inline-block;
  background: #e8f8ee;
  color: #1a7a3a;
  border: 1px solid #7ec89a;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.factura-row-value--original {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 400;
  font-size: 0.82rem;
}

.factura-row-value--discount {
  color: #1a7a3a;
  font-weight: 700;
  font-size: 1.05rem;
}
