/* Time2Wash custom toasts — mount point #toastContainer (see navebar partial) */

#toastContainer .toast {
  pointer-events: auto;
}

#toastContainer .toast.t2w-toast {
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: translateX(calc(-100% - 24px));
  opacity: 0 !important;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

#toastContainer .toast.t2w-toast.t2w-toast-in {
  transform: translateX(0);
  opacity: 1 !important;
}

#toastContainer .toast.t2w-toast.t2w-toast-leaving {
  transform: translateX(calc(100% + 40px));
  opacity: 0 !important;
  transition: transform 0.34s ease-in, opacity 0.28s ease;
}

#toastContainer .toast.t2w-toast .t2w-toast-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Icon + message row — extra right padding so text does not run under the close control */
#toastContainer .toast.t2w-toast .t2w-toast-card > .t2w-toast-inner.d-flex {
  padding: 12px 38px 10px 14px;
  align-items: flex-start;
}

#toastContainer .toast.t2w-toast .t2w-toast-msg.toast-body {
  padding: 0 8px 0 8px;
  margin: 0;
  color: #5c636a;
  font-size: 0.9375rem;
  line-height: 1.45;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--success {
  background: #22c55e;
  color: #fff;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--success i {
  font-size: 12px;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--error i {
  font-size: 12px;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--warning i {
  font-size: 12px;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--info i {
  font-size: 12px;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--error {
  background: #ef4444;
  color: #fff;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--warning {
  background: #f59e0b;
  color: #fff;
}

#toastContainer .toast.t2w-toast .t2w-toast-icon--info {
  background: #3b82f6;
  color: #fff;
}

/* Close control: top-right of card (explicit × — works on BS4 + BS5) */
#toastContainer .toast.t2w-toast .t2w-toast-close-btn.t2w-toast-close {
  position: absolute;
  top: 0px;
  right: 2px;
  z-index: 2;
  margin: 0;
  padding: 4px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  color: #868e96;
  opacity: 0.9;
  transition: opacity 0.15s ease, color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* Clicking a <button> keeps focus — browser default outline reads as a harsh black box */
#toastContainer .toast.t2w-toast .t2w-toast-close-btn.t2w-toast-close::-moz-focus-inner {
  border: 0;
}

#toastContainer .toast.t2w-toast .t2w-toast-close-btn.t2w-toast-close:focus {
  outline: none;
  box-shadow: none;
}

/* Keyboard users only: soft ring (not the default black square) */
#toastContainer .toast.t2w-toast .t2w-toast-close-btn.t2w-toast-close:focus-visible {
  outline: 2px solid rgba(58, 186, 244, 0.55);
  outline-offset: 2px;
}

#toastContainer .toast.t2w-toast .t2w-toast-close-btn.t2w-toast-close:hover {
  opacity: 1;
  color: #343a40;
}

#toastContainer .toast.t2w-toast .t2w-toast-close-icon {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  vertical-align: middle;
}

#toastContainer .toast.t2w-toast .t2w-toast-progress {
  height: 3px;
  background: #eef1f4;
}

#toastContainer .toast.t2w-toast .t2w-toast-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  animation: t2wToastProgress var(--t2w-toast-dur, 3000ms) linear forwards;
}

#toastContainer .toast.t2w-toast:hover .t2w-toast-progress-bar {
  animation-play-state: paused;
}

#toastContainer .toast.t2w-toast .t2w-toast-progress-bar--success {
  background: #22c55e;
}

#toastContainer .toast.t2w-toast .t2w-toast-progress-bar--error {
  background: #ef4444;
}

#toastContainer .toast.t2w-toast .t2w-toast-progress-bar--warning {
  background: #f59e0b;
}

#toastContainer .toast.t2w-toast .t2w-toast-progress-bar--info {
  background: #3b82f6;
}

@keyframes t2wToastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
