/*
 * MatchdayHotels V12 fixture responsive ownership.
 *
 * Kept separate from fixture.css so the approved V11 visual internals can be
 * migrated incrementally while V12 owns the cross-width structure now.
 * The global /styles/v12/responsive.css still loads after this file and remains
 * the final cross-page safety layer.
 */

@media (max-width: 1180px) {
  body.mhd-v12 #fixtureConcept3V11Shell.mdh-v1119-shell {
    max-width: 100%;
  }

  body.mhd-v12 #fixtureScrapbookV1122.mdh-v1122-scrapbook,
  body.mhd-v12 #fixtureConcept3V11Shell > .mdh-v1127-enrichment,
  body.mhd-v12 #fixtureConcept3V11Shell > [data-mdh-enrichment-v11303] {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  /* Explicit single-column row ownership prevents the V11.0.61A dossier and
     league card from competing for the same row when the scrapbook collapses. */
  body.mhd-v12 #fixtureScrapbookV1122.mdh-v1122-scrapbook {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto auto !important;
    gap: 14px;
  }

  body.mhd-v12 #fixtureScrapbookV1122 > .mdh-v1122-summary {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.mhd-v12 #fixtureScrapbookV1122 > .mdh-v1122-league {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  body.mhd-v12 #fixtureScrapbookV1122 > .mdh,
  body.mhd-v12 #fixtureScrapbookV1122 > [data-mdh-v11061a-stay-dossier] {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  body.mhd-v12 #fixtureScrapbookV1122 > .mdh-v1122-photos {
    grid-column: 1 !important;
    grid-row: 4 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.mhd-v12 #fixtureScrapbookV1122 > :is(.mdh-v11303-planner-wrap, .mdh-v1122-planner) {
    grid-column: 1 !important;
    grid-row: 5 !important;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-summary-head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-route-badges {
    justify-content: flex-start;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body.mhd-v12 #fixtureArticle,
  body.mhd-v12 #fixtureConcept3V11Shell.mdh-v1119-shell,
  body.mhd-v12 #fixtureConcept3V11,
  body.mhd-v12 #fixtureScrapbookV1122.mdh-v1122-scrapbook {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  /*
   * V12.1 mobile fixture hero.
   *
   * The V11 hero is one real section carrying both #fixtureConcept3V11 and
   * .mdh-v1104-poster. Earlier migration rules targeted a descendant poster,
   * leaving the fixed-height V11 phone artboard in control. V12.1 deliberately
   * targets the root itself and turns the useful live fixture content into
   * normal grid flow. Desktop remains on the approved V11 poster composition.
   */
  body.mhd-v12 #fixtureConcept3V11.mdh-v1104-poster {
    container-type: normal;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 14px !important;
    padding: 14px;
    display: grid !important;
    grid-template-columns: minmax(0, 1.22fr) minmax(118px, .78fr);
    grid-template-areas:
      "brand competition"
      "headline headline"
      "photo map"
      "facts facts"
      "social social";
    gap: 12px;
    align-items: start;
    overflow: hidden;
    border-radius: 0;
  }

  /* Keep the V11 texture/paint as atmosphere, not layout. */
  body.mhd-v12 #fixtureConcept3V11.mdh-v1104-poster > :is(
    .mdh-v1104-grain,
    .mdh-v1104-paint
  ) {
    pointer-events: none;
  }

  body.mhd-v12 #fixtureConcept3V11.mdh-v1104-poster > .mdh-v1104-paint--right {
    width: 52%;
    height: 170px;
    right: -20%;
    bottom: 10%;
  }

  body.mhd-v12 #fixtureConcept3V11.mdh-v1104-poster > .mdh-v1104-paint--bottom {
    width: 70%;
    height: 80px;
    left: 25%;
    bottom: -34px;
  }

  body.mhd-v12 #fixtureConcept3V11.mdh-v1104-poster > :is(
    .mdh-v1104-brand,
    .mdh-v1104-competition-top,
    .mdh-v1104-headline,
    .mdh-v1104-polaroid,
    .mdh-v1104-map-panel,
    .mdh-v1104-info-band,
    .mdh-v1104-social-footer
  ) {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-brand {
    grid-area: brand;
    align-self: center;
    display: flex;
    min-height: 34px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-brand img {
    display: block;
    width: min(164px, 100%);
    height: auto;
    max-height: 38px;
    object-fit: contain;
    object-position: left center;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-competition-top {
    grid-area: competition;
    justify-self: end;
    align-self: start;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-competition-top .mdh-v1107-competition-logo {
    display: grid;
    place-items: center;
    max-width: 56px;
    min-width: 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-competition-top img {
    display: block;
    width: auto;
    max-width: 56px;
    height: auto;
    max-height: 30px;
    object-fit: contain;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-competition-top small {
    max-width: 72px;
    color: rgba(245, 241, 232, .72);
    font: 800 9px/1.05 Arial, Helvetica, sans-serif;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-competition-top :is(svg, span) {
    max-height: 30px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1107-competition-logo > span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f1eee7;
    font: 800 9px/1 Arial, Helvetica, sans-serif;
    text-align: right;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1107-competition-logo > span svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline {
    grid-area: headline;
    height: auto !important;
    padding: 2px 0 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 {
    width: 100%;
    line-height: .84;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 > :is(span, strong) {
    width: auto;
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    text-wrap: balance;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 > span {
    font-size: clamp(42px, 12.8vw, 56px);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 > strong {
    margin-top: 3px;
    font-size: clamp(36px, 11.1vw, 48px);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 > em {
    margin: 5px 0 7px;
    padding: 3px 8px 5px;
    font-size: 14px;
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--mdh-primary) 74%, transparent);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline-rule {
    width: min(250px, 78%);
    height: 6px;
    margin-top: 7px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline p {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.15;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-crests {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto;
    height: auto !important;
    margin-top: 11px;
    gap: 10px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-crests img {
    width: 48px;
    max-width: 48px;
    height: 48px;
    object-fit: contain;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-crests span {
    font-size: 17px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid {
    grid-area: photo;
    height: 218px !important;
    padding: 7px 7px 58px;
    transform: rotate(-1.2deg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .40);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-tape {
    width: 72px;
    height: 19px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-tape--top {
    top: -10px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-tape--bottom {
    bottom: -9px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid-caption {
    left: 12px;
    right: 10px;
    bottom: 10px;
    gap: 7px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid-caption > svg {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid-caption div {
    min-width: 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid-caption div strong {
    font-size: 15px;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid-caption div span {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid-caption > b {
    display: none;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-map-panel {
    grid-area: map;
    height: 218px !important;
    min-height: 218px;
    align-self: stretch;
    overflow: visible;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-map-panel::before {
    inset: 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-map-base,
  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-route-svg {
    inset: 8px 0 0;
    width: 100%;
    height: calc(100% - 8px);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-handline {
    right: 0 !important;
    top: 0 !important;
    left: auto !important;
    bottom: auto !important;
    max-width: 100%;
    font-size: 12px;
    line-height: 1;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-handline img {
    display: block;
    width: min(118px, 100%);
    height: auto;
    margin-left: auto;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-handline::after {
    width: 64px;
    height: 3px;
    margin-top: 4px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-route-svg text {
    font-size: 20px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1111-distance text,
  body.mhd-v12 #fixtureConcept3V11 .mdh-v1111-route-label text {
    font-size: 18px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-flight {
    padding: 72px 8px 8px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-flight-row {
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
    gap: 5px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-flight-row span {
    font-size: 8px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-flight-row strong {
    margin-top: 4px;
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-plane {
    height: 34px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-plane svg {
    width: 30px;
    height: 30px;
    padding: 5px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-boarding {
    margin-top: 13px;
    padding: 6px;
    font-size: 8px;
    line-height: 1.15;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-info-band {
    grid-area: facts;
    height: auto !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: hidden;
    border-radius: 14px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat {
    min-height: 92px !important;
    padding: 12px 8px 10px !important;
    border-right: 1px solid rgba(255, 255, 255, .18);
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    text-align: left;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat:nth-child(even) {
    border-right: 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat:last-child {
    grid-column: 1 / -1;
    min-height: 74px !important;
    border-right: 0;
    border-bottom: 0;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat > svg {
    display: inline-block;
    width: 25px;
    height: 25px;
    margin: 0 7px 6px 0;
    vertical-align: middle;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat > span {
    display: inline-block;
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat > strong {
    margin-top: 0;
    font-size: 14px;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat > small {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat--competition > div {
    height: 35px;
    margin-top: 2px;
    justify-content: flex-start;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat--competition img {
    max-width: 68px;
    max-height: 32px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat--competition div > span {
    align-items: flex-start;
    font-size: 10px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat--competition div > span svg {
    width: 25px;
    height: 25px;
  }

  /*
   * Paper card, stamp and faux CTA are desktop poster decoration. Keeping them
   * on phones would recreate the long fixed artboard and duplicate the real
   * planning content immediately below the hero.
   */
  body.mhd-v12 #fixtureConcept3V11 :is(
    .mdh-v1104-paper-card,
    .mdh-v1104-stamp,
    .mdh-v1104-cta
  ) {
    display: none !important;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-social-footer {
    grid-area: social;
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-tags {
    display: none !important;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-socials {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-socials a {
    min-height: 44px;
    padding: 0 13px;
    gap: 7px;
    border-width: 1px;
    border-radius: 10px;
    font-size: 13px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-socials b {
    font-size: 18px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-social-footer:has(.mdh-v1104-socials:empty) {
    display: none !important;
  }

  body.mhd-v12 #fixtureScrapbookV1122.mdh-v1122-scrapbook {
    margin: 14px auto 24px;
    padding: 0;
    gap: 12px;
  }

  body.mhd-v12 #fixtureScrapbookV1122 :where(
    .mdh-v1122-summary,
    .mdh-v1122-league,
    .mdh-v1122-photos,
    .mdh-v11303-planner-wrap,
    .mdh-v1122-planner
  ) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-summary {
    min-height: 0;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-summary-copy,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-summary-copy p,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-league-copy,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-league-copy p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-planner-wrap {
    padding: 0 !important;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-planner form {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mhd-v12 #fixtureConcept3V11Shell > .mdh-v1127-enrichment,
  body.mhd-v12 #fixtureConcept3V11Shell > [data-mdh-enrichment-v11303] {
    width: 100%;
    max-width: 100%;
    margin: 16px 0;
    padding: 17px;
    border-radius: 18px;
  }

  body.mhd-v12 #fixtureConcept3V11Shell .mdh-v1127-essential-grid,
  body.mhd-v12 #fixtureConcept3V11Shell .mdh-v1127-culture-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mhd-v12 .mdh-si-host-card > .mdh-si-callout {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  /* The dossier already has a proven 61A mobile component layout. V12 adds
     containment without replacing its interaction or data behaviour. */
  body.mhd-v12 #fixtureScrapbookV1122 .mdh,
  body.mhd-v12 #fixtureScrapbookV1122 [data-mdh-v11061a-stay-dossier] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: clip;
  }
}

@media (max-width: 620px) {
  body.mhd-v12 #fixtureScrapbookV1122 > .mdh-v1122-photos {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-choice-grid-six,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-choice-grid-four,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-choice-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 320px-class phones: keep the same hierarchy, give media the full row. */
@media (max-width: 360px) {
  body.mhd-v12 #fixtureConcept3V11.mdh-v1104-poster {
    padding: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand competition"
      "headline headline"
      "photo photo"
      "map map"
      "facts facts"
      "social social";
    gap: 10px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-brand img {
    width: min(148px, 100%);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-competition-top small {
    display: none;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 > span {
    font-size: clamp(39px, 12.6vw, 45px);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-headline h2 > strong {
    font-size: clamp(34px, 10.9vw, 40px);
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-polaroid {
    height: 224px !important;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-map-panel {
    height: 220px !important;
    min-height: 220px;
  }

  body.mhd-v12 #fixtureConcept3V11 .mdh-v1104-stat {
    min-height: 88px !important;
    padding-inline: 7px !important;
  }
}

@media (max-width: 430px) {
  body.mhd-v12 #fixtureScrapbookV1122.mdh-v1122-scrapbook {
    gap: 10px;
    margin-top: 10px;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-summary,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-league {
    min-width: 0;
    max-width: 100%;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v1122-route-badges {
    gap: 7px;
  }

  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-choice-grid-six,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-choice-grid-four,
  body.mhd-v12 #fixtureScrapbookV1122 .mdh-v11303-choice-grid-two {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mhd-v12 #fixtureConcept3V11Shell > .mdh-v1127-enrichment,
  body.mhd-v12 #fixtureConcept3V11Shell > [data-mdh-enrichment-v11303] {
    padding: 15px;
    border-radius: 16px;
  }
}
