/* Estilos para la página de pago */

/* Colores principales */
:root {
  --color-verde: #691C32;
  --color-verde-claro: rgba(41, 86, 68, 0.1);
  --color-rojo: #dc3545;
  --color-gris-claro: #f8f9fa;
  --color-blanco: #ffffff;
}

/* Título principal */
.info-title {
  background-color: var(--color-verde);
  color: var(--color-blanco);
  padding: 1.5rem;
  text-align: center;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Contenedor de breadcrumb */

.badge {
    display: inline-block;
    min-width: 10px;
    padding: 3px 7px;
    font-size: 16px;
    color: #fff;
    vertical-align: middle;
    background-color: green;
    border-radius: 10px;
}


.breadcrumb-container a {
  color: var(--color-verde);
  text-decoration: none;
}

/* Tarjeta de formulario */
.form-card {
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.form-header {
  background-color: var(--color-gris-claro);
  padding: 1rem;
  font-weight: bold;
  color: var(--color-verde);
  border-bottom: 1px solid #ddd;
}

.form-body {
  padding: 1.5rem;
  background-color: var(--color-blanco);
}

/* Inputs y selects */
.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem;
  font-size: 1.3rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  margin-top: 0.25rem;
}

.form-control:focus {
  border-color: var(--color-verde);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(41, 86, 68, 0.25);
}

.form-control.is-invalid {
  border-color: var(--color-rojo);
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.form-row > .form-group {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
  flex: 1;
}

/* Mensajes de error */
.error-message {
  display: none;
  color: var(--color-rojo);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Tarjeta de resumen */
.summary-card {
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  padding: 1.5rem;
  background-color: var(--color-blanco);
}

.summary-detail {
  color: #333;
  font-weight: 600;
  font-size: 1.8rem;
}

.summary-detail p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

/* Botón de proceder */
.btn-proceder {
  background-color: var(--color-verde);
  color: var(--color-blanco);
  border: none;
  padding: 0.75rem 1rem;
  font-weight: bold;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  text-transform: uppercase;
  background-color: #9F2241;
  border-radius: 3px;
}

.btn-proceder:hover {
  background-color: #691C32;
}

/* Instrucciones */
.instructions {
  margin-top: 1.5rem;
  font-size: 1.7rem;

}

.instructions ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

/* Estilos responsivos */
@media (max-width: 767.98px) {
  .form-row {
    flex-direction: column;
  }
  
  .form-row > .form-group {
    margin-bottom: 1rem;
  }
}


/* Modal JSON */
.modal-header {
  background-color: #691C32;
  color: var(--color-blanco);
}

.modal-title {
  font-weight: bold;
}

.close {
  color: var(--color-blanco);
}

pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.25rem;
}

/* Estilos para resumen del carrito en pago */
.cart-summary-details {
  max-height: 400px;
  overflow-y: auto;
}

.cart-item-summary {
  border: 1px solid #e5e5e5;
  border-radius: 0.25rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
}

.cart-item-summary:last-child {
  margin-bottom: 0;
}

.site-header h5 {
  color: var(--color-verde);
  margin-bottom: 0.25rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.visit-date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.tickets-summary {
  margin-bottom: 0.75rem;
}

.ticket-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.ticket-summary-row:last-child {
  border-bottom: none;
}

.ticket-name {
  flex: 1;
  font-weight: 500;
  color: #333;
}

.ticket-qty {
  margin: 0 1rem;
  color: #666;
  font-size: 1.4rem;
}

.ticket-total {
  font-weight: 600;
  color: var(--color-verde);
}

.item-discounts-summary {
  background-color: #e8f5e8;
  padding: 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}

.discount-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.5rem;
}

.discount-desc {
  color: #666;
}

.discount-amount {
  color: #28a745;
  font-weight: 600;
}

.item-total-summary {
  text-align: right;
  padding-top: 0.5rem;
  border-top: 2px solid var(--color-verde);
}

.item-total-summary strong {
  color: var(--color-verde);
  font-size: 2rem;
}

/* Responsive para resumen del carrito */
@media (max-width: 767.98px) {
  .ticket-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .ticket-qty {
    margin: 0;
  }
  
  .item-total-summary {
    text-align: left;
  }
}

/* Estilos para modales de respuesta */
.response-details pre,
.error-details code,
.payload-details pre {
  font-size: 0.85rem;
  max-height: 300px;
  overflow-y: auto;
}

.payload-details details summary {
  cursor: pointer;
  user-select: none;
}

.payload-details details summary:hover {
  background-color: #f8f9fa;
}

.alert-success h6,
.alert-danger h6 {
  margin-bottom: 0.5rem;
}

.modal-header.bg-success,
.modal-header.bg-danger {
  border-bottom: none;
}

/* Estilos para botón en estado de procesamiento */
.btn-proceder:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.8;
}

.btn-proceder:disabled:hover {
  background-color: #6c757d;
  border-color: #6c757d;
}

/* Animación de carga para el botón */
.btn-proceder.processing::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: button-spin 1s linear infinite;
}

@keyframes button-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estilos para el cuadro de aviso de privacidad */
.privacy-card {
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  margin-top: 1rem;
  background-color: var(--color-blanco);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.privacy-content {
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: #d9edf7;
}

.privacy-icon {
  color: var(--color-verde);
  font-size: 1.2rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.privacy-text {
  flex: 1;
}

.privacy-text h6 {
  color: var(--color-verde);
  font-weight: 600;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.privacy-text p {
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
  line-height: 1.4;
  color: #333;
}

.privacy-link {
  color: var(--color-verde);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.privacy-link:hover {
  color: #691C32;
  text-decoration: none;
  border-bottom-color: #691C32;
}

.privacy-note {
  
  font-size: 1.7rem;
  line-height: 1.3;
  display: block;
}

/* Responsive para el aviso de privacidad */
@media (max-width: 767.98px) {
  .privacy-content {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .privacy-icon {
    font-size: 2rem;
  }
  
  .privacy-text h6 {
    font-size: 2rem;
  }
  
  .privacy-text p {
    font-size: 2rem;
  }
  
  .privacy-note {
    font-size: 2rem;
  }
}

/* Estilos para botones de confirmación de cancelación */
.payment-btn-continue {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  min-width: 160px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.payment-btn-continue:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
  color: white;
}

.payment-btn-cancel {
  background: linear-gradient(135deg, #ff5722, #f4511e);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  min-width: 160px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.btn-group-sm>.btn, .btn-sm {
    padding: 5px 10px;
    line-height: 1.5;
    border-radius: 3px;
}

.payment-btn-cancel:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 87, 34, 0.4);
  color: white;
}

#modalCancelConfirmation .modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 576px) {
  .payment-btn-continue, .payment-btn-cancel {
    min-width: 140px;
    padding: 12px 20px;
    font-size: 12px;
  }
}

/* Estilos para modales de éxito y error de pago */
.payment-success-alert {
  border: none;
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  margin-bottom: 2rem;
}

.payment-success-icon {
  font-size: 4rem;
  color: #28a745;
  margin-bottom: 1rem;
}

.payment-success-title {
  color: #155724;
  margin-bottom: 1rem;
}

.payment-success-text {
  color: #155724;
  font-size: 1.1rem;
  margin-bottom: 0;
}

.payment-error-alert {
  border: none;
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  margin-bottom: 2rem;
}

.payment-error-icon {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.payment-error-title {
  color: #721c24;
  margin-bottom: 1rem;
}

.payment-error-text {
  color: #721c24;
  font-size: 1.1rem;
  margin-bottom: 0;
}

.payment-error-details {
  color: #721c24;
  margin-top: 1rem;
}

.purchase-summary {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.purchase-summary h6 {
  color: #495057;
  margin-bottom: 1rem;
}

.error-summary {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.error-summary h6 {
  color: #495057;
  margin-bottom: 1rem;
}

/* Estilos para toast de éxito */
.custom-toast {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%) translateX(100px);
  z-index: 9999;
  background-color: #28a745;
  color: white;
  width: auto;
  min-width: 400px;
  max-width: 500px;
  padding: 20px 25px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.custom-toast.show {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.custom-toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-toast-body {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.custom-toast-icon {
  margin-right: 15px;
  font-size: 24px;
}

.custom-toast-message {
  font-weight: 500;
  line-height: 1.4;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  margin-left: 15px;
  padding: 0;
  line-height: 1;
}

.toast-close-btn:hover {
  opacity: 0.8;
}

/* Estilos para indicadores de estado de pago */
.payment-pending-status {
  text-align: center;
  padding: 20px;
}

.payment-pending-title {
  margin-top: 1rem;
}

.payment-pending-description {
  color: #666;
}

.payment-pending-message {
  color: #666;
}

.websocket-warning {
  margin: 10px;
}

/* Estilos para modal de confirmación de cancelación */
.modal-cancel-confirmation .modal-dialog {
  max-width: 650px;
  margin: 1.75rem auto;
}

.modal-cancel-content {
  border-radius: 0;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.modal-cancel-header {
  background: #9F2241;
  color: white;
  border-bottom: none;
  padding: 1.5rem 2rem;
  border-radius: 0;
}

.modal-cancel-title {
  margin: 0;
  font-weight: 400;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.modal-cancel-title i {
  margin-right: 12px;
  font-size: 1.3rem;
}

.modal-cancel-close {
  padding: 0;
  margin: 0;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.8;
}

.modal-cancel-body {
  padding: 3rem 2rem;
  background: white;
  color: #333;
  text-align: center;
}

.modal-cancel-content-body {
  margin-bottom: 2rem;
}

.modal-cancel-question {
  color: #333;
  margin-bottom: 1.5rem;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.4;
}

.modal-cancel-description {
  color: #666;
  margin-bottom: 0;
  line-height: 1.6;
  font-size: 1rem;
}

.modal-cancel-info {
  background: #e8f4fd;
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 2.5rem;
  border-left: 4px solid #17a2b8;
  text-align: left;
}

.modal-cancel-info-content {
  color: #0c5460;
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal-cancel-info-icon {
  margin-right: 8px;
  color: #17a2b8;
  font-size: 1.1rem;
}

.modal-cancel-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-cancel-continue {
  min-width: 160px;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.btn-cancel-continue i {
  margin-right: 8px;
}

.btn-cancel-danger {
  min-width: 160px;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
  border-radius: 4px;
  font-weight: 500;
}

.btn-cancel-danger i {
  margin-right: 8px;
}

/* Estilos para modal de pago */
.modal-payment-dialog {
  max-width: 900px;
}

.iframe-loading-container {
  text-align: center;
  padding: 50px;
}

.iframe-loading-text {
  margin-top: 1rem;
}

.payment-iframe {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  display: none;
}

.iframe-timeout-alert h6 {
  margin-bottom: 1rem;
}

.iframe-timeout-alert p {
  margin-bottom: 1rem;
}

.btn-iframe-timeout {
  margin-right: 0.5rem;
}

.btn-iframe-timeout i {
  margin-right: 8px;
}

.btn-iframe-wait i {
  margin-right: 8px;
}

.iframe-error-alert h6 {
  margin-bottom: 1rem;
}

.iframe-error-alert p {
  margin-bottom: 1rem;
}

.btn-iframe-retry i {
  margin-right: 8px;
}

/* Estilos para modal de éxito */
.modal-success-dialog {
  max-width: 800px;
}

.modal-success-body {
  text-align: center;
}

.modal-success-footer {
  justify-content: center;
}

.btn-finish-purchase {
  min-width: 200px;
}

.btn-finish-purchase i {
  margin-right: 8px;
}

/* Estilos para modal de error/fallo */
.modal-failure-dialog {
  max-width: 800px;
}

.modal-failure-body {
  text-align: center;
}

.modal-failure-footer {
  justify-content: center;
}

.btn-retry-payment i {
  margin-right: 8px;
}

.btn-contact-support i {
  margin-right: 8px;
}

/* Estilos para botones de WebSocket */
.btn-websocket-reconnect {
  margin-left: 0.5rem;
}

/* Estilos para detalles de error en modal de error general */
.error-details-content {
  background-color: #f8d7da;
  padding: 1rem;
  border-radius: 4px;
  color: #721c24;
}

.payload-details-content {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 12px;
}

.error-help-info {
  margin-top: 1rem;
}

/* Animaciones para modales */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
    border-radius: .5rem;
}

/* Responsive para toast */
@media (max-width: 576px) {
  .custom-toast {
    min-width: 300px;
    max-width: 350px;
    right: 10px;
    padding: 15px 20px;
    font-size: 14px;
  }
  
  .custom-toast-icon {
    margin-right: 10px;
    font-size: 20px;
  }
}

/* Responsive para modal de cancelación */
@media (max-width: 576px) {
  .modal-cancel-dialog {
    margin: 1rem;
    max-width: none;
  }
  
  .modal-cancel-body {
    padding: 2rem 1.5rem;
  }
  
  .modal-cancel-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-cancel-continue,
  .btn-cancel-danger {
    min-width: auto;
    width: 100%;
  }
}

/* Responsive para modal de pago */
@media (max-width: 576px) {
  .modal-payment-dialog {
    margin: 1rem;
    max-width: none;
  }
  
  .payment-iframe {
    height: 400px;
  }
  
  .iframe-loading-container {
    padding: 30px;
  }
}

/* Responsive para modales de éxito y error */
@media (max-width: 576px) {
  .modal-success-dialog,
  .modal-failure-dialog {
    margin: 1rem;
    max-width: none;
  }
  
  .btn-finish-purchase {
    min-width: auto;
    width: 100%;
  }
  
  .modal-failure-footer {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-failure-footer .btn {
    width: 100%;
  }
}

/* =============================================================================
   ESTILOS ESPECÍFICOS PARA MODAL DE ÉXITO RESPONSIVO Y VISUALIZACIÓN PDF
   ============================================================================= */

/* Modal de éxito personalizado */
.modal-success-custom {
  max-width: 90%;
  margin: 1rem auto;
}

.modal-success-custom.modal-mobile {
  max-width: 95%;
  margin: 0.5rem auto;
  max-height: calc(100vh - 1rem);
}

/* Header del modal de éxito */
.modal-success-header {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-bottom: none;
  padding: 1rem 1.5rem;
  position: relative;
}

.modal-success-header .modal-title {
  font-size: 2rem;
  font-weight: 600;
}

.modal-success-header .close {
  color: white;
  opacity: 0.9;
  font-size: 1.5rem;
  text-shadow: none;
}

.modal-success-header .close:hover {
  opacity: 1;
}

/* Body del modal de éxito */
.modal-success-body-custom {
  padding: 1.5rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

/* Mensaje de éxito */
.success-message-container {
  margin-bottom: 1.5rem;
}

.payment-success-alert {
  border: none;
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  margin-bottom: 0;
  border-radius: 8px;
  padding: 2rem 1rem;
}

.payment-success-icon {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 1rem;
}

.payment-success-title {
  color: #155724;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.payment-success-text {
  color: #155724;
  font-size: 1.3rem;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Contenedor de detalles de pago */
.payment-details-container.desktop-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.payment-details-container.mobile-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Sección de detalles de transacción */
.transaction-details-section {
  flex: 0 0 350px;
  min-width: 0;
}

.transaction-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.transaction-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}

.transaction-header h6 {
  margin: 0;
  color: #495057;
  font-weight: 600;
}

.transaction-body {
  padding: 1rem;
}

.transaction-body p {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.transaction-body p:last-child {
  margin-bottom: 0;
}

.transaction-id,
.transaction-ref {
  font-family: 'Courier New', monospace;
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 1.1em;
  word-break: break-all;
}

/* Sección PDF */
.pdf-section {
  flex: 1;
  min-width: 0;
}

.pdf-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pdf-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}

.pdf-header h6 {
  margin: 0;
  color: #495057;
  font-weight: 600;
}

.pdf-body {
  padding: 1rem;
}

/* Acciones del PDF */
.pdf-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-pdf-action {
  flex: 1;
  min-width: 140px;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-pdf-action i {
  margin-right: 0.5rem;
}

.btn-pdf-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Contenedor de vista previa PDF */
.pdf-preview-container {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

.pdf-loading-indicator {
  text-align: center;
  padding: 2rem;
  background: white;
}

.pdf-loading-indicator .spinner-border {
  width: 2rem;
  height: 2rem;
}

.pdf-loading-indicator p {
  margin-top: 1rem;
  margin-bottom: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Iframe del PDF */
.pdf-iframe {
  width: 100%;
  height: 400px;
  border: none;
  background: white;
}

.pdf-error-container {
  padding: 1rem;
  text-align: center;
}

/* Mensaje PDF para móviles */
.mobile-pdf-message {
  margin-top: 1rem;
}

.mobile-pdf-message .alert {
  border-radius: 8px;
  padding: 1rem;
  margin: 0;
}

.mobile-pdf-message .alert i {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

/* Sección de email (cuando no hay PDF) */
.email-section {
  flex: 1;
  min-width: 0;
}

.email-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: 100%;
}

.email-body {
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.email-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.email-title {
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.email-text {
  color: #6c757d;
  margin: 0;
  font-size: 0.9rem;
}

/* Footer del modal de éxito */
.modal-success-footer-custom {
  padding: 1rem 1.5rem;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
}

.btn-finish-custom {
  min-width: 250px;
  padding: 0.75rem 2rem;
  font-size: 1.8rem;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-finish-custom:hover {
  background: linear-gradient(135deg, #20c997, #28a745);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  color: white;
}

.btn-finish-custom i {
  margin-right: 0.5rem;
}

/* =============================================================================
   ESTILOS RESPONSIVOS ESPECÍFICOS PARA MÓVILES
   ============================================================================= */

/* Pantallas extra pequeñas (móviles en vertical) */
@media (max-width: 575.98px) {
  .modal-success-custom.modal-mobile {
    max-width: 98%;
    margin: 0.25rem auto;
    max-height: calc(100vh - 0.5rem);
  }
  
  .modal-success-header {
    padding: 0.75rem 1rem;
  }
  
  .modal-success-header .modal-title {
    font-size: 1rem;
  }
  
  .modal-success-body-custom {
    padding: 1rem;
    max-height: calc(100vh - 150px);
  }
  
  .payment-success-alert {
    padding: 1.5rem 0.75rem;
  }
  
  .payment-success-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }
  
  .payment-success-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .payment-success-text {
    font-size: 1.1rem;
  }
  
  .transaction-details-section {
    flex: none;
  }
  
  .transaction-body {
    padding: 0.75rem;
  }
  
  .pdf-body {
    padding: 0.75rem;
  }
  
  .pdf-actions-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn-pdf-action {
    min-width: auto;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .modal-success-footer-custom {
    padding: 1rem;
  }
  
  .btn-finish-custom {
    min-width: auto;
    width: 100%;
    padding: 0.875rem;

  }
  
  /* Ajustes específicos para el iframe en móviles */
  .pdf-iframe {
    height: 300px;
  }
  
  .email-body {
    padding: 2rem 1rem;
  }
  
  .email-icon {
    font-size: 3rem;
  }
  
  .email-title {
    font-size: 1rem;
  }
  
  .email-text {
    font-size: 0.85rem;
  }
}

/* Pantallas pequeñas (móviles en horizontal y tablets pequeñas) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .modal-success-custom.modal-mobile {
    max-width: 95%;
    margin: 0.5rem auto;
  }
  
  .payment-details-container.mobile-layout {
    gap: 1.25rem;
  }
  
  .pdf-actions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  
  .btn-pdf-action {
    min-width: auto;
  }
  
  .pdf-iframe {
    height: 350px;
  }
}

/* Tablets en vertical */
@media (min-width: 768px) and (max-width: 991.98px) {
  .modal-success-custom {
    max-width: 85%;
  }
  
  .payment-details-container.desktop-layout {
    gap: 1.25rem;
  }
  
  .transaction-details-section {
    flex: 0 0 300px;
  }
  
  .pdf-iframe {
    height: 380px;
  }
}

/* Pantallas grandes */
@media (min-width: 992px) {
  .modal-success-custom {
    max-width: 80%;
  }
  
  .pdf-iframe {
    height: 450px;
  }
}

/* =============================================================================
   MEJORAS PARA LA NOTIFICACIÓN DE DESCARGA EN MÓVILES
   ============================================================================= */

@media (max-width: 575.98px) {
  .download-notification {
    right: 10px !important;
    left: 10px !important;
    bottom: 10px !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
    transform: translateY(100px) !important;
  }
  
  .download-notification.show {
    transform: translateY(0) !important;
  }
}

/* =============================================================================
   ANIMACIONES MEJORADAS
   ============================================================================= */

.modal-success-custom .modal-content {
  animation: modalSuccessSlideIn 0.4s ease-out;
}

@keyframes modalSuccessSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pdf-preview-container {
  transition: all 0.3s ease;
}

.btn-pdf-action {
  transition: all 0.2s ease;
}

.btn-pdf-action:active {
  transform: translateY(1px);
}

/* =============================================================================
   MEJORAS PARA LA ACCESIBILIDAD
   ============================================================================= */

.modal-success-custom .close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.btn-pdf-action:focus,
.btn-finish-custom:focus {
  outline: 2px solid rgba(40, 167, 69, 0.5);
  outline-offset: 2px;
}

/* Reducir animaciones para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .modal-success-custom .modal-content {
    animation: none;
  }
  
  .btn-pdf-action,
  .btn-finish-custom {
    transition: none;
  }
  
  .btn-pdf-action:hover,
  .btn-finish-custom:hover {
    transform: none;
  }
}