/* ============================================================
   MOOD NOTIFY v2 — white paper toasts + notice sheets
   ============================================================ */

.mood-notify-card-stack,
.mood-notify-card,
.mood-notify-card *,
.mood-notify-sheet,
.mood-notify-sheet * {
  box-sizing: border-box;
}

.mood-notify-card-stack {
  --mn-paper: #ffffff;
  --mn-ink: #101828;
  --mn-ink-2: #4b5565;
  --mn-line: rgba(16, 24, 40, 0.08);
  --mn-success: #0e9f6e;
  --mn-error: #e2415c;
  --mn-warning: #d97706;
  --mn-info: #0d9488;
  position: fixed;
  top: calc(var(--header-stack-offset, var(--mood-header-h, 64px)) + 10px);
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: calc(var(--z-toast, 1200) + 50);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.mood-notify-card {
  --mn-tone: #0d9488;
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  column-gap: 12px;
  align-items: start;
  width: 100%;
  min-height: 69px;
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.04);
  color: #101828;
  font-family: Inter, var(--font), system-ui, sans-serif;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(18px) translateY(-4px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.mood-notify-card--visible {
  opacity: 1;
  transform: none;
}

.mood-notify-card--success,
.mood-notify-card--deposit { --mn-tone: #0e9f6e; }
.mood-notify-card--error { --mn-tone: #e2415c; }
.mood-notify-card--warning { --mn-tone: #d97706; }
.mood-notify-card--info { --mn-tone: #0d9488; }
.mood-notify-card--withdraw { --mn-tone: #2563eb; }
.mood-notify-card--bonus { --mn-tone: #e2415c; }
.mood-notify-card--shield,
.mood-notify-card--theme-light,
.mood-notify-card--theme-dark { --mn-tone: #6366f1; }
.mood-notify-card--mail { --mn-tone: #d97706; }

.mood-notify-card__ico {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--mn-tone);
  flex-shrink: 0;
}
.mood-notify-card__ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.mood-notify-card__copy { min-width: 0; }

.mood-notify-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 20px;
  color: #101828;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mood-notify-card--deposit .mood-notify-card__title {
  font-variant-numeric: tabular-nums;
  color: #0e9f6e;
}

.mood-notify-card__msg {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: #4b5565;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mood-notify-card__close {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #98a2b3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.mood-notify-card__close:hover {
  background: #f2f4f7;
  color: #101828;
}
.mood-notify-card__close svg {
  width: 12px;
  height: 12px;
  display: block;
}

.mood-notify-card--bump { animation: mn-bump 0.28s ease; }
@keyframes mn-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

body.mood-layout-v2 #toastContainer:empty { display: none; }

@media (max-width: 768px) {
  .mood-notify-card-stack {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: calc(var(--mood-dock-offset, 76px) + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
  .mood-notify-card { transform: translateY(12px); }
  .mood-notify-card--visible { transform: none; }
}

/* —— Notice sheet —— */
.mood-notify-sheet {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal, 1300) + 40);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.mood-notify-sheet--visible {
  opacity: 1;
  pointer-events: auto;
}

.mood-notify-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 10, 18, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.mood-notify-sheet__card {
  --mn-tone: #0d9488;
  --mn-soft: #e6f6f4;
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  max-width: 100%;
  min-width: 0;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 56px rgba(16, 24, 40, 0.22);
  font-family: Inter, var(--font), system-ui, sans-serif;
  color: #101828;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}
.mood-notify-sheet--visible .mood-notify-sheet__card { transform: none; }
.mood-notify-sheet__card--wide { width: min(440px, 100%); }

.mood-notify-sheet--success .mood-notify-sheet__card { --mn-tone: #0e9f6e; --mn-soft: #e7f7f0; }
.mood-notify-sheet--error .mood-notify-sheet__card { --mn-tone: #e2415c; --mn-soft: #fdecef; }
.mood-notify-sheet--warning .mood-notify-sheet__card { --mn-tone: #d97706; --mn-soft: #fef4e6; }
.mood-notify-sheet--danger .mood-notify-sheet__card { --mn-tone: #e2415c; --mn-soft: #fdecef; }
.mood-notify-sheet--withdraw .mood-notify-sheet__card { --mn-tone: #2563eb; --mn-soft: #eaf0fe; }
.mood-notify-sheet--wallet .mood-notify-sheet__card { --mn-tone: #2563eb; --mn-soft: #eaf0fe; }
.mood-notify-sheet--bonus .mood-notify-sheet__card { --mn-tone: #e2415c; --mn-soft: #fff1f3; }

.mood-notify-sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f4f5f7;
  color: #667085;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mood-notify-sheet__close:hover { background: #e8eaef; color: #101828; }

.mood-notify-sheet__ico {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mn-soft);
  color: var(--mn-tone);
  margin-bottom: 14px;
}
.mood-notify-sheet__ico svg { width: 24px; height: 24px; }

.mood-notify-sheet__kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mn-tone);
  white-space: nowrap;
}

.mood-notify-sheet__title {
  margin: 0;
  font-family: var(--font-display), Inter, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #101828;
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
}

.mood-notify-sheet__amount {
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: #0e9f6e;
}

.mood-notify-sheet__body {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: #4b5565;
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
}
.mood-notify-sheet__body p { margin: 0; }
.mood-notify-sheet__body p + p { margin-top: 8px; }
.mood-notify-sheet__body strong { color: #101828; font-weight: 700; }

.mood-notify-sheet__actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.mood-notify-sheet__btn {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
  white-space: nowrap;
}
.mood-notify-sheet__btn--primary {
  background: linear-gradient(135deg, #ffa325 0%, #f3536b 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(243, 83, 107, 0.28);
}
.mood-notify-sheet__btn--ghost { background: #f4f5f7; color: #101828; }
.mood-notify-sheet__btn--danger {
  background: #e2415c;
  color: #fff;
  box-shadow: 0 8px 18px rgba(226, 65, 92, 0.28);
}

@media (max-width: 768px) {
  .mood-notify-sheet {
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
  }
  .mood-notify-sheet__card {
    width: 100%;
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 12px));
  }
  .mood-notify-sheet__actions { flex-direction: column-reverse; }
  .mood-notify-sheet__btn { width: 100%; }
}

/* leftover bar API — не используется, оставляем нейтральным */
.mood-notify-bar { display: none; }



/* —— 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);
  }
}
