/*
 * iDrugstore PWA Home v20.0
 * Root-cause override for legacy hidden footer and inherited white text.
 */
@media (max-width:1024px) {
  /* Light content owns a dark foreground by default. */
  body.id-pwa-native.id-pwa-page-index #main-content,
  body.id-pwa-native.id-pwa-page-index #main-content :where(
    h1,h2,h3,h4,h5,h6,p,span,strong,small,label,li,dt,dd,a
  ) {
    color:#17212b!important;
    -webkit-text-fill-color:#17212b!important;
  }

  body.id-pwa-native.id-pwa-page-index #main-content :where(p,small,dd) {
    color:#536170!important;
    -webkit-text-fill-color:#536170!important;
  }

  /* White is allowed only inside surfaces that are explicitly dark/red. */
  body.id-pwa-native.id-pwa-page-index #main-content :where(
    .parallax-home,
    .id-stats-section,
    .id-merchant-cta
  ),
  body.id-pwa-native.id-pwa-page-index #main-content :where(
    .parallax-home,
    .id-stats-section,
    .id-merchant-cta
  ) :where(h1,h2,h3,h4,h5,h6,p,span,strong,small,label,li,dt,dd,a) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }

  /* Buttons on brand/dark fills must retain a white foreground. */
  body.id-pwa-native.id-pwa-page-index #main-content :where(
    .id-btn-primary,
    .green-button,
    button[type="submit"],
    .id-merchant-cta a
  ),
  body.id-pwa-native.id-pwa-page-index #main-content :where(
    .id-btn-primary,
    .green-button,
    button[type="submit"],
    .id-merchant-cta a
  ) :where(span,strong,small,i,svg) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }

  /*
   * v13/v16 hid these with display:none!important. Re-enable the real footer
   * instead of styling an element that never participates in layout.
   */
  body.id-pwa-native.id-pwa-page-index .section-subcribe {
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:30px clamp(16px,4.5vw,28px)!important;
    background:#d41421!important;
    color:#fff!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-subcribe > .container {
    width:min(100%,760px)!important;
    min-width:0!important;
    max-width:760px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-subcribe :where(h1,h2,h3,p,span,strong,small,label) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer {
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:260px!important;
    margin:0!important;
    padding:32px 0 calc(104px + env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
    background:#0b1220!important;
    color:#e2e8f0!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer > .container {
    display:block!important;
    box-sizing:border-box!important;
    width:min(100%,760px)!important;
    min-width:0!important;
    max-width:760px!important;
    margin:0 auto!important;
    padding:0 clamp(16px,4.5vw,28px)!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer :where(h1,h2,h3,h4,h5,h6,strong) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer :where(p,span,small,a) {
    color:#cbd5e1!important;
    -webkit-text-fill-color:#cbd5e1!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer .row {
    display:grid!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer .row > [class*="col-"] {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
  }

  body.id-pwa-native.id-pwa-page-index .section-footer .id-footer-bottom {
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:24px 0 0!important;
    padding:20px 0 0!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:8px!important;
    border-top:1px solid rgba(255,255,255,.14)!important;
  }
}

