/* Payment Modal Styles - Minimalist */
.payment-modal .modal-dialog {
  max-width: 650px;
}

/* Promo Code Styles */
#promo_code_section {
  margin-bottom: 1.5rem;
}

#promo_code_section .card {
  border: 1px solid #17a2b8;
}

#promo_code_section .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #17a2b8;
}

.price-breakdown {
  font-size: 0.9rem;
}

.price-breakdown div {
  margin-bottom: 0.25rem;
}

.formation-price {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

#promo_result .alert {
  margin-bottom: 0;
}

#validate_promo_btn {
  white-space: nowrap;
}

/* Loading state for promo validation */
#validate-promo-btn:disabled {
  opacity: 0.6;
}

/* Promo section in payment modal */
#promo-section .card {
  border-color: #17a2b8;
}

#promo-section .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #17a2b8;
}

#promo-section .price-breakdown {
  font-size: 0.9rem;
}

#promo-section .price-breakdown div {
  margin-bottom: 0.25rem;
}

#promo-section .price-breakdown hr {
  margin: 0.5rem 0;
}

#promo-section #promo-result .alert {
  margin-bottom: 0;
}

#promo-section #remove-promo-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.payment-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 20px;
  position: relative;
}

.payment-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.payment-card.primary {
  /* background: #007bff; */
  border-color: #007bff;
}

.payment-card.mobile {
  background: #ffffff;
  color: #495057;
  border-color: #dee2e6;
}

.payment-card.mobile:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.payment-card.disabled {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.6;
}

.payment-card.disabled:hover {
  border-color: #e9ecef;
  box-shadow: none;
}

.payment-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 20px;
  background: #f8f9fa;
  color: #495057;
  min-width: 40px;
  min-height: 40px;
}

.payment-icon img {
  border-radius: 4px;
  max-width: 100%;
  max-height: 100%;
}

.payment-card.primary .payment-icon {
  background: rgb(2 88 255 / 20%);
  color: #183b92;
}

.payment-details h6 {
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 1rem;
}

.payment-details small {
  opacity: 0.8;
  font-size: 0.875rem;
}

.coming-soon {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #ffc107;
  color: #212529;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.defer-payment {
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-weight: 500;
}

.defer-payment:hover {
  background: #5a6268;
  color: white;
}

.defer-payment:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

.security-badge {
  display: inline-flex;
  align-items: center;
  background: rgb(0 24 255 / 65%);
  padding: 2px 6px;
  color: white;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 8px;
}

.security-badge i {
  margin-right: 3px;
}

/* Styles pour les opérateurs dynamiques Clapay */
.operator-card {
  transition: all 0.3s ease;
  position: relative;
}

.operator-card.selected {
  border-color: #28a745 !important;
  background-color: #f8fff9;
  box-shadow: 0 3px 12px rgba(40, 167, 69, 0.2);
}

.operator-card.selected::after {
  content: "✓";
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: bold;
  position: absolute;
  top: 5px;
  right: 5px;
  color: #28a745;
  font-size: 14px;
  background: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #28a745;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.operator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-money-modal .modal-dialog.modal-lg {
  max-width: 800px;
}

.payment-card.legacy {
  opacity: 0.8;
  font-size: 0.9em;
}

.payment-card.legacy:hover {
  opacity: 1;
}

/* Styles pour le badge "Nouveau" */
.badge.bg-success {
  background-color: #28a745 !important;
}

/* Styles pour les drapeaux dans le sélecteur */
select option {
  font-size: 14px;
}

/* Animation pour le chargement */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.loading-operators {
  animation: pulse 1.5s infinite;
}

/* Styles pour les détails dépliables */
details summary {
  list-style: none;
  outline: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details[open] summary i.fa-caret-right {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

details summary i.fa-caret-right {
  transition: transform 0.2s ease;
}

/* Styles pour l'information de détection d'opérateur */
#operatorDetection.alert-secondary {
  background-color: #e2e3e5;
  border-color: #d3d6db;
  color: #383d41;
}

#paymentInfo.alert-success {
  background-color: #d1eddb;
  border-color: #c3e6cb;
  color: #155724;
}

/* Responsive */
@media (max-width: 768px) {
  .payment-modal .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .payment-card {
    padding: 16px;
    margin-bottom: 10px;
  }

  .payment-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
    margin-right: 12px;
  }

  .coming-soon {
    top: 8px;
    right: 10px;
    padding: 2px 6px;
    font-size: 9px;
  }

  .mobile-money-modal .modal-dialog.modal-lg {
    max-width: 95%;
    margin: 10px auto;
  }

  .operator-card {
    margin-bottom: 10px;
  }

  .payment-card.mobile {
    padding: 15px;
  }
}
