/* Hide platform-specific controls and the desktop QR code when appropriate. */
html[data-download-platform="ios"] [data-download-for="android"],
html[data-download-platform="android"] [data-download-for="ios"],
html[data-download-platform="ios"] .g-main-qr,
html[data-download-platform="android"] .g-main-qr,
html[data-download-platform="ios"] .g-campaign-qr,
html[data-download-platform="android"] .g-campaign-qr {
  display: none !important;
}

.g-main-downloads { width: min(1060px, calc(100% - 185px)); }
.g-main-platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-more-download { grid-column: 1 / -1; }
@media (min-width: 851px) {
  .g-main-downloads { align-items: center; bottom: 108px; }
  .g-home-screen .g-bottom-socials { bottom: 45px; }
  .g-main-qr { --download-qr-size: 104px; }
  .g-main-platforms { position: relative; align-items: center; }
  .g-main-platforms .g-more-download {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-height: 26px;
    padding: 3px;
  }
}
@media (min-width: 851px) and (max-height: 800px) {
  .g-home-screen .g-main-art { bottom: 60px; }
  .g-main-downloads { bottom: 68px; }
  .g-home-screen .g-bottom-socials { bottom: 13px; }
}
.g-campaign-downloads {
  display: grid;
  grid-template-columns: clamp(112px, 10vw, 144px) repeat(3, minmax(0, 1fr));
  align-items: center;
  width: min(1120px, calc(100% - 180px));
  bottom: max(138px, 12vh);
}
.g-campaign-qr {
  display: block;
  padding: 5px;
  border: 1px solid rgba(236, 215, 164, .8);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 3px 14px #0005;
}
.g-campaign-qr img { display: block; width: 100%; height: auto; }
.g-campaign-downloads .g-download {
  min-width: 0;
  width: 100%;
  font-size: clamp(15px, 1.65vw, 28px);
}

html[data-download-platform="android"] .g-main-platforms,
html[data-download-platform="android"] .g-campaign-downloads {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html[data-download-platform="ios"] .g-campaign-downloads {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.g-download.g-download-apple:disabled,
.g-dialog .dialog-platforms .button:disabled {
  cursor: default;
}
.g-download.g-download-apple:disabled:hover,
.g-dialog .dialog-platforms .button:disabled:hover {
  transform: none;
  filter: none;
}
.g-download.g-download-platform,
.g-dialog .dialog-platforms .g-download-platform {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: 74px;
  padding: 12px 18px;
  gap: 12px;
  border: 1px solid #d1c3a38c;
  border-radius: 6px;
  background: linear-gradient(160deg, #26313be8, #111a24e8);
  color: #f4f0e6;
  box-shadow: inset 0 1px 0 #fff1, 0 5px 16px #0002;
  text-align: center;
  font-size: clamp(17px, 1.45vw, 24px);
  font-weight: 500;
  line-height: 1;
  transition: background .18s, border-color .18s;
}
.g-download-platform > .g-download-label {
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
}
.g-download.g-download-platform.g-download-primary,
.g-dialog .dialog-platforms .g-download-primary {
  background: linear-gradient(150deg, #f0e5cd, #d8c59d);
  border-color: #f6e9c6;
  color: #24303c;
}
.g-download.g-download-platform > .g-icon,
.g-dialog .dialog-platforms .g-download-platform > .g-icon {
  display: block;
  grid-area: auto;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.g-download-platform > .g-apple-logo { filter: brightness(0) invert(1); }
.g-download.g-download-platform:hover,
.g-dialog .dialog-platforms .g-download-platform:hover {
  transform: none;
  filter: none;
  border-color: #f2dfb3;
}
.g-dialog .dialog-platforms .g-download-platform { height: 64px; font-size: 18px; }

@media (min-width: 681px) and (max-width: 1100px) {
  .g-main-platforms .g-download { font-size: 17px; gap: 8px; padding-inline: 10px; }
}
@media (min-width: 681px) and (max-width: 850px) {
  .g-main-platforms { grid-template-columns: minmax(0, 1fr); }
  .g-main-platforms .g-download.g-download-platform { height: 54px; }
  .g-campaign-downloads { gap: 10px; width: calc(100% - 112px); }
  .g-campaign-downloads .g-download { padding-inline: 10px; gap: 8px; }
}
@media (max-width: 680px) {
  .g-main-qr, .g-campaign-qr { display: none; }
  .g-main-downloads { width: calc(100% - 40px); }
  .g-main-platforms,
  html[data-download-platform="android"] .g-main-platforms {
    grid-template-columns: minmax(0, 1fr);
  }
  .g-campaign-downloads { width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-campaign-downloads .g-download { font-size: 16px; }
  .g-download.g-download-platform { height: 64px; padding-inline: 10px; gap: 9px; font-size: 17px; }
  .g-download.g-download-platform > .g-icon { width: 26px; height: 26px; }
  html[data-download-platform="ios"] .g-campaign-downloads {
    left: 24px;
    right: 58px;
    margin-inline: auto;
  }
  html[data-download-platform="ios"] .g-main-platforms .g-download.g-download-platform { height: 64px; }
  html[data-download-platform="desktop"] .g-campaign-downloads > :last-child { grid-column: 1 / -1; }
  html[data-download-platform="desktop"] .g-campaign-screen .g-season-copy { bottom: 310px; }
}
@media (max-width: 370px) {
  .g-campaign-downloads .g-download { font-size: 14px; }
}
