/* This stylesheet is loaded only for the public site's seasonal setting. */
[data-season="new-year"] {
  --ny-bough: url("../../seasonal/new-year/bough.webp");
  --ny-corner: url("../../seasonal/new-year/corner.webp");
  --ny-cluster: url("../../seasonal/new-year/cluster.webp");
  --ny-lights: url("../../seasonal/new-year/lights.svg");
  --ny-rule: linear-gradient(90deg, transparent, #bba27399 38%, #bba27370 68%, transparent);
}

.new-year-bough, .new-year-hero, .new-year-lights, .new-year-footer {
  display: block;
  pointer-events: none;
  user-select: none;
}

/* The bough receives only spare flex space between the logo and the controls. */
.new-year-bough {
  flex: 1 1 0;
  min-width: 0;
  height: 66px;
  background: var(--ny-bough) center / contain no-repeat;
}

.new-year-lights,
[data-season] .clinic-hero::before {
  height: 28px;
  background: var(--ny-lights) center top / 300px 28px repeat-x;
}
[data-season] .clinic-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  pointer-events: none;
}
.new-year-hero {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
}
.new-year-hero::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -9px;
  width: min(32%, 500px, calc((100% - 390px) / 2));
  aspect-ratio: 3 / 2;
  background: var(--ny-corner) right top / contain no-repeat;
}
[data-season] .clinic-hero__tagline, [data-season] .clinic-hero__reviews,
[data-season] .clinic-hero__offers, [data-season] .clinic-hero__play {
  z-index: 1;
}

/* The vignettes are beside section names and in an independent strip above footer links. */
[data-season] .main__stocks .mx-feature-panel__heading,
[data-season] .our-doctors__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mx-heading-gap);
}
[data-season] .home-directions .site-section__heading::after,
[data-season] .main__stocks .mx-feature-panel__heading::after,
[data-season] .our-doctors__title::after {
  content: "";
  flex: 1 1 0;
  min-width: 0;
  max-width: 250px;
  height: clamp(42px, 5vw, 66px);
  background: var(--ny-cluster) right center / contain no-repeat,
              var(--ny-rule) center / 100% 1px no-repeat;
  pointer-events: none;
}
[data-season] .main__stocks .mx-feature-panel__heading::after {
  max-width: 175px;
  background-image: var(--ny-bough), var(--ny-rule);
}
[data-season] .footer { position: relative; }
.new-year-footer {
  position: absolute;
  inset: 0 0 auto;
  height: 66px;
  background: var(--ny-cluster) center 5px / auto 55px no-repeat,
              var(--ny-rule) center / min(86%, var(--mx-content-width)) 1px no-repeat;
}

@media (max-width: 991px) {
  .new-year-bough {
    height: 43px;
    background-size: min(100%, 135px) auto;
  }
}
@media (max-width: 700px) {
  /* The art can use only the room above the cards. On short screens it shrinks with
     that grid row, even when longer CMS titles increase the height of the cards. */
  [data-season] .clinic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  .new-year-hero {
    position: relative;
    inset: auto;
    margin: -38px -14px 6px 0;
  }
  .new-year-hero::after {
    inset: 0 -7px 0 auto;
    width: min(48vw, 190px);
    aspect-ratio: auto;
    background-position: right top;
    mask-image: linear-gradient(transparent, black 12%);
  }
  [data-season] .clinic-hero[data-video-state]:not([data-video-state="playing"]) .new-year-hero {
    position: static;
  }
  /* The paused-video logo and manual play button sit in the middle. Pin a smaller
     ornament to the far edge while those controls are present. */
  [data-season] .clinic-hero[data-video-state]:not([data-video-state="playing"]) .new-year-hero::after {
    inset: 146px -5px auto auto;
    width: clamp(42px, calc((100% - 200px) / 2), 120px);
    aspect-ratio: 3 / 2;
  }
  .new-year-lights, [data-season] .clinic-hero::before {
    height: 18px;
    background-size: 198px 18px;
  }
  [data-season] .main__stocks .mx-feature-panel__heading,
  [data-season] .our-doctors__title { gap: 12px; }
  [data-season] .home-directions .site-section__heading::after,
  [data-season] .main__stocks .mx-feature-panel__heading::after,
  [data-season] .our-doctors__title::after {
    max-width: 104px;
    height: 38px;
  }
  .new-year-footer { height: 55px; background-size: auto 46px, 88% 1px; }
}
@media (max-width: 379px) {
  .new-year-bough { display: none; }
  [data-season] .home-directions .site-section__heading { gap: 5px; }
}
@media (forced-colors: active) {
  .new-year-bough, .new-year-hero, .new-year-lights, .new-year-footer,
  [data-season] .clinic-hero::before, [data-season] .home-directions .site-section__heading::after,
  [data-season] .main__stocks .mx-feature-panel__heading::after, [data-season] .our-doctors__title::after {
    visibility: hidden;
  }
}
