@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600&display=swap');

.alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  z-index: 9999;
}

.alert-box {
  width: 480px;
  max-width: 100%;
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  text-align: center;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.08);
  animation: modalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.alert-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  position: relative;
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,0.6),
    inset 0 -4px 10px rgba(0,0,0,0.08),
    0 8px 20px rgba(0,0,0,0.08);
  animation: iconPop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.success {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  color: #16a34a;
}

.error {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
}

.warning {
  background: linear-gradient(135deg, #ffedd5, #fff7ed);
  color: #d97706;
}

.info {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #2563eb;
}

@keyframes iconPop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#alert-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111827;
}

#alert-text {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

.alert-buttons {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.alert-buttons button {
  font-family: "Poppins", sans-serif;
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alert-box.success #alert-ok {
  background: #16a34a;
  color: white;
}

.alert-box.error #alert-ok {
  background: #dc2626;
  color: white;
}

.alert-box.info #alert-ok {
  background: #2563eb;
  color: white;
}

.alert-box.warning #alert-ok {
  background: #d97706;
  color: white;
}

#alert-cancel {
  background: #eef0f3;
  color: #374151;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

button:active {
  transform: scale(0.96);
}

@media (max-width: 480px) {
  .alert-box {
    padding: 24px;
    border-radius: 18px;
  }

  #alert-title {
    font-size: 18px;
  }

  #alert-text {
    font-size: 14px;
  }

  .alert-buttons {
    flex-direction: column;
  }

  .alert-buttons button {
    width: 100%;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hidden {
  display: none !important;
}

.alert-overlay.closing .alert-box {
  animation: modalOut 0.2s ease forwards;
}

.alert-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.alert-input {
  width: 100%;
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
}

.alert-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  filter: grayscale(0.3);
}
