/* modal.css */

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  animation: fadeIn 0.3s ease;
}

.modal-box {
  background: #fff;
  padding: 30px 25px;
  border-radius: 15px;
  text-align: center;
  width: 90%; max-width: 400px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.25s ease;
}

.modal-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 40px;
  margin: 0 auto 20px;
  color: #fff;
}

.modal-icon.success {
  background: #28a745;
  content: "✔";
}
.modal-icon.success::before {
  content: "✔";
}

.modal-icon.error {
  background: #dc3545;
}
.modal-icon.error::before {
  content: "✖";
  font-size: 38px;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.modal-message {
  font-size: 17px;
  margin-bottom: 25px;
  color: #555;
}

.modal-button {
  padding: 12px 25px;
  background-color: #3085d6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.modal-button:hover {
  background-color: #2563eb;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .modal-box {
    width: 95%;          /* más ancho */
    max-width: 95%;      /* ignoramos el límite de 400px */
    padding: 20px 15px;  /* menos padding para no apretar */
    font-size: 1rem;     /* aumentamos la base de texto */
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-message {
    font-size: 16px;
  }

  .modal-button {
    font-size: 16px;
    padding: 14px 28px;
  }
}
