/* Toast notification */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  z-index: var(--sol-z-notification);
  pointer-events: none;
}

.toast-notification {
  background: var(--sol-bg-surface);
  color: var(--sol-text-primary);
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--sol-border-default);
  font-size: 13px;
  z-index: var(--sol-z-notification);
  animation: toast-fade 2s ease-in-out forwards;
  pointer-events: none;
  box-shadow: var(--sol-shadow-lg);
}

.toast-notification.toast-success {
  border-color: color-mix(in srgb, var(--sol-success) 45%, transparent);
  background: color-mix(in srgb, var(--sol-success) 12%, var(--sol-bg-surface));
}

.toast-notification.toast-warn {
  border-color: color-mix(in srgb, var(--sol-warning) 45%, transparent);
  background: color-mix(in srgb, var(--sol-warning) 12%, var(--sol-bg-surface));
}

.toast-notification.toast-critical {
  background: #3a1115;
  border-color: #ed4245;
  color: #ffdfe1;
  box-shadow: 0 0 0 1px rgba(237, 66, 69, 0.25), 0 8px 24px rgba(237, 66, 69, 0.25);
}
@keyframes toast-fade {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}


/* ---- Feature 5: Notification Bell ---- */
.app-notification-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
  margin-left: auto;
}

.app-notification-bell:hover {
  background: var(--sol-bg-hover);
}

.notification-bell-badge {
  position: absolute;
  top: 0;
  right: 2px;
  background: var(--sol-danger, #ed4245);
  color: #fff;
  font-size: 9px;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  font-weight: 600;
  border: 1.5px solid var(--sol-bg-elevated);
}

.notification-panel {
  position: fixed;
  z-index: calc(var(--sol-z-notification) + 1);
  background: var(--sol-bg-surface);
  border: 1px solid var(--sol-border-default);
  border-radius: 8px;
  min-width: 300px;
  max-width: 380px;
  max-height: 400px;
  box-shadow: var(--sol-shadow-lg);
  overflow: hidden;
}

.notification-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sol-border-default);
  font-weight: 600;
  font-size: 13px;
  color: var(--sol-text-primary);
}

.notification-clear-btn {
  background: none;
  border: none;
  color: var(--sol-accent-text);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.notification-clear-btn:hover {
  background: var(--sol-bg-hover);
}

.notification-list {
  max-height: 350px;
  overflow-y: auto;
}

.notification-empty {
  padding: 20px;
  text-align: center;
  color: var(--sol-text-muted);
  font-size: 12px;
}

.notification-item {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(42, 58, 92, 0.2);
  border-left: 3px solid transparent;
  transition: background 0.1s;
}

.notification-item--debug {
  border-left-color: #707780;
  opacity: 0.78;
}

.notification-item--info {
  border-left-color: #4c9aff;
}

.notification-item--warn {
  border-left-color: #f0b232;
}

.notification-item--critical {
  border-left-color: #ed4245;
}

.notification-item:hover {
  background: var(--sol-bg-hover);
}

.notification-item.unread {
  background: rgba(26, 140, 216, 0.06);
}

.notification-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.notification-app-name {
  font-size: 10px;
  color: var(--sol-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.notification-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--sol-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-severity {
  font-size: 9px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.notification-severity--debug {
  color: #9aa2ad;
  border-color: rgba(154, 162, 173, 0.35);
  background: rgba(154, 162, 173, 0.12);
}

.notification-severity--info {
  color: #9ac7ff;
  border-color: rgba(76, 154, 255, 0.45);
  background: rgba(76, 154, 255, 0.16);
}

.notification-severity--warn {
  color: #ffd38a;
  border-color: rgba(240, 178, 50, 0.45);
  background: rgba(240, 178, 50, 0.16);
}

.notification-severity--critical {
  color: #ffb5b8;
  border-color: rgba(237, 66, 69, 0.5);
  background: rgba(237, 66, 69, 0.15);
}

.notification-body {
  font-size: 11px;
  color: var(--sol-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-time {
  font-size: 10px;
  color: var(--sol-text-muted);
  margin-top: 2px;
}

/* Mobile notification panel */
@media (max-width: 600px) {
  .notification-panel {
    min-width: unset;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    left: 8px !important;
    right: 8px;
  }

  .toast-notification {
    max-width: calc(100vw - 32px);
    font-size: 12px;
    padding: 6px 12px;
  }
}
