/**
 * @file
 * Styles for Service Outage Alert banner.
 */

.wrf-outage-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
  background-color: #d32f2f; /* Red for critical alert */
  color: #ffffff;
  padding: 1rem 3rem 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 0.95rem;
  line-height: 1.5;
  animation: slideDown 0.3s ease-out;
}

.wrf-outage-alert.is-visible {
  display: block;
}

.wrf-outage-alert__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wrf-outage-alert__icon {
  flex-shrink: 0;
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.wrf-outage-alert__message {
  flex: 1;
}

.wrf-outage-alert__message p {
  margin: 0;
  display: inline;
}

.wrf-outage-alert__message a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

.wrf-outage-alert__message a:hover,
.wrf-outage-alert__message a:focus {
  color: #ffeb3b;
  text-decoration: underline;
}

.wrf-outage-alert__message a:visited {
  color: #e1f5fe;
}

.wrf-outage-alert__message a:active {
  color: #fff59d;
}

.wrf-outage-alert__close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.wrf-outage-alert__close:hover,
.wrf-outage-alert__close:focus {
  opacity: 1;
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Push body content down when alert is visible */
.wrf-outage-alert.is-visible ~ * {
  margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wrf-outage-alert {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .wrf-outage-alert__content {
    flex-direction: column;
    text-align: center;
  }

  .wrf-outage-alert__icon {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }
}

/* Print: hide the alert */
@media print {
  .wrf-outage-alert {
    display: none !important;
  }
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .wrf-outage-alert {
    animation: none;
  }
}

