/**
 * Stage08-B post-launch frontend hotfix.
 *
 * Scope is deliberately limited to the homepage mobile hero, the homepage
 * seasonal feature layout and the mobile submenu disclosure state.
 */

/* NAV-01: aria-expanded is the single authority for mobile submenu visibility. */
@media (max-width: 1023px) {
  .dpp-mobile-menu__list > li > .sub-menu {
    display: none;
  }

  .dpp-mobile-menu__list > li > .dpp-submenu-toggle[aria-expanded="true"] + .sub-menu {
    display: block;
  }
}

/* RWD-03/RWD-04: remove the stale overlay and make the action row intrinsic. */
body.home [data-dpp-module="home.young-feature"] .dpp-feature__body {
  background: none;
  box-sizing: border-box;
  max-width: none;
  width: 100%;
}

body.home [data-dpp-module="home.young-feature"] .dpp-button-row {
  flex-wrap: nowrap;
  max-width: 100%;
  width: fit-content;
}

body.home [data-dpp-module="home.young-feature"] .dpp-button-row > .dpp-button {
  flex: 0 0 auto;
  width: auto;
}

@media (max-width: 820px) {
  /* RWD-01: align the homepage rhythm with the accepted mobile brand hero. */
  body.home [data-dpp-module="home.hero"] {
    --dpp-home-hero-mobile-offset: 0px;
    box-sizing: border-box;
    height: auto;
    min-height: clamp(660px, calc(100svh - var(--dpp-primary-nav-height)), 760px);
    padding-top: 0;
  }

  body.home [data-dpp-module="home.hero"] .dpp-hero__content {
    padding: clamp(56px, 8svh, 76px) 0 clamp(54px, 8svh, 72px);
  }

  /* RWD-02: keep the actions low in the poster without the inherited 380px panel. */
  body.home [data-dpp-module="home.young-feature"] .dpp-feature__body {
    height: auto;
    min-height: 0;
    padding: 0 18px clamp(22px, 5vw, 30px);
  }

  body.home [data-dpp-module="home.young-feature"] .dpp-button-row {
    gap: 8px;
  }

  body.home [data-dpp-module="home.young-feature"] .dpp-button-row > .dpp-button {
    min-height: 46px;
    white-space: nowrap;
  }
}
