/* Shared split download control. Unreleased installers never have a link. */
.os-download {
  --download-fill: var(--ink);
  --download-text: var(--paper, #fff);
  position: relative;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid var(--download-fill);
  border-radius: 7px;
  vertical-align: middle;
  background: var(--download-fill);
  color: var(--download-text);
}

.product-page .os-download {
  --download-fill: var(--green);
  --download-text: #fff;
}

.os-download.download-secondary {
  --download-fill: transparent;
  --download-text: var(--ink);
  border-color: var(--line-strong, var(--line));
}

.os-download .download-main,
.os-download .download-choices > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px 0 0 6px;
  background: transparent;
  color: inherit;
  font: 550 15px/1.4 var(--eos-font-sans, sans-serif);
  text-decoration: none;
  cursor: pointer;
}

.download-main {
  min-width: 0;
  flex: 1;
}

.download-main svg {
  flex-shrink: 0;
}

.os-download .download-main[hidden] {
  display: none;
}

.os-download .download-main:disabled {
  cursor: default;
}

.os-download:has(.download-main:disabled) {
  background: var(--surface-2, #efede8);
  border-color: var(--line-strong, var(--line));
  color: var(--muted);
}

.os-download .download-choices {
  display: flex;
  color: inherit;
}

.os-download .download-choices > summary {
  width: 44px;
  padding: 12px;
  border-left: 1px solid currentColor;
  border-radius: 0 6px 6px 0;
  list-style: none;
}

.download-choices > summary::-webkit-details-marker {
  display: none;
}

.os-download .download-main:not(:disabled):hover,
.os-download .download-choices > summary:hover {
  background: #8882;
  text-decoration: none;
}

.os-download :is(a, button, summary):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.download-choices[open] > summary svg {
  transform: rotate(180deg);
}

.download-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: max(100%, 300px);
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card, #fff);
  color: var(--ink);
  box-shadow: 0 12px 32px #1c191514;
}

.download-panel-title {
  padding: 5px 10px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.os-download .os-download-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}

.os-download-option > span:first-child {
  display: grid;
  gap: 3px;
}

.os-download-option strong {
  font-weight: 550;
}

.os-download-option small,
.download-badge {
  font-size: 12px;
  color: var(--muted);
}

.download-badge {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
}

.os-download a.os-download-option:hover {
  background: var(--surface-2, #efede8);
}

.os-download-option.is-unavailable {
  color: var(--muted);
}

@media (max-width: 480px) {
  .download-panel {
    /* Also fits padded product tiles when JavaScript is unavailable. */
    max-width: calc(100vw - 96px);
  }
}
