/* Compoziție pentru telefon: mecanică lizibilă și footer accesibil prin scroll. */
@media (max-width: 599px) and (orientation: portrait) {
  body.reference-home:has(#winterEntryForm) {
    --mechanic-title-size: clamp(14px, 4vw, 18px);
    --mechanic-detail-size: clamp(11px, 3.1vw, 14px);
    --mobile-title-top: clamp(60px, 8.5svh, 80px);
  }

  body.reference-home:has(#winterEntryForm) #sd-app-root,
  body.reference-home:has(#winterEntryForm) .site-layout {
    height: auto !important;
    min-height: 100svh !important;
  }

  body.reference-home:has(#winterEntryForm) .container-home.winter-home {
    flex: 0 0 auto !important;
    height: 100svh !important;
    min-height: 0 !important;
    container: mobile-campaign / size;
  }
  body.reference-home:has(#winterEntryForm) .container-home .text-headline-logo {
    top: var(--mobile-title-top) !important;
  }

  /* Textul este opac; transparența benzii îl lasă să se vadă dedesubt. */
  body.reference-home:has(#winterEntryForm) .winter-ghost-claim {
    visibility: visible !important;
    opacity: 1 !important;
    bottom: 3.25rem;
  }
  body.reference-home:has(#winterEntryForm) .container-home .text-headline-logo .winter-headline {
    opacity: .96 !important;
  }

  /* Aceeași înclinare, cu spațiu vizibil sub titlu. */
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue {
    top: calc(var(--mobile-title-top) + 40vw) !important;
    height: clamp(144px, 41vw, 180px) !important;
    transform: rotate(-10.9deg) !important;
    transform-origin: left top !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .banda-blue-mecanica {
    box-sizing: border-box;
    padding: 6px clamp(10px, 3vw, 22px) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .mecanica {
    gap: 8px clamp(10px, 3vw, 18px) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .mecanica-text {
    font-size: var(--mechanic-detail-size) !important;
    line-height: 1.15 !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .mecanica-img,
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .mecanica-item-1 .mecanica-img,
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .mecanica-item-2 .mecanica-img {
    width: clamp(28px, 8vw, 34px) !important;
    min-width: clamp(28px, 8vw, 34px) !important;
    height: clamp(28px, 8vw, 34px) !important;
    margin-right: .6rem !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .mecanica-item-2 .mecanica-text {
    gap: .8rem;
  }
  body.reference-home:has(#winterEntryForm) .container-home .banda-blue .button {
    font-size: var(--mechanic-title-size);
    min-height: 44px;
    padding: .65rem .8rem;
  }

  /* Premiile urmează mecanica și rămân deasupra zăpezii. */
  body.reference-home:has(#winterEntryForm) .container-home .premii-container {
    top: calc(var(--mobile-title-top) + min(70vw, 46svh)) !important;
    bottom: max(54px, 9svh) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prizes {
    grid-template-rows: minmax(0, 1.1fr) 24px repeat(2, minmax(0, 1fr)) !important;
    row-gap: 0 !important;
    align-content: stretch;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize {
    justify-content: center !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize .prize-image {
    height: calc(100% - 30px) !important;
    max-height: clamp(44px, 14vw, 65px);
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize.grand-prize .prize-image {
    max-height: clamp(54px, 19vw, 82px);
  }
  body.reference-home:has(#winterEntryForm) .container-home .bottle-with-lines-mobile .winter-standard-bottle {
    height: min(58vw, 40svh) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .bottle-with-lines-mobile .winter-xmas-bottle {
    height: min(72vw, 50svh) !important;
  }

  /* Lasă loc pentru trecerea discretă către footer. */
  body.reference-home:has(#winterEntryForm) .winter-home::after {
    height: 12% !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .corner-white {
    z-index: 210 !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .corner-white .age-img {
    bottom: max(22px, 3.5svh);
  }
  body.reference-home:has(#winterEntryForm) .container-home .corner-white .tuborg-da-tonul-logo {
    bottom: 14px;
  }
  body.reference-home:has(#winterEntryForm) .winter-tree {
    bottom: 12px !important;
  }
  body.reference-home:has(#winterEntryForm) .container-footer {
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    margin: 0;
    padding: 16px 12px 24px;
    background: #072f80 !important;
    box-shadow: none;
    z-index: 220;
  }
  body.reference-home:has(#winterEntryForm) .container-footer::before {
    content: '';
    position: absolute;
    inset: -14px 0 auto;
    height: 14px;
    background: linear-gradient(to bottom, transparent, #072f80);
    pointer-events: none;
  }
  body.reference-home:has(#winterEntryForm) .container-footer .footer-item {
    padding: 6px !important;
    font-size: 14px;
    line-height: 1.4;
  }
  body.reference-home:has(#winterEntryForm) .container-footer .text-powered-by {
    font-size: 12px;
  }
}

/* Pe ecranele scunde, premiile instant împart un rând pentru a rămâne vizibile. */
@media (max-width: 599px) and (orientation: portrait) {
 @container mobile-campaign (max-height: 600px) {
  body.reference-home:has(#winterEntryForm) .container-home .premii-container {
    top: calc(var(--mobile-title-top) + min(74vw, 46svh)) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prizes {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) 22px minmax(0, 1.1fr) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize.prize-item2 {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize.prize-item3 {
    grid-column: 2 !important;
    grid-row: 3 !important;
    margin-left: 0 !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize.prize-item4 {
    grid-column: 3 !important;
    grid-row: 3 !important;
    width: 100% !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize:not(.grand-prize) .prize-image {
    height: calc(100% - 42px) !important;
  }
  body.reference-home:has(#winterEntryForm) .container-home .premii-container .winter-prize:not(.grand-prize) .prize-name {
    white-space: normal;
  }
  body.reference-home:has(#winterEntryForm) .container-home .bottle-with-lines-mobile .winter-standard-bottle {
    left: 2rem !important;
  }
 }
}
