/**
 * PHOS Mega Menu — frontend base styles.
 *
 * Functional defaults only. Theme is expected to override colors, spacing,
 * typography, and panel layout. Filter `phos_mega_menu_enqueue_styles` to
 * suppress this file entirely and ship custom CSS via the theme.
 *
 * @since 1.0.0
 */

.phos-mega-menu {
  position: relative;
}

.phos-mega-menu__panel {
  position: absolute;
  top: 100%;
  /* Right-align to the trigger so the panel grows leftward instead of off-screen. */
  left: auto;
  right: 0;
  width: 720px;
  max-width: calc(100vw - 2rem);
  z-index: 100;
  padding: 1rem;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.phos-mega-menu.is-open > .phos-mega-menu__panel,
.phos-mega-menu:hover > .phos-mega-menu__panel,
.phos-mega-menu:focus-within > .phos-mega-menu__panel {
  opacity: 1;
  visibility: visible;
}

.phos-mega-menu__columns {
  display: flex;
  gap: 2rem;
}

.phos-mega-menu__column {
  flex: 1;
}

.phos-mega-menu__column-header {
  display: block;
  font-weight: 700;
  text-decoration: none;
}

.phos-mega-menu__column-links {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phos-mega-menu__column-links > li {
  display: block;
  width: 100%;
  margin: 0;
}
