/* Notification System - Ant Design Style */
.notifications-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  pointer-events: none;
  width: 384px;
  max-width: calc(100vw - 48px);
}

.notification {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--component-background);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color-split);
  pointer-events: all;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  overflow: hidden;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification.hide {
  transform: translateY(100%);
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  max-height: 0;
}

.notification-success {
  border-left: 4px solid var(--success-color);
  background: linear-gradient(90deg, rgba(82, 196, 26, 0.25) 0%, rgba(82, 196, 26, 0.15) 100%);
}

.notification-error {
  border-left: 4px solid var(--error-color);
  background: linear-gradient(90deg, rgba(245, 34, 45, 0.25) 0%, rgba(245, 34, 45, 0.15) 100%);
}

.notification-warning {
  border-left: 4px solid var(--warning-color);
  background: linear-gradient(90deg, rgba(250, 173, 20, 0.25) 0%, rgba(250, 173, 20, 0.15) 100%);
}

.notification-info {
  border-left: 4px solid var(--info-color);
  background: linear-gradient(90deg, rgba(19, 194, 194, 0.25) 0%, rgba(19, 194, 194, 0.15) 100%);
}

.notification-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-wrap: break-word;
}

.notification-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-disabled);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notification-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  border-radius: 0 0 8px 8px;
  animation: notificationProgress linear forwards;
  width: 100%;
  transform-origin: left;
}

@keyframes notificationProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .notifications-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
  
  .notification {
    margin-bottom: 12px;
    padding: 12px;
  }
  
  .notification-title {
    font-size: 15px;
  }
  
  .notification-message {
    font-size: 13px;
  }
}

/* Анимация входа для множественных уведомлений */
.notification:nth-child(1) { animation-delay: 0ms; }
.notification:nth-child(2) { animation-delay: 100ms; }
.notification:nth-child(3) { animation-delay: 200ms; }
.notification:nth-child(4) { animation-delay: 300ms; }
.notification:nth-child(5) { animation-delay: 400ms; }

/* Эффект размытия для фона при множественных уведомлениях */
.notifications-container:has(.notification:nth-child(3)) .notification:not(:nth-child(1)):not(:nth-child(2)) {
  opacity: 0.9;
  transform: scale(0.98);
}

.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.confirm-modal.show {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-content {
  background: var(--component-background);
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.confirm-modal.show .confirm-modal-content {
  transform: scale(1) translateY(0);
}

.confirm-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-color-split);
}

.confirm-icon {
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 173, 20, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.confirm-modal-body {
  padding: 16px 24px 24px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-color-split);
  background: var(--background-color);
  border-radius: 0 0 12px 12px;
}

.confirm-modal-actions .btn {
  min-width: 80px;
  height: 36px;
}

.btn-danger {
  background: var(--error-color);
  border-color: var(--error-color);
  color: var(--component-background);
}

.btn-danger:hover {
  background: #cf1322;
  border-color: #cf1322;
  color: var(--component-background);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .confirm-modal-content {
    width: 95%;
    margin: 16px;
  }
  
  .confirm-modal-actions {
    flex-direction: column;
  }
  
  .confirm-modal-actions .btn {
    width: 100%;
  }
}