/* ═══════════════════════════════════════
   CLEN | كلن — Toast Component
   ═══════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  bottom: auto;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
  max-width: var(--max-width);
  margin-inline: auto;
  /* Keep toasts above booking footer / Moyasar form */
  align-items: stretch;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-inline-start: 3px solid var(--color-primary);
  pointer-events: auto;
  animation: toast-in var(--transition-base) ease forwards;
}

.toast--success {
  border-inline-start-color: var(--color-success);
}

.toast--error {
  border-inline-start-color: var(--color-error);
}

.toast--warning {
  border-inline-start-color: var(--color-warning);
}

.toast--info {
  border-inline-start-color: var(--color-info);
}

.toast__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.toast--success .toast__icon { color: var(--color-success); }
.toast--error .toast__icon { color: var(--color-error); }
.toast--warning .toast__icon { color: var(--color-warning); }
.toast--info .toast__icon { color: var(--color-info); }

.toast__message {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}

.toast__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.toast__close:hover {
  color: var(--color-text-primary);
}

.toast--out {
  animation: toast-out var(--transition-base) ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}
