﻿.notifications-container {
  position: fixed;
  left: 0;
  right: 0;
  top: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  max-width: 100vw;
  pointer-events: none;
}

.notification {
  pointer-events: all;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: calc(100vw - 24px);
  max-width: 360px;
  padding: 12px 36px 0 14px;
  border-radius: 14px;
  background: #fff;
  color: #222;
  font-family: inherit;
  font-size: 0.875rem;
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  border-bottom: 3px solid #e5e7eb;
  overflow: hidden;
  animation: slideInUp 0.28s cubic-bezier(.4,2,.6,1) both;
  transition: box-shadow 0.2s, border-color 0.2s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.notification--exit {
  animation: slideOutUp 0.22s cubic-bezier(.4,0,.6,1) both;
  pointer-events: none;
}

.notification__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 8px 0;
}

.notification__icon.modern {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  box-shadow: none;
}

.notification__title {
  font-weight: 700;
  font-size: 0.97em;
  color: #181818;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
}

.notification__message {
  color: #555;
  font-size: 0.88em;
  font-weight: 400;
  text-align: left;
  padding: 0 0 10px 0;
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.4;
  box-sizing: border-box;
  white-space: normal;
}

.notification__action {
  display: inline-block;
  align-self: flex-start;
  background: #fff;
  color: #222;
  border: 1.5px solid #d1d5db;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.85em;
  padding: 5px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, border 0.18s;
  letter-spacing: 0.01em;
}

.notification__action:hover,
.notification__action:focus {
  background: #f3f4f6;
  border: 1.5px solid #bdbdbd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  outline: none;
}

.notification__info {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: calc(100% + 14px + 36px);
  margin-left: -14px;
  background: #f9f9fa;
  color: #888;
  font-size: 0.82em;
  font-weight: 400;
  padding: 8px 14px;
  border-top: 1.5px solid #ececec;
  border-radius: 0 0 14px 14px;
  box-sizing: border-box;
  line-height: 1.4;
}

.notification__info span {
  flex: 1 1 auto;
  min-width: 0;
}

.notification__info b {
  color: #181818;
  font-weight: 800;
}

.notification__keep {
  flex-shrink: 0;
  display: inline-block;
  background: #ededed;
  color: #222;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.93em;
  padding: 4px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border 0.15s;
  box-shadow: none;
  white-space: nowrap;
}

.notification__keep:hover,
.notification__keep:focus,
.notification__keep:active {
  background: #222;
  color: #fff;
  border: 1px solid #222;
  outline: none;
}

.notification__close,
.notification__collapse {
  position: absolute;
  top: 10px;
  background: none;
  border: none;
  color: #aaa;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 2;
}

.notification__close {
  right: 10px;
}

.notification__collapse {
  right: 34px;
}

.notification__close:hover,
.notification__collapse:hover {
  opacity: 1;
}

.notification__close svg,
.notification__collapse svg {
  width: 16px;
  height: 16px;
  display: block;
}

.notification__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: #e0e7ef;
  border-radius: 0 0 18px 18px;
  transition: width 0.2s linear;
  z-index: 1;
}

.notification.collapsed .notification__message,
.notification.collapsed .notification__action,
.notification.collapsed .notification__info {
  display: none;
}

.notification.collapsed {
  padding-bottom: 18px;
}

.notification--success { border-bottom-color: #22c55e; }
.notification--error   { border-bottom-color: #ef4444; }
.notification--danger  { border-bottom-color: #ef4444; }
.notification--warning { border-bottom-color: #eab308; }
.notification--info    { border-bottom-color: #3b82f6; }

.notification--success .notification__progress { background: #22c55e; }
.notification--error   .notification__progress { background: #ef4444; }
.notification--danger  .notification__progress { background: #ef4444; }
.notification--warning .notification__progress { background: #eab308; }
.notification--info    .notification__progress { background: #3b82f6; }

@media (min-width: 600px) {
  .notifications-container {
    max-width: 420px;
    left: 50%;
    right: auto;
    top: 16px;
    transform: translateX(-50%);
    padding: 0;
    gap: 10px;
  }

  .notification {
    width: 100%;
    max-width: 400px;
    padding: 12px 38px 0 16px;
    border-radius: 16px;
    font-size: 0.9rem;
  }

  .notification__icon.modern {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }

  .notification__title {
    font-size: 0.97em;
  }

  .notification__info {
    width: calc(100% + 16px + 38px);
    margin-left: -16px;
    padding: 8px 16px;
    font-size: 0.85em;
    border-radius: 0 0 16px 16px;
  }

  .notification__close {
    right: 10px;
    top: 10px;
  }

  .notification__collapse {
    right: 34px;
    top: 10px;
  }
}

@media (min-width: 1025px) {
  .notifications-container {
    top: 30px;
    right: 30px;
    bottom: auto;
    left: auto;
    transform: none;
    flex-direction: column;
    align-items: flex-end;
    max-width: none;
    padding: 0;
    gap: 16px;
  }

  .notification {
    width: auto;
    min-width: 300px;
    max-width: 400px;
    padding: 14px 40px 0 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    animation-name: slideInRight;
  }

  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(30px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideOutRight {
    from {
      opacity: 1;
      transform: translateX(0);
    }

    to {
      opacity: 0;
      transform: translateX(30px);
    }
  }

  .notification--exit {
    animation-name: slideOutRight;
  }

  .notification__icon.modern {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }

  .notification__title {
    font-size: 0.97em;
  }

  .notification__message {
    font-size: 0.88em;
    padding: 0 0 10px 0;
  }

  .notification__action {
    font-size: 0.85em;
    padding: 5px 16px;
    border-radius: 9px;
    margin-bottom: 10px;
  }

  .notification__info {
    width: calc(100% + 18px + 40px);
    margin-left: -18px;
    padding: 8px 18px;
    font-size: 0.82em;
    border-radius: 0 0 18px 18px;
  }

  .notification__keep {
    font-size: 0.82em;
    padding: 3px 12px;
    border-radius: 7px;
  }

  .notification__close {
    right: 12px;
    top: 12px;
  }

  .notification__collapse {
    right: 36px;
    top: 12px;
  }

  .notification__close svg,
  .notification__collapse svg {
    width: 16px;
    height: 16px;
  }
}
