/*
 * Final localized download-card sizing.
 * This file is loaded after public-shell-v2.css so legacy overrides cannot
 * reintroduce fixed 150px copy tracks or compress QR cards at tablet widths.
 */
html[lang]
  .md-typeset
  .okm-download-center
  .okm-download-app-card-v2--with-qr {
  grid-template-columns: 84px minmax(157px, 1fr) 99px !important;
}

html[lang] .md-typeset .okm-download-center .okm-download-app-copy {
  max-width: 100% !important;
  min-width: 157px !important;
  overflow: visible !important;
  width: auto !important;
}

@media screen and (min-width: 721px) and (max-width: 800px) {
  html[lang] .md-typeset .okm-download-app-cards {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[lang]
    .md-typeset
    .okm-download-center
    .okm-download-app-card-v2--with-qr {
    justify-content: stretch !important;
    width: 100% !important;
  }
}

@media screen and (max-width: 720px) {
  html[lang]
    .md-typeset
    .okm-download-center
    .okm-download-app-card-v2--with-qr {
    box-sizing: border-box !important;
    grid-template-columns: 64px minmax(0, 1fr) !important;
    justify-content: stretch !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  html[lang] .md-typeset .okm-download-center .okm-download-app-copy {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media screen and (max-width: 320px) {
  html[lang]
    .md-typeset
    .okm-download-center
    .okm-download-app-card-v2--with-qr {
    grid-template-columns: 52px minmax(0, 1fr) !important;
  }
}

/* Mobile download cards retain their QR codes and use available inline space. */
@media screen and (max-width: 720px) {
  html[lang] .md-typeset .okm-download-center .okm-download-app-card-v2--with-qr {
    grid-template-columns: minmax(0, 1fr) 100px !important;
    grid-template-rows: auto auto !important;
    gap: 12px !important;
    padding: 16px !important;
    height: auto !important;
    overflow: visible !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    width: 48px !important;
    height: 48px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-icon img {
    max-width: 34px !important;
    max-height: 34px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-copy {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start !important;
    gap: 8px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-copy strong,
  html[lang] .md-typeset .okm-download-center .okm-download-app-copy small,
  html[lang] .md-typeset .okm-download-center .okm-download-apple-id-note {
    white-space: normal !important;
    text-overflow: clip !important;
    overflow: visible !important;
    max-width: 100% !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-card-v2 .okm-download-app-qr-inline {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    justify-self: end !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-qr-inline span,
  html[lang] .md-typeset .okm-download-center .okm-download-app-qr-inline img {
    width: 100px !important;
    height: 100px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-qr-inline figcaption {
    width: 100% !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-primary-link {
    width: fit-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    white-space: normal !important;
    justify-self: start !important;
    padding-inline: 12px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-tool-card {
    min-height: 0 !important;
    height: auto !important;
    gap: 6px 12px !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-tool-card strong {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}
@media screen and (min-width: 480px) and (max-width: 720px) {
  html[lang] .md-typeset .okm-download-center .okm-download-app-card-v2--with-qr {
    grid-template-columns: 48px minmax(0, 1fr) 100px !important;
    grid-template-rows: auto !important;
    align-items: center !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-copy {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-card-v2 .okm-download-app-qr-inline {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-tool-card {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-tool-link {
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    margin: 0 !important;
  }
}
@media screen and (max-width: 720px) {
  html[lang] .md-typeset .okm-download-center .okm-download-tool-type {
    white-space: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
/* At the narrowest widths keep full words and download labels intact. */
@media screen and (max-width: 360px) {
  html[lang] .md-typeset .okm-download-center .okm-download-app-copy {
    grid-column: 1 / -1 !important;
  }
  html[lang] .md-typeset .okm-download-center .okm-download-app-card-v2 .okm-download-app-qr-inline {
    grid-row: 1 !important;
  }
}
