/* Estilos melhorados para modais - Aplicável em todo o sistema */

/* Adicione a classe 'modal-melhorado' a qualquer modal para aplicar este estilo */

.modal-melhorado .modal-dialog {
  max-width: 700px;
  margin: 60px auto;
  width: 90%;
}

@media (max-width: 767px) {
  .modal-melhorado .modal-dialog {
    margin: 20px auto;
    width: 95%;
    max-width: none;
  }
}

.modal-melhorado.modal-lg .modal-dialog {
  max-width: 900px;
}

.modal-melhorado .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-melhorado .modal-header {
  background: linear-gradient(135deg, #0d7461 0%, #0a5a4d 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  padding: 20px 24px;
  border-bottom: 1px solid #0d7461;
  position: relative;
}

.modal-melhorado .modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.3px;
  padding-right: 30px;
}

@media (max-width: 767px) {
  .modal-melhorado .modal-header {
    padding: 16px 16px;
  }

  .modal-melhorado .modal-title {
    font-size: 15px;
    padding-right: 35px;
  }
}

.modal-melhorado .close {
  color: white;
  opacity: 0.7;
  text-shadow: none;
  font-size: 28px;
  font-weight: 300;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  margin: 0;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.modal-melhorado .close:hover {
  opacity: 1;
  color: white;
}

.modal-melhorado .modal-body {
  padding: 32px 24px;
  line-height: 1.8;
  font-size: 15px;
  color: #2d3748;
}

@media (max-width: 767px) {
  .modal-melhorado .modal-body {
    padding: 20px 16px;
    font-size: 14px;
  }
}

.modal-melhorado .modal-footer {
  border-top: 1px solid #e2e8f0;
  padding: 16px 24px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 767px) {
  .modal-melhorado .modal-footer {
    padding: 12px 16px;
  }
}

/* Estilo para botões no footer */
.modal-melhorado .modal-footer .btn {
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.modal-melhorado .modal-footer .btn-primary,
.modal-melhorado .modal-footer .btn-success {
  background: linear-gradient(135deg, #1a7d5e 0%, #125b47 100%);
  border: none;
}

.modal-melhorado .modal-footer .btn-primary:hover,
.modal-melhorado .modal-footer .btn-success:hover {
  background: linear-gradient(135deg, #125b47 0%, #0d4435 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 125, 94, 0.3);
}

.modal-melhorado .modal-footer .btn-fechar,
.modal-melhorado .modal-footer .btn-default {
  background: white;
  border: 1px solid #cbd5e0;
  color: #4a5568;
}

.modal-melhorado .modal-footer .btn-fechar:hover,
.modal-melhorado .modal-footer .btn-default:hover {
  background: #f7fafc;
  border-color: #a0aec0;
}

/* Estilo para formulários dentro do modal */
.modal-melhorado .form-group label {
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 14px;
}

.modal-melhorado .form-control {
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s;
}

.modal-melhorado .form-control:focus {
  border-color: #1a7d5e;
  box-shadow: 0 0 0 3px rgba(26, 125, 94, 0.1);
  outline: none;
}

.modal-melhorado .required-asterisk {
  color: #e53e3e;
  margin-left: 3px;
}

/* Estilos para metadados (informações do card) */
.modal-melhorado .descricao-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .modal-melhorado .descricao-meta {
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
}

.modal-melhorado .descricao-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-melhorado .descricao-meta-label {
  font-size: 11px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-melhorado .descricao-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.modal-melhorado .descricao-texto {
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.8;
  max-width: 100%;
  color: #2d3748;
  font-size: 15px;
}

@media (max-width: 767px) {
  .modal-melhorado .descricao-texto {
    font-size: 14px;
  }
}

/* Estilos para listas dentro do modal */
.modal-melhorado ul,
.modal-melhorado ol {
  padding-left: 20px;
  margin: 12px 0;
}

.modal-melhorado li {
  margin: 8px 0;
  line-height: 1.6;
}

/* Estilos para tabelas dentro do modal */
.modal-melhorado table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}

.modal-melhorado table th,
.modal-melhorado table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.modal-melhorado table th {
  background: #f7fafc;
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
}

.modal-melhorado table tr:hover {
  background: #f7fafc;
}

/* Estilos para cards/painéis dentro do modal */
.modal-melhorado .info-card {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
}

.modal-melhorado .info-card-title {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 14px;
}

.modal-melhorado .info-card-content {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.6;
}

/* Estilos para alertas/avisos dentro do modal */
.modal-melhorado .alert {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  border-left: 4px solid;
}

.modal-melhorado .alert-info {
  background: #ebf8ff;
  border-left-color: #3182ce;
  color: #2c5282;
}

.modal-melhorado .alert-warning {
  background: #fffaf0;
  border-left-color: #dd6b20;
  color: #7c2d12;
}

.modal-melhorado .alert-success {
  background: #f0fff4;
  border-left-color: #0d7461;
  color: #22543d;
}

.modal-melhorado .alert-danger {
  background: #fff5f5;
  border-left-color: #e53e3e;
  color: #742a2a;
}

/* Animação de entrada suave - compatível com Bootstrap 3 */
.modal-melhorado.fade .modal-dialog {
  transition: all 0.3s ease-out;
}

.modal-melhorado.in .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}
