/* Glorion Outsingoula Oumona */
:root {
  --color-primary: #014421;
  --color-danger: #ef4444;
  --color-success: #41f1b6;
  --color-warning: #D4AF37;
  --color-white: #fff;
  --color-info-dark: #3b8483;
  --color-info-light: #dce1eb;
  --color-dark: #0A0A0A;
  --color-light: rgba(1, 68, 33, 0.1);
  --color-primary-variant: #016A33;
  --color-dark-variant: #677483;
  --color-background: #f6f6f9;

  /* Alert Colors */
  --color-success-dark: #1e7e34;
  --color-success-light: #d4edda;
  --color-danger-dark: #721c24;
  --color-danger-light: #f8d7da;
  --color-warning-dark: #856404;
  --color-warning-light: #fff3cd;

  --card-border-radius: 2rem;
  --border-radius-1: 1rem;
  --border-radius-2: 0.8rem;
  --border-radius-3: 1.2rem;

  --card-padding: 1.8rem;
  --padding-1: 1.2rem;

  --box-shadow: 0 2rem 3rem var(--color-light);
}

/* =================================================================== */
/* TOAST NOTIFICATION STYLES */
/* =================================================================== */
#toast-container {
  position: fixed;
  top: 1.8rem;
  right: 8rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: max-content;
  max-width: 92vw;
  align-items: flex-end;
}

/* Toasts size to their message - never wrap to a second line; an overly
   long message is ellipsized rather than pushing the toast off-screen. */
.toast {
  width: max-content;
  min-width: 280px;
  max-width: 92vw;
  min-height: 65px;
  background-color: var(--color-white);
  padding: 1.2rem 1.5rem;
  border-radius: var(--border-radius-2);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 5px solid;
  animation: slideInLeft 0.5s ease forwards;
  opacity: 0;
  font-family: 'Inter', sans-serif;
}

@keyframes slideInLeft {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.fade-out {
  animation: slideOutRight 0.5s ease forwards;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--color-dark-variant);
  white-space: nowrap;
}

.toast-message p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-message strong {
  color: var(--color-dark);
  font-weight: 600;
}

/* Sticky toasts (e.g. the maintenance notice) carry longer messages -
   let them wrap instead of truncating with an ellipsis. The maintenance
   toast is pulled out of the top-right stack into its own spot: a wide
   bottom banner, ~80% of the page width, that slides up on show. */
.toast--maintenance {
  position: fixed;
  left: 10vw;
  bottom: 1.5rem;
  width: 80vw;
  max-width: none;
  transform: translateY(150%);
}
.toast--maintenance.show {
  transform: translateY(0);
}
.toast--maintenance.fade-out {
  transform: translateY(150%);
}
.toast--maintenance .toast-message,
.toast--maintenance .toast-message p {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.toast-close {
  font-size: 1.5rem;
  color: var(--color-dark-variant);
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  transition: color 0.3s ease;
}

.toast-close:hover {
  color: var(--color-dark);
}

/* Toast Colors */
.toast.success {
  border-left-color: var(--color-success);
}
.toast.success .toast-icon {
  color: var(--color-success);
}

.toast.danger {
  border-left-color: var(--color-danger);
}
.toast.danger .toast-icon {
  color: var(--color-danger);
}

.toast.warning {
  border-left-color: var(--color-warning);
}
.toast.warning .toast-icon {
  color: var(--color-warning);
}

.toast.info {
  border-left-color: var(--color-info-dark);
}
.toast.info .toast-icon {
  color: var(--color-info-dark);
}
