/* MODAIS PERSONALIZADOS */
.modal-custom {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.3s;
}

.modal-custom-content {
  position: relative;
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-50px);
  opacity: 0;
  animation: slideDown 0.4s forwards;
}

.modal-custom-header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-custom-header.success {
  background-color: #4CAF50;
  color: white;
}

.modal-custom-header.error {
  background-color: #f44336;
  color: white;
}

.modal-custom-header h5 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-custom-close {
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.modal-custom-close:hover {
  transform: scale(1.2);
}

.modal-custom-body {
  padding: 20px;
  text-align: center;
}

.icon-container {
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
}

.checkmark-circle,
.crossmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: #4CAF50;
  stroke-miterlimit: 10;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.crossmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: #f44336;
  stroke-miterlimit: 10;
}

.crossmark-cross {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.modal-custom-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #eee;
}

.btn-confirm {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.error-modal .btn-confirm {
  background-color: #f44336;
}

.btn-confirm:hover {
  opacity: 0.9;
}

/* overlay inicialmente oculto */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  /* atrás dos modais */
}

/* 
  Quando JS adiciona .modal-visivel, mostra overlay 
  e todo modal-custom que tenha essa classe
*/
.modal-overlay.modal-visivel {
  display: block;
}

.modal-custom {
  display: none;
  /* escondido por padrão */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  /* na frente do overlay */
  /* seu resto de estilo… */
}

.modal-custom.modal-visivel {
  display: block;
}

/* modal aviso */
/* cabeçalho laranja */
.modal-custom-header.warning {
  background-color: #FF9800;
  color: white;
}

/* botão confirma em laranja */
.warning-modal .btn-confirm {
  background-color: #FF9800;
}

/* animar o triângulo, line e ponto */
.warningmark-triangle,
.warningmark-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.warningmark-dot {
  opacity: 0;
  animation: fadeIn 0.3s ease-in 0.6s forwards;
}

/* reaproveita @keyframes stroke e fadeIn já definidos */



/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

/* Responsivo */
@media (max-width: 576px) {
  .modal-custom-content {
    margin: 20% auto;
    width: 95%;
  }
}