/* RMDQ v13: checkout compacto, adaptativo y desplazable. Solo presentación. */
#customerModal { --bs-modal-width: 870px; }
#customerModal .checkout-dialog { width: calc(100% - 24px); margin: 12px auto; }
#customerModal .checkout-modal { border: 0; border-radius: 19px; max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; }
#customerModal .checkout-modal form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
#customerModal .checkout-modal .modal-header { padding: 20px 28px 9px; flex: 0 0 auto; }
#customerModal .checkout-modal .modal-body { padding: 6px 28px 14px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#customerModal .checkout-modal .modal-footer { padding: 13px 28px 17px; flex: 0 0 auto; gap: 7px; }
#customerModal .checkout-modal .modal-footer > * { margin: 0; }
#customerModal .checkout-modal .modal-footer .btn-primary-brand { min-height: 44px; padding: 11px 17px; }
#customerModal .checkout-modal .form-intro { margin: 1px 0 14px; line-height: 1.5; }
#customerModal .checkout-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; }
#customerModal .checkout-field { min-width: 0; }
#customerModal .checkout-field .form-label { display: block; margin: 0 0 5px; }
#customerModal .checkout-field .form-control, #customerModal .checkout-field .form-select { min-width: 0; width: 100%; min-height: 42px; font-size: 14px; padding: 9px 12px; border-color: #dfe7eb; border-radius: 9px; }
#customerModal .checkout-field .form-text { font-size: 11px; margin-top: 4px; line-height: 1.35; }
#customerModal .payment-choices { border: 0; padding: 0; min-width: 0; margin: 16px 0 0!important; }
#customerModal .payment-choices legend { float: none; width: auto; padding: 0; margin: 0 0 9px; }
#customerModal #paymentChoices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
#customerModal .payment-option { display: flex; align-items: center; gap: 10px; padding: 12px 13px; margin: 0; min-width: 0; min-height: 56px; border: 1px solid #d5dee8; border-radius: 12px; cursor: pointer; background: #f9fbfd; font-size: 13px; line-height: 1.35; font-weight: 650; }
#customerModal .payment-option:has(input:checked) { border-color: #337fb5; background: #eff8fc; box-shadow: 0 0 0 1px #337fb5; }
#customerModal .payment-option input { accent-color: #1976a5; width: 18px; height: 18px; flex: none; }
#customerModal .payment-option span { min-width: 0; overflow-wrap: anywhere; }
#customerModal #paymentNotes { line-height: 1.45; font-size: 11px; margin-top: 8px!important; }
@media (min-width: 576px) { #customerModal .checkout-dialog { max-width: min(870px,calc(100vw - 36px)); } }
@media (max-width: 720px) {
  #customerModal #paymentChoices { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #customerModal .checkout-fields { gap: 11px 13px; }
  #customerModal .checkout-modal .modal-header { padding: 17px 19px 8px; }
  #customerModal .checkout-modal .modal-body { padding: 6px 19px 12px; }
  #customerModal .checkout-modal .modal-footer { padding: 12px 19px 15px; }
}
@media (max-width: 540px) {
  #customerModal .checkout-dialog { width: calc(100% - 16px); margin: 8px auto; }
  #customerModal .checkout-modal { max-height: calc(100dvh - 16px); border-radius: 15px; }
  #customerModal .checkout-fields { grid-template-columns: minmax(0,1fr); gap: 10px; }
  #customerModal #paymentChoices { grid-template-columns: minmax(0,1fr); gap: 8px; }
  #customerModal .payment-option { min-height: 46px; padding: 9px 12px; font-size: 14px; }
  #customerModal .checkout-modal .modal-header { padding: 15px 16px 7px; }
  #customerModal .checkout-modal .modal-body { padding: 5px 16px 11px; }
  #customerModal .checkout-modal .modal-footer { padding: 10px 16px 13px; }
  #customerModal .checkout-modal .modal-footer .small { font-size: 10px; line-height: 1.25; }
  #customerModal .checkout-modal h3 { font-size: 22px; }
}
@media (max-height: 650px) and (min-width: 721px) {
  #customerModal .checkout-modal .modal-header { padding-top: 12px; padding-bottom: 5px; }
  #customerModal .checkout-modal .modal-body { padding-top: 4px; padding-bottom: 9px; }
  #customerModal .checkout-modal .modal-footer { padding-top: 8px; padding-bottom: 10px; }
  #customerModal .checkout-fields { gap: 8px 20px; }
  #customerModal .checkout-modal .form-intro { margin-bottom: 10px; }
}

/* v15: resúmenes bancarios compactos, legibles y adaptables */
#customerModal .rmdq-transfer-preview {background:#f1f7f9;border-left:3px solid #46869b;padding:8px 11px;border-radius:6px;line-height:1.5;}
.rmdq-bank-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:0;}
.rmdq-bank-grid > div{min-width:0;}
.rmdq-bank-grid dt{font-size:12px;color:#506479;margin-bottom:2px;font-weight:600;}
.rmdq-bank-grid dd{font-size:15px;color:#1d3445;font-weight:700;margin:0;overflow-wrap:anywhere;user-select:text;}
@media(max-width:540px){.rmdq-bank-grid{grid-template-columns:minmax(0,1fr);gap:7px;}}

/* v18.1: selector de pais en la misma linea que las pasarelas, solo para dLocal Go. */
#customerModal .rmdq-payment-inline {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 16px;
  min-width: 0;
}
#customerModal .rmdq-payment-inline > .payment-choices {
  flex: 1 1 0;
  margin: 0 !important;
  min-width: 0;
}
#customerModal .rmdq-payment-inline > #paymentCountryField {
  flex: 0 0 235px;
  width: 235px;
  min-width: 0;
  margin: 0;
}
#customerModal .rmdq-payment-inline > #paymentCountryField[hidden] {
  display: none !important;
}
#customerModal .rmdq-payment-inline #paymentCountryField .form-label {
  margin: 0 0 9px;
  line-height: 1.5;
}
#customerModal .rmdq-payment-inline #paymentCountryField .form-select {
  min-height: 56px;
}
@media (min-width: 761px) {
  #customerModal .rmdq-payment-inline #paymentChoices { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  #customerModal .rmdq-payment-inline { flex-direction: column; gap: 12px; }
  #customerModal .rmdq-payment-inline > .payment-choices,
  #customerModal .rmdq-payment-inline > #paymentCountryField {
    flex: 0 1 auto;
    width: 100%;
  }
  #customerModal .rmdq-payment-inline #paymentCountryField .form-select { min-height: 44px; }
}

/* v18.3: domicilio completo, y teléfono/localidad/provincia en una fila en escritorio. */
#customerModal .checkout-fields > .checkout-full { grid-column: 1 / -1; }
#customerModal .checkout-contact-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  min-width: 0;
}
@media (max-width: 620px) {
  #customerModal .checkout-contact-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
