/* Notification Manager - Static Header at Top of Jukebot Window */

/* Notifications wrapper - allows flex growth when expanded */
#notifications-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-shrink: 0;
  transition: all 0.3s ease-in-out;
}

/* Container for the notification header - fixed size, border stays static */
#notifications-manager {
  position: relative;
  width: 100%;
  min-height: 23px;
  max-height: 23px;
  height: 23px;
  flex-shrink: 0; /* Don't shrink - stay at fixed height */
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent-highlight-2) 38%, transparent) 0%, color-mix(in srgb, var(--color-accent-highlight-2) 32%, transparent) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.5);
  padding: 1px 0; /* 1px top/bottom spacing, 0 left/right */
  box-sizing: border-box;
  z-index: 100;
  overflow: hidden; /* Prevent content from pushing container */
  display: flex;
  flex-direction: column;
  border-radius: 0 0 8px 8px;
  /* 3D Multi-border Effect matching .notif-ez-view-banner */
  box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--color-accent-highlight-2) 55%, transparent),
      inset 0 0 0 3px color-mix(in srgb, var(--color-accent-highlight-2) 35%, transparent),
      inset 0 0 0 5px color-mix(in srgb, var(--color-accent-highlight-2) 28%, transparent),
      0 2px 8px rgba(0, 0, 0, 0.4),
      0 0 15px color-mix(in srgb, var(--color-accent-highlight-2) 40%, transparent);
  transition: all 0.3s ease-in-out;
}

/* Expand button - fills entire container, shows when scrolling */
.notif-expand-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 0 0 8px 8px;
  color: #000000;
  font-size: 0.7em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 10;
  padding: 0;
  opacity: 0;
}

/* Always clickable - shows on hover or hover-sync-active (banner hover sync) */
#notifications-manager:hover .notif-expand-btn,
#notifications-manager.hover-sync-active .notif-expand-btn {
  opacity: 1;
  filter: brightness(1.4);
}

/* White arrow icon - 100% opaque */
.notif-expand-btn i {
  color: #ffffff;
  opacity: 1;
}

/* Always show when the manager is being scrolled */
.notif-category-carousel::-webkit-scrollbar-thumb {
  opacity: 1;
}

.notif-expand-btn i {
  transition: transform 0.2s ease;
  margin: 0;
}

.notif-expand-btn.expanded i {
  transform: rotate(180deg);
}

/* Expanded state - container stays auto height but content animates with transform */
#notifications-wrapper.expanded .notif-expanded-container {
  height: auto;
  max-height: 200px;
  opacity: 1;
}

#notif-expanded-container {
  height: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  width: 100%;
}

/* Enable scrolling in expanded content when breakdowns overflow */
#notifications-wrapper.expanded .notif-expanded-container {
  height: auto;
  max-height: 200px;
  opacity: 1;
}

#notifications-wrapper:not(.expanded) .notif-expanded-container {
  height: 0;
  max-height: 0;
  opacity: 0;
}

/* Inner wrapper that does the actual slide animation */
.notif-expanded-slide-wrapper {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top;
  will-change: transform, opacity;
}

.notif-expanded-content {
  display: block;
  transform: translateY(-100%) scale(0.95);
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
  will-change: transform, opacity, max-height;
  overflow: hidden;
}

/* Slide in from top - both wrapper and content animate */
#notifications-wrapper:not(.expanded) .notif-expanded-slide-wrapper {
  transform: translateY(-20px);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

#notifications-wrapper.expanded .notif-expanded-slide-wrapper {
  transform: translateY(0);
  opacity: 1;
  max-height: 200px;
  overflow: visible;
}

#notifications-wrapper:not(.expanded) .notif-expanded-content {
  transform: translateY(-100%) scale(0.95);
  opacity: 0;
  max-height: 0;
  margin-top: 0;
}

#notifications-wrapper.expanded .notif-expanded-content {
  transform: translateY(0) scale(1);
  opacity: 1;
  max-height: 500px;
  margin-top: 3px;
}

/* When notifications manager is expanded, stop input area from shrinking */
#copilot-input-area:has(#notifications-wrapper.expanded) {
  flex-shrink: 0 !important;
}

/* Notifications Banner - Full width, click to expand/collapse */
#notifications-banner {
  width: 100%;
  height: 7px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

#notifications-banner:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent-highlight-2) 18%, transparent) 0%, color-mix(in srgb, var(--color-accent-highlight-2) 12%, transparent) 100%);
  /* 3D Multi-border Effect on hover */
  box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--color-accent-highlight-2) 35%, transparent),
      inset 0 0 0 3px color-mix(in srgb, var(--color-accent-highlight-2) 15%, transparent),
      inset 0 0 0 5px color-mix(in srgb, var(--color-accent-highlight-2) 8%, transparent),
      0 2px 8px rgba(0, 0, 0, 0.4),
      0 0 15px color-mix(in srgb, var(--color-accent-highlight-2) 20%, transparent);
}

/* Backward compatibility selector - now just a spacer */
.notif-ez-view-banner {
  width: 100%;
  height: 7px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  cursor: default;
  pointer-events: none;
}

.notif-ez-view-banner .notif-ez-view-label {
  display: none;
}

/* Hover sync effect for notifications manager - lights up when banner is hovered */
#notifications-manager.hover-sync-active,
#notifications-manager:hover {
  filter: brightness(1.15);
  box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--color-accent-highlight-2) 70%, transparent),
      inset 0 0 0 3px color-mix(in srgb, var(--color-accent-highlight-2) 50%, transparent),
      inset 0 0 0 5px color-mix(in srgb, var(--color-accent-highlight-2) 40%, transparent),
      0 2px 8px rgba(0, 0, 0, 0.4),
      0 0 20px color-mix(in srgb, var(--color-accent-highlight-2) 55%, transparent);
}

.notif-ez-view-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
}

.notif-ez-view-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65em;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.notif-ez-view-label i {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85em;
}

/* Enable scrolling within notification viewer */
.notif-viewer-main {
  flex: 1;
  min-width: 0;
  overflow: hidden; /* Prevent any overflow from inner content */
  scroll-behavior: smooth; /* Smooth scrolling for auto-scroll */
  
  /* Flexbox for proper centering */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Compact: 3px padding for exact spacing between font and bubble edges */
  padding: 0 3px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
  position: relative;
}

/* Notification item content - single line text container */
.notif-item-content {
  white-space: nowrap; /* Critical: prevent wrapping to enforce single line */
  width: auto;
  display: inline-block;
  will-change: transform;
  padding-left: 16px; /* Leading space before scrolling text */
  line-height: normal; /* Ensure text is vertically centered */
  text-align: center; /* Default center alignment */
}
 REPLACE
 REPLACE
 REPLACE

/* Header bar with label - extends fully to container edges */
.notif-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0; /* Remove all margins */
  margin-bottom: 0;
  padding: 3px 12px; /* 3px vertical spacing, container handles horizontal */
  width: 100%; /* Extend to full width */
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 0; /* No rounded corners since extending to edges */
  position: relative;
  box-sizing: border-box;
}
 REPLACE
 REPLACE

.notif-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  border-radius: 0; /* No rounded corners since header extends to edges */
  pointer-events: none;
}
 REPLACE

.notif-header-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68em; /* 15% smaller than 0.8em */
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
 REPLACE

.notif-header-label i {
  color: #a78bfa;
  font-size: 1em;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.6));
}

/* Hide the X close button */
.notif-close-btn {
  display: none !important;
}
 REPLACE

/* Category carousel container */
.notif-category-carousel {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 4px 0;
}

.notif-category-carousel::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Category icon button */
.notif-category-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  min-width: 48px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.notif-category-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.notif-category-btn.active {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.notif-category-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
}

.notif-category-icon i {
  font-size: 1em;
}

.notif-category-label {
  font-size: 0.5em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Badge on category icon */
.notif-category-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 7px;
  font-size: 0.55em;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Notification Viewer Panel - compact styling */
.notif-viewer {
  position: relative;
  margin-top: 3px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
}

.notif-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-viewer-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.notif-viewer-type i {
  font-size: 0.9em;
}

.notif-viewer-counter {
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.5);
}

/* Content area with navigation arrows - compact */
.notif-viewer-content {
  display: flex;
  align-items: center;
  gap: 3px;
}

.notif-nav-arrow {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.notif-nav-arrow:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  color: white;
}

.notif-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.notif-nav-arrow:disabled:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* Note: .notif-viewer-main styles are defined at the top with scroll support */
 REPLACE

.notif-item-content .notif-source {
  font-weight: 600;
  color: #fbbf24;
}

.notif-item-content .notif-amount {
  color: #10b981;
  font-weight: 600;
  margin-left: 4px;
}

.notif-item-content .notif-preview {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.notif-empty-state {
  text-align: center;
  padding: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.65em;
}

/* Category colors */
.notif-category-btn[data-type="coins"] .notif-category-icon i { color: #fbbf24; }
.notif-category-btn[data-type="tickets"] .notif-category-icon i { color: #f472b6; }
.notif-category-btn[data-type="likes"] .notif-category-icon i { color: #ef4444; }
.notif-category-btn[data-type="comments"] .notif-category-icon i { color: #60a5fa; }
.notif-category-btn[data-type="mentions"] .notif-category-icon i { color: #a78bfa; }
.notif-category-btn[data-type="dms"] .notif-category-icon i { color: #34d399; }

/* Notification inline item - remove background, border and shadow so text appears without bubbles */
.notif-item-inline {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
}

/* Expanded notification sections */
.notif-expanded-section {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.25s ease-in-out;
}

.notif-expanded-section:hover,
.notif-expanded-section.active {
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

/* Expanded section breakdown - shown when section is clicked */
.notif-expanded-breakdown {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 6px;
  margin-bottom: 6px;
}

.notif-clear-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: rgba(139, 92, 246, 0.15);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.notif-clear-banner:hover {
  background: var(--color-accent-highlight-2, rgba(149, 7, 105, 0.25));
}

.notif-clear-banner:active {
  opacity: 0.7;
}

.notif-expanded-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notif-expanded-breakdown-item:last-child {
  border-bottom: none;
}

.notif-breakdown-source {
  color: #ffffff;
  font-size: 0.65em;
}

.notif-breakdown-amount {
  color: #10b981;
  font-size: 0.65em;
  font-weight: 600;
}

