/* Kuuthi Modern Floating Notification Center Component */
.kuuthi-notif-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  z-index: 100000;
  pointer-events: none !important;
  width: max-content;
  height: max-content;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating Bell Trigger */
.kuuthi-notif-btn {
  position: relative;
  z-index: 100001;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  pointer-events: auto !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  margin: 0;
}

.kuuthi-notif-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

.kuuthi-notif-btn:active {
  transform: translateY(0px) scale(0.96);
}

.kuuthi-notif-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.kuuthi-notif-btn:hover svg {
  transform: rotate(15deg);
}

/* Pulsing Badge Dot / Counter */
.kuuthi-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: kuuthiBadgePulse 2s infinite;
  box-sizing: border-box;
}

@keyframes kuuthiBadgePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Notification Popover Card */
.kuuthi-notif-card {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  right: auto;
  width: 350px;
  max-width: calc(100vw - 36px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.94);
  transform-origin: bottom left;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.kuuthi-notif-card.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0px) scale(1);
}

/* Header */
.kuuthi-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.kuuthi-notif-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.kuuthi-notif-header-count {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.kuuthi-notif-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.kuuthi-notif-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Body / List of messages */
.kuuthi-notif-body {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Message Card Item */
.kuuthi-notif-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  position: relative;
  transition: all 0.2s ease;
}

.kuuthi-notif-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.kuuthi-notif-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kuuthi-notif-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #1e293b;
}

.kuuthi-notif-item-text {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.5;
  word-break: break-word;
  margin: 0 0 8px 0;
}

.kuuthi-notif-item-text p {
  margin: 0 0 6px 0;
}

.kuuthi-notif-item-text p:last-child {
  margin-bottom: 0;
}

.kuuthi-notif-item-text a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.kuuthi-notif-item-text a:hover {
  color: #1d4ed8;
}

.kuuthi-notif-item-text strong,
.kuuthi-notif-item-text b {
  color: #0f172a;
  font-weight: 700;
}

.kuuthi-notif-item-text ul,
.kuuthi-notif-item-text ol {
  margin: 4px 0 6px 0;
  padding-left: 18px;
}

.kuuthi-notif-item-text li {
  margin-bottom: 3px;
}

.kuuthi-notif-item-text code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8em;
}

/* Expiry & Meta Row */
.kuuthi-notif-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: #64748b;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
  margin-top: 6px;
}

.kuuthi-notif-expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.72rem;
}

/* Item Type Tinting */
.kuuthi-notif-item-info { background: #eff6ff; border-color: #bfdbfe; }
.kuuthi-notif-item-info .kuuthi-notif-item-title { color: #1e40af; }

.kuuthi-notif-item-success { background: #f0fdf4; border-color: #bbf7d0; }
.kuuthi-notif-item-success .kuuthi-notif-item-title { color: #166534; }

.kuuthi-notif-item-warning { background: #fffbeb; border-color: #fde68a; }
.kuuthi-notif-item-warning .kuuthi-notif-item-title { color: #92400e; }

.kuuthi-notif-item-alert { background: #fef2f2; border-color: #fecaca; }
.kuuthi-notif-item-alert .kuuthi-notif-item-title { color: #991b1b; }

/* Empty state */
.kuuthi-notif-empty {
  text-align: center;
  padding: 24px 12px;
  color: #64748b;
}

.kuuthi-notif-empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Action Footer */
.kuuthi-notif-footer {
  padding: 10px 16px 12px 16px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kuuthi-notif-clear-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.kuuthi-notif-clear-btn:hover {
  color: #ef4444;
  background: #fef2f2;
}

.kuuthi-notif-dismiss-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kuuthi-notif-dismiss-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 600px) {
  .kuuthi-notif-container {
    bottom: 18px;
    left: 16px;
    right: auto;
  }
  .kuuthi-notif-card {
    width: 300px;
    left: 0;
    right: auto;
  }
}
