
/* Announcement Bar Component */

.announcement-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 12px 20px;
  background-color: var(--opweb-lavender);
  color: var(--opweb-white);
  text-align: center;
  font-size: var(--opweb-small-font-size);
  font-family: var(--opweb-font-family);
  z-index: 11;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: top 0.3s ease-in-out, opacity 0.3s ease-in-out;
  line-height: var(--opweb-line-height);
}

.announcement-bar.visible {
  display: block;
}

/* Severity-based color schemes */
.announcement-bar.severity-info {
  background-color: var(--opweb-lavender);
}

.announcement-bar.severity-warning {
  background-color: #FFA500; /* Orange */
}

.announcement-bar.severity-error {
  background-color: #800000; /* Dark red, matching error-banner */
}

/* Announcement content container */
.announcement-bar-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Icon styling */
.announcement-bar-icon {
  font-size: 18px;
  line-height: 1;
}

/* Message text styling */
.announcement-bar-message {
  font-weight: 500;
  line-height: 1.3;
}

/* Close button styling */
.announcement-bar-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
  line-height: 1;
}

.announcement-bar-close:hover {
  opacity: 1;
}

.announcement-bar-close:focus {
  outline: 2px solid var(--opweb-white);
  outline-offset: 2px;
}

/* Mobile responsive adjustments */
@media only screen and (max-width: 600px) {
  .announcement-bar {
    padding: 10px 40px 10px 15px;
    font-size: 14px;
  }

  .announcement-bar-icon {
    font-size: 16px;
  }

  .announcement-bar-close {
    right: 10px;
    font-size: 20px;
  }
}
