/**
 * Estilos para remesas, recogida efectivo, asignar remesas/mensajeros.
 * Usado por delivery.ftl
 */

/* --- Modales (común) --- */
.delivery-modal .btn-close-cruz {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1;
}
.delivery-modal .btn-close-cruz span {
  pointer-events: none;
}
.delivery-modal .modal-confirm-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 12px;
  z-index: 10;
}
.delivery-modal .modal-content {
  position: relative;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.delivery-modal .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}
.delivery-modal .modal-body {
  padding: 20px 30px;
}
.delivery-modal .modal-body.text-center {
  padding: 20px 30px;
}
.delivery-modal .modal-footer {
  border-top: none;
  justify-content: flex-end;
  padding: 0 30px 25px;
}
.delivery-modal .modal-footer.justify-center {
  justify-content: center;
  padding-bottom: 25px;
}
.delivery-modal .modal-title {
  font-weight: 600;
  color: #333;
}
.delivery-modal .form-label,
.delivery-modal .form-check-label {
  color: #555;
  font-size: 14px;
}
.delivery-modal .form-label.muted {
  color: #666;
}
.delivery-modal .form-label.fw-600 {
  font-weight: 600;
}
.delivery-modal .form-control.radius-8 {
  border-radius: 8px;
}
.delivery-modal .btn.radius-8 {
  border-radius: 8px;
}
.delivery-modal .btn-min-90 {
  min-width: 90px;
}
.delivery-modal .btn-min-110 {
  min-width: 110px;
}
.delivery-modal .btn-min-100 {
  min-width: 100px;
}
.delivery-modal .btn-min-130 {
  min-width: 130px;
}
.delivery-modal .btn-min-160 {
  min-width: 160px;
}
.delivery-modal .modal-body .options-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}
.delivery-modal .modal-body .text-muted-p {
  color: #666;
  margin-top: 10px;
  font-size: 14px;
}
.delivery-modal .modal-body .result-icon-wrap {
  margin-bottom: 20px;
}
.delivery-modal .modal-body .result-msg {
  color: #666;
  margin-top: 10px;
  font-size: 14px;
}
.delivery-modal .modal-body .result-title-success {
  color: #155724;
}
.delivery-modal .modal-body .result-title-error {
  color: #721c24;
}

/* --- Reintentos (recargacuba / listas) --- */
.retry-ok { color: green; }
.retry-warn { color: orange; }
.retry-danger { color: red; }

/* --- Loaders fullscreen --- */
.delivery-loader,
.remesas-filter-loader {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- Remesas list: botones de acción --- */
#remesas-list-body .r-table > li.three-buttons {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  order: 10 !important;
  flex: 1 1 auto !important;
  min-width: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: stretch;
  align-items: center;
  gap: 8px;
}
#remesas-list-body .r-table > li.three-buttons > button {
  flex: 1;
  min-width: 0;
  margin: 0;
}
#remesas-list-body .r-table > li.three-buttons > button:only-child {
  flex: 0 0 33.33%;
  max-width: 33.33%;
}
@media (max-width: 767px) {
  #remesas-list-body .r-table > li.three-buttons {
    flex-direction: column;
  }
  #remesas-list-body .r-table > li.three-buttons > button,
  #remesas-list-body .r-table > li.three-buttons > button:only-child {
    flex: 1 1 auto;
    width: 100% !important;
    max-width: none !important;
    display: block;
  }
}
#remesas-list-body .r-table > *:nth-child(9) {
  display: none !important;
}
#remesas-list-body .r-table {
  cursor: pointer;
}
#remesas-list-body .r-table .three-buttons,
#remesas-list-body .r-table .three-buttons button {
  cursor: default;
}
#remesas-list-body .r-table > li .r-copyable {
  display: inline;
  cursor: text;
}
#remesas-list-body .collapse-content .r-copyable {
  cursor: text;
}
/* Mismo criterio que remesa MLC (revoolico.css .bank-copy-zone / toast #212529) */
#remesas-list-body .r-copyable--copied {
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(33, 37, 41, 0.22);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* --- Chips municipios --- */
.muni-chips {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.muni-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: #e9ecef;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}
.muni-chip-remove {
  background: none;
  border: none;
  padding: 0 0.15rem;
  cursor: pointer;
  color: #6c757d;
  font-size: 1.1rem;
  line-height: 1;
}
.muni-chip-remove:hover {
  color: #dc3545;
}
#municipality-chips-label.delivery-chips-label {
  font-size: 0.875rem;
  display: none;
}

/* --- Historial: chips estados --- */
.hist-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.hist-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: #e9ecef;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}
.hist-status-chip-remove {
  background: none;
  border: none;
  padding: 0 0.15rem;
  cursor: pointer;
  color: #6c757d;
  font-size: 1.1rem;
  line-height: 1;
}
.hist-status-chip-remove:hover {
  color: #dc3545;
}

/* --- Asignar remesas (manage) --- */
.manage-remesas-page .card-list {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  overflow: hidden;
}
.manage-remesas-page .r-header.three-items {
  background: #f8f9fa;
  color: #333;
  padding: 0.85rem 1.25rem;
  margin: 0;
  border-bottom: 1px solid #eee;
}
.manage-remesas-page .r-table.three-items {
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.manage-remesas-page .r-table.three-items:hover {
  background: #fafafa;
}
.manage-remesas-page .r-table.three-items:last-of-type {
  border-bottom: none;
}
.manage-remesas-page .r-table.three-items p {
  margin: 0;
  color: #444;
  font-size: 0.95rem;
}
.manage-remesas-page .r-table.three-items #remesaNombre {
  font-weight: 600;
  color: #333;
}
.manage-remesas-page .btn-modificar {
  border-radius: 8px;
  min-width: 100px;
}
.manage-remesas-page .r-footer {
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #eee;
  background: #fafafa;
}
.delivery-page-title {
  color: #333;
  font-weight: 600;
}

/* --- Asignar municipios (manage messengers) --- */
.manage-messengers-page .card-zona {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}
.manage-messengers-page .province-title {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}
.manage-messengers-page .form-check-label {
  color: #444;
  cursor: pointer;
}
.manage-messengers-page .form-check {
  padding-left: 1.5rem;
  min-height: 1.4rem;
  margin-bottom: 0.5rem;
}
.manage-messengers-page .btn-volver {
  border-radius: 8px;
  min-width: 100px;
}
.manage-messengers-page .btn-guardar {
  border-radius: 8px;
  min-width: 140px;
  padding: 0.5rem 1.5rem;
}
/* Botón Guardar inline (oculto cuando hay barra fija) y barra fija siempre visible */
.manage-messengers-page .delivery-save-inline {
  visibility: hidden;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}
.manage-messengers-page .delivery-save-inline .btn {
  margin: 0;
}
.delivery-save-fixed-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  display: flex;
  justify-content: center;
  align-items: center;
}
.delivery-save-fixed-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.delivery-save-fixed-bar .btn-guardar {
  border-radius: 8px;
  min-width: 140px;
  padding: 0.5rem 1.5rem;
}
/* Evitar que el contenido quede oculto detrás de la barra fija */
.manage-messengers-page {
  padding-bottom: 70px;
}
@media (min-width: 768px) {
  .manage-messengers-page {
    padding-bottom: 80px;
  }
}
.manage-messengers-page .delivery-section-title {
  color: #333;
}
.delivery-section-title {
  color: #333;
}
.border-top-eee {
  border-color: #eee !important;
}

/* --- Recogida list: botones de acción --- */
#recogida-list-body .r-table > li.three-buttons {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  order: 10 !important;
  flex: 1 1 auto !important;
  min-width: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: stretch;
  align-items: center;
  gap: 8px;
}
#recogida-list-body .r-table > li.three-buttons > button {
  flex: 1;
  min-width: 0;
  margin: 0;
}
#recogida-list-body .r-table > li.three-buttons > button:only-child {
  flex: 0 0 33.33%;
  max-width: 33.33%;
}
@media (max-width: 767px) {
  #recogida-list-body .r-table > li.three-buttons {
    flex-direction: column;
  }
  #recogida-list-body .r-table > li.three-buttons > button,
  #recogida-list-body .r-table > li.three-buttons > button:only-child {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }
}
#recogida-list-body .r-table > *:nth-child(9) {
  display: none !important;
}
#recogida-list-body .r-table {
  cursor: pointer;
}
#recogida-list-body .r-table > li .r-copyable {
  display: inline;
  cursor: text;
}
#recogida-list-body .collapse-content .r-copyable {
  cursor: text;
}
#recogida-list-body .r-copyable--copied {
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(33, 37, 41, 0.22);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Igual que .bank-card-toast en remesa MLC (bankmlccuba-page) */
.delivery-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  padding: 0.35rem 0.95rem;
  font-size: 0.8125rem;
  color: #fff;
  background: rgba(33, 37, 41, 0.9);
  border-radius: 2rem;
  z-index: 1080;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  max-width: 90vw;
  text-align: center;
}
.delivery-copy-toast.delivery-copy-toast--visible {
  opacity: 1;
}
#recogida-list-body .r-table .three-buttons,
#recogida-list-body .r-table .three-buttons button {
  cursor: default;
}

/* --- SVG sprites (ocultos) --- */
.delivery-svg-sprites {
  display: none;
}

/* --- Form inline (courier buttons) --- */
.delivery-form-inline {
  display: inline;
}
