/**
 * @file
 * Styles for Howard University Special Alerts Feed.
 *
 * This file contains all the styling for the Howard Special Alerts Feed module.
 * It provides responsive design with different alert severity levels and
 * dismissal functionality.
 *
 * @version 11.0.2
 * @see howard_special_alerts_feed.module
 * @see assets/js/alerts-feed.js
 */

/**
 * Main wrapper for the alerts feed.
 *
 * Centers the content and provides base layout for alert items.
 */
.alerts-feed-wrapper {
  margin-left: auto;
  margin-right: auto;
  overflow: auto;
  clear: both;
  text-align: left;
}

/**
 * Individual alert article container.
 *
 * Provides relative positioning for absolutely positioned dismiss button.
 */
.alerts-feed-wrapper article {
  width: 100%;
  position: relative;
}

/**
 * Main alert link styling.
 *
 * Creates the prominent notification bar appearance with centered text.
 */
.alerts-feed-wrapper article a.newsroom-alert {
  text-decoration: none;
  padding: 35px;
  color: #fff;
  display: block;
  font-size: 16px;
  text-shadow: none;
  text-align: center;
}

/**
 * Responsive font size adjustment for larger screens.
 */
@media screen and (min-width: 800px) {
  .alerts-feed-wrapper article a.newsroom-alert {
    font-size: 18px;
    padding: 16px;
  }
}

/**
 * Alert severity levels.
 *
 * Different background colors for different alert priorities.
 */

/* Low priority alert styling */
.alerts-feed-wrapper article.newsroom-alert--low,
.alerts-feed-wrapper article a.newsroom-alert--low {
  background: #f37f34; /* Howard University orange */
}

/* High priority alert styling */
.alerts-feed-wrapper article.newsroom-alert--high,
.alerts-feed-wrapper article a.newsroom-alert--high {
  background: #e51937; /* Howard University red */
}

/**
 * Alert hover state.
 *
 * Maintains white text and adds underline on hover for better UX.
 */
.alerts-feed-wrapper article a.newsroom-alert:hover {
  color: #fff;
  text-decoration: underline;
}

/**
 * Responsive padding adjustments.
 *
 * Provides optimal spacing across different screen sizes.
 */

/* Mobile devices: Reduced padding for smaller screens */
@media screen and (min-width: 1px) and (max-width: 1000px) {
  .alerts-feed-wrapper article a.newsroom-alert {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Tablet devices: Percentage-based padding */
@media screen and (min-width: 1000px) and (max-width: 1700px) {
  .alerts-feed-wrapper article a.newsroom-alert {
    padding-left: 15%;
    padding-right: 15%;
  }
}

/* Desktop devices: Maximum padding for readability */
@media screen and (min-width: 1700px) {
  .alerts-feed-wrapper article a.newsroom-alert {
    padding-left: 25%;
    padding-right: 25%;
  }
}

/**
 * Dismiss button styling.
 *
 * Creates a circular close button in the top-right corner of each alert.
 */
.alerts-feed-wrapper article a.newsroom-alert-dismiss {
  display: block;
  color: #fff;
  width: 28px;
  height: 28px;
  padding: 5px;
  border: 1px solid #fff;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  right: 5px;
  opacity: 0.8;
}

/**
 * Dismiss button hover state.
 *
 * Increases opacity and shows pointer cursor on hover.
 */
.alerts-feed-wrapper article a.newsroom-alert-dismiss:hover {
  opacity: 1;
  cursor: pointer;
}

/**
 * Dismiss button X icon.
 *
 * Creates the X symbol using CSS pseudo-elements for better accessibility.
 */
.alerts-feed-wrapper article a.newsroom-alert-dismiss:before,
.alerts-feed-wrapper article a.newsroom-alert-dismiss:after {
  position: absolute;
  left: 12px;
  content: ' ';
  height: 16px;
  width: 2px;
  background-color: #fff;
}

.alerts-feed-wrapper article a.newsroom-alert-dismiss:before {
  transform: rotate(45deg);
}

.alerts-feed-wrapper article a.newsroom-alert-dismiss:after {
  transform: rotate(-45deg);
}

/**
 * State classes for JavaScript manipulation.
 */

/* Hidden state for dismissed alerts */
.alerts-feed-wrapper article.hidden {
  display: none;
}

/*
 * Body state classes.
 *
 * The following classes are added to the body element by JavaScript:
 * - .alerts-active: Added when alerts are present on the page
 * - .no-alerts: Added when no alerts are present on the page
 *
 * These can be used in custom CSS to adjust global styles based on alert state.
 */
