/* Container for the button row. Empty until decorated. */
  [data-bw-download-slot] {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  /* Download button — same Blauw segmented-bar aesthetic as
     shelves' .bs-seg-btn and library's .bl-tab. Self-contained
     values; do not reference --bs-*. */
  .bw-dl {
    appearance: none;
    display: inline-block;
    border: 1px solid #dadada;
    background: #f1f1f1;
    color: #1a1a1a;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 1px;
    cursor: pointer;
    text-decoration: none;
    transition: background 100ms cubic-bezier(.22,.61,.36,1);
    position: relative;
  }
  .bw-dl:hover:not(.is-disabled) {
    background: #ececec;
  }
  .bw-dl.is-disabled {
    color: rgba(26, 26, 26, 0.45);
    cursor: pointer; /* still clickable -> redirect to login */
  }

  /* Pre-decorate spinner — shown in slot before BlauwAuth.ready
     resolves and decorateAll runs. Visual continuity with shelves'
     .bs-spin loader pattern. */
  .bw-dl-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #dadada;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: bw-dl-spin 700ms linear infinite;
  }
  @keyframes bw-dl-spin {
    to { transform: rotate(360deg); }
  }

  /* Tooltip — appears on hover over disabled 4k.
     Q67 copy hardcoded into the markup; Q70 200ms delay via CSS. */
  [data-bw-tooltip] {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: #f1f1f1;
    color: #1a1a1a;
    border: 1px solid #dadada;
    border-radius: 1px;
    padding: 0.5rem 0.75rem;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms cubic-bezier(.22,.61,.36,1) 200ms;
    z-index: 100;
  }
  .bw-dl.is-disabled:hover [data-bw-tooltip] {
    opacity: 1;
  }
