/* Уведомления об отправке заявки: стопка карточек в углу экрана, над всеми окнами */
.notice_stack {
  position: fixed;
  z-index: 500;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(400px, calc(100vw - 48px));
  pointer-events: none;
}

.notice {
  --notice-accent: #e2fc04;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 48px 20px 18px;
  overflow: hidden;
  background: #16181a;
  border: 1px solid rgba(140, 140, 140, 0.55);
  border-radius: 15px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  animation: notice-in 0.35s ease both;
}

.notice::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--notice-accent);
}

.notice_error {
  --notice-accent: #ff5a4d;
}

.notice.is_hiding {
  animation: notice-out 0.3s ease both;
}

.notice_icon {
  display: flex;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--notice-accent);
}

.notice_body {
  min-width: 0;
}

.notice_title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.notice_text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: #b4b8bd;
}

.notice_close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: #8c8c8c;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.notice_close::before,
.notice_close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.5px;
  background: currentColor;
  rotate: 45deg;
  translate: -50% -50%;
}

.notice_close::after {
  rotate: -45deg;
}

.notice_close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* полоса внизу карточки убывает за время показа */
.notice_bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--notice-accent);
  opacity: 0.7;
  transform-origin: left;
  animation: notice-bar linear both;
}

.notice:hover .notice_bar {
  animation-play-state: paused;
}

@keyframes notice-in {
  from {
    opacity: 0;
    translate: 0 16px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes notice-out {
  to {
    opacity: 0;
    translate: 0 10px;
  }
}

@keyframes notice-bar {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (max-width: 767px) {
  .notice_stack {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }

  .notice_title {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notice,
  .notice.is_hiding {
    animation: none;
  }

  .notice_bar {
    display: none;
  }
}
