.fancy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-fancy);
  animation: fadeIn 0.3s ease-in-out;
  padding: 20px;
  overflow-y: auto;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: fit-content;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  animation: slideDown 0.4s ease-out;
  position: relative;
  display: flex;
  flex-direction: column;
  margin-right: auto;
  margin-left: auto;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  text-align: center;
  border-radius: 16px 16px 0 0;
}

.modal-header .modal-title {
  margin-top: 0px;
  margin-bottom: 0;
  color: var(--cor0);
  font-size: 20px;
  line-height: 18px;
  width: 100%;
  font-weight: bold;
}

.modal-header img {
  max-width: 180px;
  height: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 10px;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(100vh - 300px);
}

.modal-body>div {
  color: #333;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border: 2px solid #667eea;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-top: 15px;
  text-align: center;
}

.modal-link:hover {
  background: #667eea;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-aceitar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  width: 100%;
  max-width: 300px;
}

.btn-aceitar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-aceitar:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .fancy-overlay {
    padding: 10px;
  }

  .modal {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 12px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header img {
    max-width: 140px;
  }

  .modal-body {
    padding: 20px;
    max-height: calc(100vh - 250px);
  }

  .modal-body>div {
    font-size: 14px;
  }

  .btn-aceitar {
    padding: 12px 30px;
    font-size: 15px;
  }

  .modal-link {
    font-size: 13px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .modal-header {
    padding: 15px;
  }

  .modal-header img {
    max-width: 120px;
  }

  .modal-body {
    padding: 15px;
  }

}