/* Modern Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  max-width: 400px;
  width: 100%;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: 9999;
  overflow: hidden;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  grid-template-areas:
    "icon content close";
  gap: 12px;
  align-items: start;
}

.notification.show {
  transform: translateX(0);
}

/* Types */
.notification.success {
  border-left: 4px solid #28a745;
}

.notification.error {
  border-left: 4px solid #dc3545;
}

.notification.warning {
  border-left: 4px solid #ffc107;
}

.notification.info {
  border-left: 4px solid #17a2b8;
}

/* Icon */
.notification-icon {
  grid-area: icon;
  line-height: 1;
  margin-top: 3px;
}

.notification.success .notification-icon {
  color: #28a745;
}

.notification.error .notification-icon {
  color: #dc3545;
}

.notification.warning .notification-icon {
  color: #ffc107;
}

.notification.info .notification-icon {
  color: #17a2b8;
}

.notification-icon i {
  font-size: 18px;
  display: block;
}

/* Content */
.notification-content {
  grid-area: content;
  min-width: 0; /* Ensures text truncation works */
}

.notification-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 2px;
  color: #212529;
}

.notification-message {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  color: #6c757d;
  word-break: break-word;
}

/* Close button */
.notification-close {
  grid-area: close;
  background: none;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  margin-top: 3px;
}

.notification-close:hover {
  color: #495057;
}

.notification-close i {
  font-size: 14px;
  display: block;
}

/* Progress bar */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: #e9ecef;
}

.notification-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  transform: translateX(-100%);
  animation: notification-progress 3s linear forwards;
}

.notification.success .notification-progress::after {
  background-color: #28a745;
}

.notification.error .notification-progress::after {
  background-color: #dc3545;
}

.notification.warning .notification-progress::after {
  background-color: #ffc107;
}

.notification.info .notification-progress::after {
  background-color: #17a2b8;
}

@keyframes notification-progress {
  to {
    transform: translateX(0);
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .notification {
    width: calc(100% - 32px);
    max-width: none;
    right: 16px;
    left: 16px;
  }
} 