/* ================================
   TOASTR MODERN (STAKE STYLE 2025)
   ================================ */

/* Контейнер */
#toast-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
}

/* Центрируем по центру сверху */
.toast-top-center {
  top: 20px;
  right: 0;
  left: 0;
  margin: 0 auto;
  width: fit-content;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
  .toast-top-center {
    top: 70px;
  }
  #toast-container > div {
    width: 90vw;
  }
}

/* Сами тосты */
#toast-container > div {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;

  margin: 10px auto;
  padding: 16px 24px 16px 60px;
  min-width: 260px;
  max-width: 420px;

  border-radius: 16px;
  border-left: 4px solid #8b5cf6;
  background: #090b22;
  color: #fff;
  font-family: 'Inter', sans-serif;
  text-align: left;

  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Hover */
#toast-container > div:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

/* Типы */
.toast-success { border-left-color: #22c55e; }
.toast-error   { border-left-color: #ef4444; }
.toast-info    { border-left-color: #3b82f6; }
.toast-warning { border-left-color: #facc15; }

/* Текст */
.toast-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.toast-message {
  font-size: 14px;
  color: #cbd5e1;
  opacity: 0.95;
  line-height: 1.4;
}

/* Убираем дефолтные base64 иконки toastr */
.toast-success,
.toast-error,
.toast-info,
.toast-warning {
  background-image: none !important;
}

/* Иконки слева */
#toast-container > div::before {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 8px rgba(255,255,255,0.12);
}

/* Символы по типам */
.toast-success::before { content: "✓"; color: #22c55e; text-shadow: 0 0 6px rgba(34,197,94,0.5); }
.toast-error::before   { content: "✖"; color: #ef4444; text-shadow: 0 0 6px rgba(239,68,68,0.5); }
.toast-warning::before { content: "⚠"; color: #facc15; text-shadow: 0 0 6px rgba(250,204,21,0.5); }
.toast-info::before    { content: "ℹ"; color: #3b82f6; text-shadow: 0 0 6px rgba(59,130,246,0.5); }

/* Прогресс-линия */
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee, #22c55e);
  border-radius: 0 0 3px 3px;
  opacity: 0.9;
}


/* ================================
   Принудительное центрирование тостера
   ================================ */

#toast-container {
  top: 20px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  margin: 0 auto !important;
  width: fit-content !important;
  text-align: center !important;
}

/* Мобильные — чуть ниже */
@media (max-width: 480px) {
  #toast-container {
    top: 70px !important;
  }
}




/* === Стандартные цвета для типов уведомлений === */

/* error — красный */
.toast-error {
  border-left-color: #bd362f !important;
}

/* success — зелёный */
.toast-success {
  border-left-color: #51a351 !important;
}

/* info — синий */
.toast-info {
  border-left-color: #2f96b4 !important;
}

/* warning — оранжевый */
.toast-warning {
  border-left-color: #f89406 !important;
}

/* === Прогресс-бар в цвет уведомления === */
.toast-error .toast-progress {
  background: #bd362f !important;
}
.toast-success .toast-progress {
  background: #51a351 !important;
}
.toast-info .toast-progress {
  background: #2f96b4 !important;
}
.toast-warning .toast-progress {
  background: #f89406 !important;
}



/* === Hover-эффекты по типу уведомления === */

/* общий эффект — масштаб */
#toast-container > div:hover {
  transform: scale(1.02);
  box-shadow: none;
}

/* success — зелёный */
.toast-success:hover {
  box-shadow: 0 0 20px rgba(81, 163, 81, 0.5);
}

/* error — красный */
.toast-error:hover {
  box-shadow: 0 0 20px rgba(189, 54, 47, 0.5);
}

/* info — синий */
.toast-info:hover {
  box-shadow: 0 0 20px rgba(47, 150, 180, 0.5);
}

/* warning — оранжевый */
.toast-warning:hover {
  box-shadow: 0 0 20px rgba(248, 148, 6, 0.5);
}

