/* MODAL GLOBAL WINPAY - Estilo Moderno e Escuro */

/* Reset e configurações base */
.modal-fade {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1050 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: fadeIn 0.3s ease-out !important;
}

.modal-dialog {
  width: 100% !important;
  max-width: 900px !important;
  margin: 20px !important;
  position: relative !important;
  animation: slideUp 0.3s ease-out !important;
}

.modal-content {
  background: linear-gradient(145deg, #1a1a1a, #111111) !important;
  border: 1px solid rgba(255, 221, 0, 0.3) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 221, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  position: relative !important;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FFDD00, transparent);
  animation: shimmer 2s infinite;
}

/* Header do Modal */
.modal-header {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a) !important;
  padding: 24px 32px !important;
  border-bottom: 1px solid rgba(255, 221, 0, 0.2) !important;
  position: relative !important;
}

.modal-header h4,
.modal-header h5,
.modal-header .modal-title {
  color: #FFDD00 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  font-family: 'Inter', sans-serif !important;
}

.modal-header small {
  color: #aaa !important;
  font-size: 14px !important;
}

/* Botão de fechar */
.close {
  background: none !important;
  border: none !important;
  color: #FFDD00 !important;
  font-size: 24px !important;
  cursor: pointer !important;
  position: absolute !important;
  right: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.3s ease !important;
}

.close:hover {
  background: rgba(255, 221, 0, 0.1) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

/* Body do Modal */
.modal-body {
  background: #111111 !important;
  padding: 32px !important;
  max-height: 70vh !important;
  overflow-y: auto !important;
  color: #f1f1f1 !important;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FFDD00, #D4B800);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #FFE83D, #FFDD00);
}

/* Cards dentro do modal */
.modal-body .card,
.modal-body .card-body {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a) !important;
  border: 1px solid rgba(255, 221, 0, 0.1) !important;
  border-radius: 15px !important;
  padding: 24px !important;
  margin-bottom: 20px !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}

.modal-body .card::before,
.modal-body .card-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 221, 0, 0.3), transparent);
}

/* Títulos dentro do modal */
.modal-body .titulo,
.modal-body h3,
.modal-body h4,
.modal-body h5 {
  color: #FFDD00 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-bottom: 20px !important;
  font-family: 'Inter', sans-serif !important;
  border-bottom: 2px solid rgba(255, 221, 0, 0.2) !important;
  padding-bottom: 8px !important;
}

/* Informações em linhas */
.modal-body .row.borda1,
.modal-body .info-row {
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 221, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.modal-body .row.borda1:hover,
.modal-body .info-row:hover {
  background: rgba(255, 221, 0, 0.05) !important;
  border-radius: 8px !important;
  margin: 0 -12px !important;
  padding: 12px !important;
}

.modal-body .row.borda1:last-child,
.modal-body .info-row:last-child {
  border-bottom: none !important;
}

/* Tabelas dentro do modal */
.modal-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #1a1a1a;
  color: #f1f1f1;
  font-family: 'Inter', sans-serif;
  border: 1px solid rgba(255, 221, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.modal-body thead {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.modal-body thead th {
  padding: 14px 16px;
  text-align: left;
  color: #FFDD00;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 221, 0, 0.1);
  font-size: 14px;
}

.modal-body tbody tr {
  transition: background 0.3s ease;
}

.modal-body tbody tr:hover {
  background: rgba(255, 221, 0, 0.05);
}

.modal-body tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 221, 0, 0.05);
  font-size: 13px;
}

.modal-body tbody tr:last-child td {
  border-bottom: none;
}

/* Formulários dentro do modal */
.modal-body .form-control {
  background: #2a2a2a !important;
  border: 1px solid rgba(255, 221, 0, 0.2) !important;
  color: #f1f1f1 !important;
  border-radius: 8px !important;
}

.modal-body .form-control:focus {
  background: #2a2a2a !important;
  border-color: #FFDD00 !important;
  color: #f1f1f1 !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 221, 0, 0.25) !important;
}

.modal-body label {
  color: #f1f1f1 !important;
  font-weight: 500 !important;
}

/* Links dentro do modal */
.modal-body a {
  color: #FFDD00 !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

.modal-body a:hover {
  color: #FFE83D !important;
  text-decoration: underline !important;
}

/* Footer do Modal */
.modal-footer {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a) !important;
  padding: 20px 32px !important;
  border-top: 1px solid rgba(255, 221, 0, 0.2) !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

/* Botões no modal */
.modal-footer .btn,
.modal-body .btn {
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  border: none !important;
}

.modal-footer .btn-danger,
.modal-body .btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
  color: #fff !important;
}

.modal-footer .btn-danger:hover,
.modal-body .btn-danger:hover {
  background: linear-gradient(135deg, #c82333, #bd2130) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
}

.modal-footer .btn-success,
.modal-body .btn-success {
  background: linear-gradient(135deg, #28a745, #218838) !important;
  color: #fff !important;
}

.modal-footer .btn-success:hover,
.modal-body .btn-success:hover {
  background: linear-gradient(135deg, #218838, #1e7e34) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
}

.modal-footer .btn-warning,
.modal-body .btn-warning {
  background: linear-gradient(135deg, #ffc107, #e0a800) !important;
  color: #000 !important;
}

.modal-footer .btn-warning:hover,
.modal-body .btn-warning:hover {
  background: linear-gradient(135deg, #e0a800, #d39e00) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4) !important;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsivo */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }

  .modal-body {
    padding: 20px !important;
    max-height: 60vh !important;
  }

  .modal-header, .modal-footer {
    padding: 16px 20px !important;
  }
}

/* Garante que o modal abre centralizado na tela */
.modal.show .modal-dialog {
  margin: 0 auto !important;
  align-self: center !important;
}

/* Badges e status */
.modal-body .badge {
  background: linear-gradient(135deg, #FFDD00, #D4B800) !important;
  color: #000 !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
}

/* Texto em negrito */
.modal-body b,
.modal-body strong {
  color: #FFDD00 !important;
  font-weight: 600 !important;
}

/* Imagens dentro do modal */
.modal-body img {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Listas */
.modal-body ul,
.modal-body ol {
  color: #f1f1f1 !important;
}

.modal-body li {
  color: #f1f1f1 !important;
  margin-bottom: 8px !important;
}

/* Texto pequeno */
.modal-body small {
  color: #aaa !important;
}

/* Separadores */
.modal-body hr {
  border-color: rgba(255, 221, 0, 0.2) !important;
  margin: 20px 0 !important;
}
