.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.modal-mini {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 30px;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.6) 0px 4px 9px;
  width: 100%;
  max-width: 400px;
}

.modal-mini form {
  display: flex;
  flex-direction: column;
}

.close-modal-mini {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

.close-modal-mini i {
  background-color: transparent;
  border: none;
  font-size: 24px;
  color: #333;
}

.modal-signature {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 30px;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.6) 0px 4px 9px;
  width: fit-content;
  max-width: 500px
}

.modal-tiny {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 10px;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.6) 0px 4px 9px;
  width: 100%;
  max-width: 800px
}

.modal-mini form {
  display: flex;
  flex-direction: column;
}

.close-modal-signature {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

.close-modal-signature i {
  background-color: transparent;
  border: none;
  font-size: 24px;
  color: #333;
}

.tox.tox-tinymce-aux {
  z-index: 10000 !important;
}

.modal-responsavel .modal-content {
  overflow-y: unset;
}

/* Media Queries para dispositivos móveis */
@media (max-width: 768px) {
  .modal-mini {
    width: 80%;
  }

  .modal-signature {
    width: 95%;
  }

  .modal-tiny {
    width: 95%;
  }
}

/* === Visual refresh para alertBox (apenas overlay injetado direto no body) === */
/* Overlay mais suave com blur e animação de entrada */
body > .overlay {
  background: rgba(16, 24, 40, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: overlay-fade-in 160ms ease-out;
}

/* Cartão central com look moderno, canto arredondado e leve animação */
body > .overlay .modal-signature {
  background: #ffffff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.08);
  transform: translate(-50%, -50%) scale(0.98);
  animation: modal-pop-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  text-align: center;
}

/* Texto mais legível e centralizado */
body > .overlay .modal-signature p {
  margin: 6px 0 16px 0;
  color: #344054;
  font-size: 15.5px;
  line-height: 1.45;
}

/* Área de botões: manter sem wrapper dedicado, mas com bom espaçamento/alinhamento */
body > .overlay .modal-signature .alert-confirm-button,
body > .overlay .modal-signature .alert-cancel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 0 6px !important; /* garante override de inline style antigo */
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: var(--box-shadow-minimal, 0 0px 1px 1px #45454517);
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease, color 120ms ease, border-color 120ms ease;
}

/* Confirmar como ação destrutiva destacada */
body > .overlay .modal-signature .alert-confirm-button {
  background: var(--red, #e63241);
  color: #ffffff;
}
body > .overlay .modal-signature .alert-confirm-button:hover {
  background: #cf2a38;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(230, 50, 65, 0.35), var(--box-shadow-minimal, 0 0px 1px 1px #45454517);
}
body > .overlay .modal-signature .alert-confirm-button:active {
  transform: translateY(0);
}

/* Cancelar com estilo discreto */
body > .overlay .modal-signature .alert-cancel-button {
  background: #ffffff;
  color: #344054;
  border-color: #d0d5dd;
}
body > .overlay .modal-signature .alert-cancel-button:hover {
  background: #f9fafb;
  border-color: #c2c8d0;
  transform: translateY(-1px);
}
body > .overlay .modal-signature .alert-cancel-button:active {
  transform: translateY(0);
}

/* Acessibilidade e foco */
body > .overlay .modal-signature .alert-confirm-button:focus,
body > .overlay .modal-signature .alert-cancel-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(4, 76, 141, 0.18), var(--box-shadow-minimal, 0 0px 1px 1px #45454517);
}

/* Animações */
@keyframes overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop-in {
  0% { transform: translate(-50%, calc(-50% - 8px)) scale(0.96); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Responsividade: em telas estreitas, botões empilhados e full-width */
@media (max-width: 420px) {
  body > .overlay .modal-signature {
    padding: 18px 16px;
  }
  body > .overlay .modal-signature .alert-confirm-button,
  body > .overlay .modal-signature .alert-cancel-button {
    width: 100%;
    margin: 6px 0 !important;
  }
}