/* ============================================================
   MOOD NOTIFY — toast bar, card, bonus sheets
   ============================================================ */

/* —— Bar (низ экрана) —— */
.mood-notify-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px 16px;
}

.mood-notify-bar__ico {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-muted);
}
.mood-notify-bar__ico svg { width: 18px; height: 18px; }

.mood-notify-bar__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mood-notify-bar__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.mood-notify-bar__msg {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.mood-notify-bar--success .mood-notify-bar__ico {
  background: var(--success-dim);
  color: var(--success);
}
.mood-notify-bar--error .mood-notify-bar__ico {
  background: var(--danger-dim);
  color: var(--danger);
}
.mood-notify-bar--warning .mood-notify-bar__ico {
  background: var(--warning-dim);
  color: var(--warning);
}
.mood-notify-bar--theme-light .mood-notify-bar__ico,
.mood-notify-bar--theme-dark .mood-notify-bar__ico {
  background: var(--accent-dim);
  color: var(--accent);
}
.mood-notify-bar--deposit .mood-notify-bar__ico {
  background: var(--success-dim);
  color: var(--success);
}
.mood-notify-bar--withdraw .mood-notify-bar__ico {
  background: var(--accent-2-dim);
  color: var(--accent-2);
}
.mood-notify-bar--shield .mood-notify-bar__ico {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  color: var(--accent);
}
.mood-notify-bar--mail .mood-notify-bar__ico {
  background: var(--surface-2);
  color: var(--accent-2);
}

html[data-theme="light"] .mood-notify-bar--success .mood-notify-bar__ico {
  background: color-mix(in srgb, var(--success) 12%, #fff);
}
html[data-theme="light"] .mood-notify-bar--error .mood-notify-bar__ico {
  background: color-mix(in srgb, var(--danger) 10%, #fff);
}

/* —— Card (сверху справа) — основной toast Mood —— */
.mood-notify-card-stack {
  position: fixed;
  top: calc(var(--header-stack-offset, var(--mood-header-h, 64px)) + 10px);
  right: max(12px, env(safe-area-inset-right, 0));
  z-index: calc(var(--z-toast, 1200) + 50);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.mood-notify-card {
  position: relative;
  width: 100%;
  padding: 14px 44px 14px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px color-mix(in srgb, var(--accent) 6%, transparent) inset;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.mood-notify-card--visible {
  opacity: 1;
  transform: none;
}

.mood-notify-card--success {
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 10%, var(--bg-elevated)), var(--bg-elevated));
}
.mood-notify-card--error {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 10%, var(--bg-elevated)), var(--bg-elevated));
}
.mood-notify-card--warning {
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
}
.mood-notify-card--info {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.mood-notify-card--theme-light,
.mood-notify-card--theme-dark {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg-elevated)), var(--bg-elevated));
}
.mood-notify-card--shield {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border));
}
.mood-notify-card--deposit {
  border-color: color-mix(in srgb, var(--success) 42%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 12%, var(--bg-elevated)), var(--bg-elevated));
}
.mood-notify-card--deposit .mood-notify-card__ico {
  background: var(--success-dim);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 38%, var(--border));
}
.mood-notify-card--withdraw {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.mood-notify-card--withdraw .mood-notify-card__ico {
  background: var(--accent-dim);
  color: var(--accent);
}

.mood-notify-card__copy { min-width: 0; }
.mood-notify-card__title {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.mood-notify-card--deposit .mood-notify-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}
.mood-notify-card__msg {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.mood-notify-card__body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mood-notify-card__ico {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.mood-notify-card__ico svg { width: 22px; height: 22px; }

.mood-notify-card--success .mood-notify-card__ico {
  background: var(--success-dim);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
}
.mood-notify-card--error .mood-notify-card__ico {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
}
.mood-notify-card--warning .mood-notify-card__ico {
  background: var(--warning-dim);
  color: var(--warning);
}
.mood-notify-card--info .mood-notify-card__ico {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.mood-notify-card--theme-light .mood-notify-card__ico,
.mood-notify-card--theme-dark .mood-notify-card__ico {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.mood-notify-card--shield .mood-notify-card__ico {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  color: var(--accent);
}

.mood-notify-card__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.mood-notify-card__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

html[data-theme="light"] .mood-notify-card {
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
}

/* Нижний toast-container — legacy fallback, скрыт когда mood-notify активен */
body.mood-layout-v2 #toastContainer:empty {
  display: none;
}

@media (max-width: 1023px) {
  .mood-notify-card-stack {
    top: calc(var(--header-stack-offset, var(--mood-header-h)) + 8px);
    right: max(8px, env(safe-area-inset-right, 0));
    width: min(340px, calc(100vw - 16px));
  }
}

/* —— Bonus toast sheet (модалки бонусов / 2FA) —— */
.bonus-toast-sheet {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 20);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
}
.bonus-toast-sheet--visible {
  opacity: 1;
  pointer-events: auto;
}
.bonus-toast-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 10, 18, 0.55);
  cursor: pointer;
  pointer-events: auto;
}
html[data-theme="light"] .bonus-toast-sheet__backdrop {
  background: rgba(16, 24, 40, 0.35);
}

.bonus-toast-sheet__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
  pointer-events: auto;
  transform: translateY(16px);
  transition: transform 0.32s var(--ease-out);
}
.bonus-toast-sheet--visible .bonus-toast-sheet__card {
  transform: none;
}

.bonus-toast-sheet--success .bonus-toast-sheet__card {
  background: color-mix(in srgb, var(--success) 8%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--success) 28%, var(--border));
  text-align: center;
  font-weight: 600;
  padding: 14px 20px;
}

.bonus-toast-sheet--error .bonus-toast-sheet__card {
  background: color-mix(in srgb, var(--danger) 8%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}

.bonus-toast-sheet__dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.bonus-toast-sheet__dismiss:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.bonus-toast-sheet--rich-modal {
  align-items: center;
  padding: 20px;
}
.bonus-toast-sheet--rich-modal .bonus-toast-sheet__card {
  max-width: 440px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.bonus-toast-sheet__rich { padding: 0; }

.bonus-toast-sheet__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent));
}
.bonus-toast-sheet__hero--success {
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 14%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
}
.bonus-toast-sheet__hero-ring {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: var(--shadow-sm);
}
.bonus-toast-sheet__hero-icon svg { width: 26px; height: 26px; color: var(--accent); }
.bonus-toast-sheet__hero-main { min-width: 0; }
.bonus-toast-sheet__kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.bonus-toast-sheet__name {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.bonus-toast-sheet__subkicker {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.bonus-toast-sheet__details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}
.bonus-toast-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
}
.bonus-toast-detail__icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
}
.bonus-toast-detail__icon svg { width: 16px; height: 16px; }
.bonus-toast-detail__body { min-width: 0; }
.bonus-toast-detail__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.bonus-toast-detail__value {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  color: var(--text);
}
.bonus-toast-sheet__muted {
  font-weight: 500;
  color: var(--text-muted);
}

.bonus-toast-sheet__cta {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--grad-warm, linear-gradient(135deg, #ffa325, #f3536b));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-out), filter var(--dur-2) var(--ease-out);
}
.bonus-toast-sheet__cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.bonus-toast-sheet__cta--blue {
  background: var(--accent);
  color: var(--btn-primary-text, #fff);
}

.bonus-toast-sheet__card--notice {
  padding: 22px 20px 20px;
  max-width: 400px;
}
.bonus-toast-sheet__card--notice--error {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
}
.bonus-toast-sheet__notice-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.bonus-toast-sheet__notice-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.bonus-toast-sheet--notice-mobile {
  align-items: flex-end;
}
@media (min-width: 769px) {
  .bonus-toast-sheet--notice-mobile {
    align-items: center;
  }
}

html[data-theme="light"] .bonus-toast-sheet__card {
  background: #fff;
  border-color: rgba(16, 24, 40, 0.1);
  box-shadow: 0 20px 48px rgba(16, 24, 40, 0.14);
}
html[data-theme="light"] .bonus-toast-sheet__hero {
  background: linear-gradient(135deg, rgba(68, 235, 213, 0.12), rgba(255, 163, 37, 0.1));
}

@media (max-width: 1023px) {
  .bonus-toast-sheet {
    padding-bottom: calc(var(--mood-dock-offset, 72px) + 12px);
  }
}
