/* General alert box */
.alert {
  position: relative;
  padding: 14px 18px;
  margin: 12px 0;
  border-radius: 6px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-left: 5px solid;
  animation: fadeIn 0.3s ease-in-out;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Success */
.alert-success {
  background-color: #e6f7ed;
  color: #18794e;
  border-color: #28a745;
}

/* Danger (error) */
.alert-danger {
  background-color: #fdecea;
  color: #b71c1c;
  border-color: #f44336;
}

/* Warning */
.alert-warning {
  background-color: #fff8e1;
  color: #8a6d3b;
  border-color: #ff9800;
}

/* Info */
.alert-info {
  background-color: #e8f4fd;
  color: #0b5394;
  border-color: #17a2b8;
}

/* Close button (×) */
.alert .close {
  position: absolute;
  right: 12px;
  top: 8px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.alert .close:hover {
  transform: scale(1.3);
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast container -- fixed-position, non-blocking replacement for alert().
 * ctToast() (user/assets/js/toast.js) appends .alert boxes here. */
#ct-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 40px);
  pointer-events: none;
}

#ct-toast-container .alert {
  margin: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease;
  cursor: pointer;
  animation: none;
  pointer-events: auto;
}

#ct-toast-container .alert.ct-toast-show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  #ct-toast-container {
    top: 74px;
    left: 20px;
    right: 20px;
    max-width: none;
    width: auto;
  }
}
