/* SmartVisitor Admin - Notification Panel Styles */

.notification-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.10), transparent 26%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-left: 1px solid rgba(51,65,85,0.85);
  box-shadow: -16px 0 40px rgba(2,6,23,0.45);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease-out;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.notification-panel.open {
  right: 0;
}

.notification-panel-header {
  padding: 16px 20px;
  background: rgba(8, 12, 26, 0.92);
  border-bottom: 1px solid rgba(51,65,85,0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-panel-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #e9eef7;
  letter-spacing: 0.01em;
}

.notification-panel-header .btn-close {
  background: transparent;
  border: none;
  color: #9aa4b2;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.notification-panel-header .btn-close:hover {
  color: #e9eef7;
}

.notification-panel-filters {
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(8, 12, 26, 0.94), rgba(11, 16, 32, 0.95));
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.filter-btn {
  padding: 7px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.filter-btn:hover {
  transform: translateY(-1px);
  color: #e9eef7;
}

.filter-btn.active {
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(42,73,255,0.18);
}

.filter-btn[data-scope="open"].active,
.filter-btn[data-filter="all"].active,
.filter-btn[data-source="all"].active {
  background: linear-gradient(180deg, #2a49ff, #1f3bd9);
}

.filter-btn[data-scope="processed"].active {
  background: linear-gradient(180deg, #16a34a, #0f7a36);
}

.filter-btn[data-filter="critical"].active {
  background: linear-gradient(180deg, #7f1d1d, #b91c1c);
}

.filter-btn[data-filter="error"].active {
  background: linear-gradient(180deg, #dc2626, #991b1b);
}

.filter-btn[data-filter="warning"].active {
  background: linear-gradient(180deg, #d97706, #b45309);
}

.filter-btn[data-filter="info"].active {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

.filter-btn[data-source="agenda"].active {
  background: linear-gradient(180deg, #0f766e, #115e59);
}

.filter-btn[data-source="forms"].active {
  background: linear-gradient(180deg, #7c3aed, #5b21b6);
}

.filter-btn[data-source="mail"].active {
  background: linear-gradient(180deg, #0891b2, #0e7490);
}

.filter-btn[data-source="finance"].active {
  background: linear-gradient(180deg, #15803d, #166534);
}

.filter-btn[data-source="feedback"].active {
  background: linear-gradient(180deg, #ea580c, #c2410c);
}

.filter-btn[data-source="other"].active {
  background: linear-gradient(180deg, #475569, #334155);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 16px;
  background: rgba(9, 13, 28, 0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.filter-group .filter-label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-right: 4px;
}

.notification-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.notification-item {
  background:
    linear-gradient(180deg, rgba(21, 26, 44, 0.98), rgba(10, 15, 30, 0.98));
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(3, 7, 18, 0.2);
}

.notification-item:hover {
  border-color: #60a5fa;
  box-shadow: 0 18px 36px rgba(42, 73, 255, 0.18);
  transform: translateY(-1px);
}

.notification-item[data-severity="critical"] {
  border-left: 4px solid #dc2626;
}

.notification-item[data-severity="error"] {
  border-left: 4px solid #ef4444;
}

.notification-item[data-severity="warning"] {
  border-left: 4px solid #f59e0b;
}

.notification-item[data-severity="info"] {
  border-left: 4px solid #3b82f6;
}

.notification-item[data-source-group="agenda"] {
  border-color: rgba(20,184,166,0.35);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.12);
}

.notification-item[data-source-group="forms"] {
  border-color: rgba(139,92,246,0.35);
  box-shadow: 0 12px 28px rgba(109, 40, 217, 0.12);
}

.notification-item[data-source-group="mail"] {
  border-color: rgba(34,211,238,0.35);
  box-shadow: 0 12px 28px rgba(14, 116, 144, 0.12);
}

.notification-item[data-source-group="finance"] {
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 12px 28px rgba(22, 101, 52, 0.12);
}

.notification-item[data-source-group="feedback"] {
  border-color: rgba(249,115,22,0.35);
  box-shadow: 0 12px 28px rgba(194, 65, 12, 0.12);
}

.notification-item[data-source-group="other"] {
  border-color: rgba(100,116,139,0.35);
}

.notification-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
}

.notification-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.16);
  flex-shrink: 0;
}

.notification-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-title {
  font-weight: 700;
  color: #e9eef7;
  font-size: 14px;
  line-height: 1.35;
}

.notification-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-badge.status {
  background: rgba(148,163,184,0.12) !important;
  border: 1px solid rgba(148,163,184,0.18);
  color: #cbd5e1;
}

.notification-badge.status.active {
  color: #fca5a5;
  border-color: rgba(220,38,38,0.24);
  background: rgba(220,38,38,0.12) !important;
}

.notification-badge.status.acknowledged {
  color: #93c5fd;
  border-color: rgba(59,130,246,0.24);
  background: rgba(59,130,246,0.12) !important;
}

.notification-badge.status.resolved,
.notification-badge.status.dismissed {
  color: #86efac;
  border-color: rgba(34,197,94,0.24);
  background: rgba(34,197,94,0.12) !important;
}

.notification-time {
  font-size: 11px;
  color: #9aa4b2;
  align-self: center;
}

.notification-summary {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

.notification-details {
  border-top: 1px solid rgba(37, 46, 74, 0.9);
  padding-top: 10px;
}

.notification-details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  transition: all 0.2s ease;
  user-select: none;
}

.notification-details > summary::-webkit-details-marker {
  display: none;
}

.notification-details > summary:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.28);
}

.notification-details > summary::after {
  content: '▾';
  font-size: 11px;
  opacity: 0.9;
}

.notification-details[open] > summary::after {
  content: '▴';
}

.notification-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.notification-detail-block {
  border: 1px solid rgba(37, 46, 74, 0.9);
  background: rgba(8, 12, 26, 0.55);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}

.notification-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 700;
}

.notification-detail-value {
  color: #e5edf9;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.notification-detail-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.10);
}

.detail-key {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.detail-value {
  color: #e5edf9;
  font-size: 12px;
  text-align: right;
  word-break: break-word;
  max-width: 72%;
}

.notification-source.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.notification-source.badge.agenda {
  color: #99f6e4;
  background: rgba(13,148,136,0.15);
}

.notification-source.badge.forms {
  color: #ddd6fe;
  background: rgba(109,40,217,0.15);
}

.notification-source.badge.mail {
  color: #a5f3fc;
  background: rgba(14,116,144,0.15);
}

.notification-source.badge.finance {
  color: #bbf7d0;
  background: rgba(22,101,52,0.15);
}

.notification-source.badge.feedback {
  color: #fed7aa;
  background: rgba(194,65,12,0.15);
}

.notification-source.badge.other {
  color: #cbd5e1;
  background: rgba(51,65,85,0.15);
}

.notification-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  max-width: 100%;
  border: 1px solid rgba(96,165,250,0.22);
  background: rgba(59,130,246,0.10);
}

.notification-source-link:hover {
  color: #93c5fd;
  text-decoration: none;
  border-color: rgba(96,165,250,0.36);
  background: rgba(59,130,246,0.16);
}

.notification-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.notification-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}

.btn-acknowledge {
  background: #3b82f6;
  color: white;
}

.btn-acknowledge:hover {
  background: #2563eb;
}

.btn-resolve {
  background: #22c55e;
  color: white;
}

.btn-resolve:hover {
  background: #16a34a;
}

.acknowledged {
  font-size: 12px;
  color: #9aa4b2;
}

.notification-panel-body .loading,
.notification-panel-body .empty,
.notification-panel-body .error {
  text-align: center;
  padding: 40px 20px;
  color: #9aa4b2;
  font-size: 14px;
}

.notification-panel-body .empty {
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(148,163,184,0.22);
  border-radius: 16px;
  margin: 8px 0;
}

.notification-panel-body .error {
  color: #ef4444;
}

/* Scrollbar styling */
.notification-panel-body::-webkit-scrollbar {
  width: 8px;
}

.notification-panel-body::-webkit-scrollbar-track {
  background: #0e1330;
}

.notification-panel-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.notification-panel-body::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

@media (max-width: 420px) {
  .notification-panel {
    width: 100vw;
    right: -100vw;
  }

  .notification-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Global System Notification Toast Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Global System Notification Toast Hover Effect */
.system-notification-toast:hover {
  border-color: #60a5fa;
  box-shadow: 0 6px 16px rgba(42, 73, 255, 0.3);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Animation */
@keyframes slideIn {
  from {
    right: -400px;
  }
  to {
    right: 0;
  }
}
