.download-assets {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.download-assets .download-btn {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--primary-color);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.download-assets .download-btn:hover {
  background-color: var(--primary-hover);
}

.download-assets .download-btn:disabled {
  background-color: var(--light-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.download-assets .download-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.download-assets .download-status {
  width: 100%;
  font-size: 0.9rem;
  color: #555;
  margin-top: 6px;
}

/* Sticky behavior when user selects assets */
.download-assets.is-sticky {
  position: fixed;
  z-index: 1000;
  background: transparent;
  padding: 8px 12px;
  max-width: 1440px;
  margin: auto;
}

/* Full page overlay loader */
.download-assets-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 45%);
}

.download-assets-overlay.is-active {
  display: flex;
}

.download-assets-overlay-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px 22px;
  min-width: 240px;
  box-shadow: 0 8px 22px rgb(0 0 0 / 20%);
  display: grid;
  justify-items: center;
  gap: 10px;
}

.download-assets-overlay-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgb(0 0 0 / 12%);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: download-assets-spin 0.8s linear infinite;
}

.download-assets-overlay-message {
  font-size: 0.95rem;
  color: #333;
  text-align: center;
}

/* Block background actions while overlay is visible */
.download-assets-busy {
  overflow: hidden;
}

.download-assets-busy * {
  pointer-events: none;
}

.download-assets-overlay,
.download-assets-overlay * {
  pointer-events: all;
}

@keyframes download-assets-spin {
  to {
    transform: rotate(360deg);
  }
}

.download-count-badge {
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #d32f2f;
  border-radius: 999px;
  border: 1px solid #fff;
  line-height: 1;
}

/* Page level Select All button */
.page-select-all-btn {
  appearance: none;
  border: 0;
  border-radius: 30px;
  background: var(--primary-color);
  color: #fff;
  padding: 12px 28px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.page-select-all-btn:hover {
  filter: brightness(0.97);
}

.page-select-all-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page-select-all-btn.is-active {
  background: #222;
  color: #fff;
}

/* Dowload Confirmation Popup modal */
.download-confirmation-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
}

.download-confirmation-modal.is-active {
  display: block;
}

/* backdrop */
.download-confirmation-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
}

/* modal box */
.download-confirmation-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px 24px;
  border-radius: 10px;
  width: 320px;
  text-align: center;
  box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
}

.download-confirmation-text {
  font-size: 1rem;
  margin-bottom: 16px;
  color: #333;
}

.download-confirmation-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.download-confirmation-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.confirm-btn {
  background: var(--primary-color);
  color: #fff;
}

.confirm-btn:hover {
  background: var(--primary-hover);
}

.cancel-btn {
  background: var(--light-color);
  color: #333;
}

.cancel-btn:hover {
  background: #e0e0e0;
}