/* === Notification Bar Styles === */

.notification-bar {
  background: var(--primary-blue);
  color: #ffffff;
  padding: 10px 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-bar.hidden {
  display: none !important;
}

/* Shimmer animation */
.notification-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 3.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Content container for the sliding text */
.notification-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  min-height: 1.5em; /* Set min-height based on font size */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual notification items for the slider */
.notification-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.notification-item.active {
  opacity: 1;
  z-index: 2;
  position: static; /* Allow the container to resize based on active item's content */
}

.notification-text {
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.5; /* Ensure text is readable if it wraps */
}

.notification-icon {
  margin-right: 10px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.9);
}

/* === Responsive Styles === */

@media (max-width: 768px) {
  .notification-bar {
    padding: 8px 0;
    font-size: 0.65rem !important; /* Even smaller font size */
  }

  .notification-text {
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .notification-content {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .notification-bar {
    font-size: 0.7rem; /* Smallest font size */
  }
  
  .notification-icon {
    display: none; /* Hide icon on very small screens to save space */
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .notification-bar {
    background: #000000;
    border-bottom: 2px solid #ffffff;
  }
}