/* Modern custom alert modal for mobile and desktop */
.custom-alert-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000000;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInAlertBg 0.2s;
}

/* Added styling for alerts */
.alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 10000;
  min-width: 300px;
  max-width: 90%;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert i {
  font-size: 20px;
  flex-shrink: 0;
}

.alert span {
  flex-grow: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.alert button {
  padding: 4px;
  font-size: 18px;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.alert button:hover {
  opacity: 1;
}

@keyframes fadeInAlertBg {
  from { opacity: 0; }
  to { opacity: 1; }
}

.custom-alert-content {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 2rem 1.5rem 1.2rem 1.5rem;
  max-width: 95vw;
  width: 100%;
  max-width: 350px;
  text-align: center;
  position: relative;
  animation: popInAlert 0.25s cubic-bezier(.4,2,.6,1);
}

@keyframes popInAlert {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.custom-alert-icon {
  font-size: 2.5rem;
  margin-bottom: 0.7rem;
  display: block;
  color: #2196f3;
}
.alert-success {
  background: rgba(220, 252, 231, 0.98);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.alert-error {
  background: rgba(254, 226, 226, 0.98);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.alert-info {
  background: rgba(239, 246, 255, 0.98);
  border: 1px solid rgba(33, 150, 243, 0.2);
  color: #1e40af;
}

.alert-warning {
  background: rgba(254, 243, 199, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #9a3412;
}

.alert-success .custom-alert-icon { color: #22c55e; }
.alert-error .custom-alert-icon { color: #ef4444; }
.alert-info .custom-alert-icon { color: #2196f3; }
.alert-warning .custom-alert-icon { color: #f59e0b; }

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-content i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.alert-content span {
  flex-grow: 1;
  font-weight: 500;
}

.custom-alert-message {
  font-size: 1.08rem;
  color: #222;
  margin-bottom: 1.2rem;
  word-break: break-word;
}

.custom-alert-close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}
.custom-alert-close:hover {
  color: #ef4444;
}

@media (max-width: 600px) {
  .custom-alert-content {
    padding: 1.2rem 0.7rem 1rem 0.7rem;
    max-width: 98vw;
    font-size: 0.98rem;
  }
  .custom-alert-icon {
    font-size: 2rem;
  }
}