Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

23.7 KB
Raw Blame
/*
 * Settings — System Settings idiom.
 * Rows live inside grouped inset lists (`.card` = group), label left, control
 * right, hairline separators, 40pt rows. Drill lists use chevrons. No card
 * shadows: depth is one surface step above the pane.
 */

.settings {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  gap: var(--space-3);
  width: 100%;
  max-width: none;
}

.settings.settings-mac {
  align-items: stretch;
  min-height: 0;
  flex: 1;
  padding: 0;
  gap: 0;
}

.settings > :global(*) {
  width: 100%;
}

.settings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 12rem;
}

.settings-search-row {
  display: flex;
  padding: 0 0 var(--space-2);
}

.settings-search {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--space-2) 0 28px;
  background: var(--control-bg);
  color: var(--text);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  font-size: var(--text-base);
  outline: none;
  transition: box-shadow var(--duration-fast) var(--ease-out);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23888'><path d='M8.5 2.5a6 6 0 1 0 3.67 10.74l3.8 3.79a1 1 0 0 0 1.41-1.41l-3.79-3.8A6 6 0 0 0 8.5 2.5zM4.5 8.5a4 4 0 1 1 8 0 4 4 0 0 1-8 0z'/></svg>");
  background-repeat: no-repeat;
  background-position: 9px center;
  background-size: 13px 13px;
}

.settings-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.settings-search:focus {
  box-shadow:
    inset 0 0 0 var(--hairline) var(--accent),
    0 0 0 3px var(--accent-soft);
}

.settings-content :global(mark.settings-search-hit) {
  padding: 0 1px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: inherit;
  font-weight: 600;
}

.category-tabs.searching {
  opacity: 0.5;
  pointer-events: auto;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.settings-panel.is-hidden {
  display: none !important;
}

.settings-panel:not(.is-hidden) ~ .settings-panel:not(.is-hidden) {
  margin-top: var(--space-6);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--fill-3);
  border-top-color: var(--text-muted);
  border-radius: 50%;
  animation: spin var(--duration-slow) linear infinite;
}

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

.section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.section + .section {
  margin-top: var(--space-4);
}

.settings-section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--space-5);
  margin-top: 0;
}

.settings-section-head:first-child {
  padding-top: 0;
  margin-top: 0;
}

.settings-section-head .section-title {
  margin-bottom: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  font-weight: 700;
  letter-spacing: var(--track-tight);
}

/* h5.section-title directly above a group reads as a System Settings group label */
.section > .section-title,
.section > h5.section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-dim);
  margin: 0 0 var(--space-1) var(--space-2);
}

.section-title {
  font-size: var(--text-md);
}

.settings-section-hint {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-dim);
  margin: 0 0 var(--space-2) 0;
  line-height: var(--leading-base);
  max-width: 60ch;
}

.platform-subhead {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dim);
  margin: var(--space-4) 0 var(--space-1) var(--space-2);
}

.platform-subhead:first-child {
  margin-top: 0;
}

/* ---------- Group (card) + rows ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  padding: 0 var(--space-3);
}

.card > .setting-row + .setting-row,
.card > .divider + .setting-row {
  border-top: var(--hairline) solid var(--separator);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  min-height: var(--row-base);
}

.setting-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.setting-label {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text);
}

.setting-path {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: var(--leading-sm);
}

.divider {
  height: 0;
  background: none;
}

/* ---------- Controls ---------- */

.select {
  height: var(--control-h);
  padding: 0 26px 0 var(--space-3);
  font-size: var(--text-base);
  font-weight: 400;
  background-color: var(--control-bg);
  border-radius: var(--radius-sm);
  color: var(--text);
  border: none;
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  cursor: pointer;
  flex-shrink: 0;
  max-width: 260px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 4.75 6 2.25l2.5 2.5M3.5 7.25 6 9.75l2.5-2.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
}

.select:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.input-number,
.input-hotkey,
.input-text,
.input-template,
.naming-input,
.downloads-speed-input,
.flag-value-input {
  height: var(--control-h);
  padding: 0 var(--space-2);
  font-size: var(--text-base);
  font-weight: 400;
  background: var(--control-bg);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  color: var(--text);
  border: none;
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

.input-number:focus-visible,
.input-hotkey:focus-visible,
.input-text:focus-visible,
.input-template:focus-visible,
.naming-input:focus-visible,
.downloads-speed-input:focus-visible,
.flag-value-input:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 var(--hairline) var(--accent),
    0 0 0 3px var(--accent-soft);
}

.input-number {
  width: 72px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.input-hotkey {
  width: 180px;
  font-size: var(--text-sm);
  text-align: center;
  flex-shrink: 0;
}

.input-text {
  flex: 1;
  min-width: 120px;
  max-width: 220px;
}

.input-template {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.naming-input {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.downloads-speed-input {
  width: 88px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.flag-value-input {
  width: 70px;
  height: 22px;
  font-size: var(--text-xs);
  border-radius: 4px;
}

.hotkey-row {
  flex-wrap: wrap;
}

.hotkey-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-end;
}

.hotkey-mode-switch {
  display: flex;
  gap: 1px;
  padding: 2px;
  background: var(--fill-2);
  border-radius: var(--radius-md);
}

.hotkey-mode-btn {
  height: 22px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.hotkey-mode-btn.active {
  background: var(--surface-hi);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(var(--shadow-ink), var(--elev-alpha-1)), inset 0 0 0 var(--hairline) var(--content-border);
}

.hotkey-mode-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.hotkey-record-btn {
  cursor: pointer;
  user-select: none;
}

.hotkey-record-btn.recording {
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: hotkey-pulse calc(var(--duration-bounce) * 3) var(--ease-in-out) infinite;
}

@keyframes hotkey-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 3px transparent; }
}

.template-row {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}

.template-preview {
  padding: 0 0 var(--space-3);
}

.template-preview .setting-path {
  word-break: break-all;
  white-space: normal;
}

/* switch — the primitive in primitives.css already styles .toggle; keep the
   legacy 44px name compatible by not overriding it here. */

.reset-btn {
  height: var(--control-h);
  padding: 0 var(--space-3);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

@media (hover: hover) {
  .reset-btn:hover {
    background: var(--danger);
    color: var(--on-status);
  }
}

/* ---------- Presets / chips ---------- */

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

@media (max-width: 720px) {
  .preset-grid {
    grid-template-columns: 1fr;
  }
}

.preset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: box-shadow var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

@media (hover: hover) {
  .preset-card:hover {
    background: var(--surface-hi);
  }
}

.preset-card.active {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
}

.preset-card:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.preset-label {
  font-weight: 600;
  font-size: var(--text-base);
}

.preset-desc {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--text-dim);
}

.sb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-1) 0 var(--space-2);
}

.sb-chip {
  height: 24px;
  padding: 0 var(--space-3);
  border: none;
  border-radius: 999px;
  background: var(--fill-1);
  color: var(--text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) {
  .sb-chip:hover {
    background: var(--fill-2);
    color: var(--text);
  }
}

.sb-chip.on {
  background: var(--accent-soft);
  color: var(--accent-hi);
}

.sb-chip:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.ghost-btn {
  height: var(--control-h);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
}

@media (hover: hover) {
  .ghost-btn:hover {
    background: var(--fill-2);
  }
}

.naming-block {
  padding: var(--space-3) 0 var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.naming-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.naming-label {
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.naming-help {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin: var(--space-1) 0 0;
  line-height: 1.4;
}

.path-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: var(--warning);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.path-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.speed-limit {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Disclosure ---------- */

.settings-disclosure > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
}

.settings-disclosure > summary::-webkit-details-marker {
  display: none;
}

.settings-disclosure > summary::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background: currentColor;
  clip-path: polygon(30% 10%, 75% 50%, 30% 90%, 22% 82%, 58% 50%, 22% 18%);
  transition: transform var(--duration-fast) var(--ease-out);
  color: var(--text-dim);
}

.settings-disclosure[open] > summary::before {
  transform: rotate(90deg);
}

.settings-disclosure-hint {
  margin: 0 0 var(--space-2) 1.1em;
}

.settings-disclosure-nested > summary {
  border-top: none;
  padding-top: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-base);
}

/* ---------- Drill-down list ---------- */

.settings-drill-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
}

.settings-drill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 52px;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-3);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: background var(--duration-fast) var(--ease-out);
  position: relative;
}

.settings-drill-item + .settings-drill-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--space-3);
  right: 0;
  height: var(--hairline);
  background: var(--separator);
}

@media (hover: hover) {
  .settings-drill-item:hover {
    background: var(--fill-1);
  }
}

.settings-drill-item:active {
  background: var(--fill-2);
}

.settings-drill-item:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
}

.settings-drill-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  flex-shrink: 0;
}

.settings-drill-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.settings-drill-item-title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}

.settings-drill-item-hint {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.35;
}

.settings-drill-item-chevron {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-faint);
  line-height: 1;
}

.settings-drill-back {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.settings-drill-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  align-self: flex-start;
  height: 24px;
  padding: 0 var(--space-2) 0 var(--space-1);
  margin-left: calc(var(--space-1) * -1);
  border: none;
  background: transparent;
  color: var(--accent-hi);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

@media (hover: hover) {
  .settings-drill-back-btn:hover {
    background: var(--accent-soft);
  }
}

.settings-drill-back-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.settings-drill-back-chevron {
  font-size: 18px;
  line-height: 1;
}

.settings-drill-back-head .section-title {
  margin-bottom: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  font-weight: 700;
  letter-spacing: var(--track-tight);
}

.settings-drill-spacer {
  height: var(--space-3);
}

.settings-subsection-head {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dim);
  margin: var(--space-4) 0 var(--space-1) var(--space-2);
}

.settings-subsection-head:first-child {
  margin-top: 0;
}

/* ---------- Dependencies table ---------- */

.deps-table-wrap {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
}

/* Dependencies table */
.deps-table-wrap {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  padding: 0 var(--space-3);
}

.deps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  table-layout: fixed;
}

.deps-table thead {
  background: transparent;
}

.deps-table th {
  padding: var(--space-3) var(--space-2);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  border-bottom: var(--hairline) solid var(--separator);
}

.deps-table td {
  padding: var(--space-2) var(--space-2);
  vertical-align: middle;
  min-height: var(--row-base);
}

.deps-table th:first-child,
.deps-table .deps-cell-name {
  width: 18%;
  padding-left: 0;
}

.deps-table th:nth-child(2),
.deps-table .deps-cell-version {
  width: 20%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.deps-table th:nth-child(3),
.deps-table .deps-cell-status {
  width: 18%;
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.deps-table th.deps-col-action,
.deps-table .deps-cell-action {
  width: 44%;
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
}

.deps-table .deps-table-row {
  border-bottom: var(--hairline) solid var(--separator);
}

.deps-table .deps-table-row:last-child {
  border-bottom: none;
}

.dep-ok {
  color: var(--success);
}

.dep-missing {
  color: var(--danger);
}

.dep-btn {
  height: 24px;
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.dep-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--fill-3);
  border-top-color: var(--text-muted);
  border-radius: 50%;
  animation: spin var(--duration-slow) linear infinite;
  flex-shrink: 0;
}

/* ---------- Update banner ---------- */

.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  margin: var(--space-4) var(--space-5) 0;
  background: var(--accent);
  border-radius: var(--radius-lg);
}

.update-text {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--on-accent);
}

.update-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-h);
  padding: 0 var(--space-3);
  font-size: var(--text-base);
  font-weight: 600;
  background: color-mix(in srgb, var(--on-accent) 14%, transparent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.update-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

@media (hover: hover) {
  .update-btn:not(:disabled):hover {
    background: color-mix(in srgb, var(--on-accent) 22%, transparent);
  }
}

.update-btn:focus-visible {
  outline: 2px solid var(--on-accent);
  outline-offset: 2px;
}

.update-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, var(--on-accent) 30%, transparent);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  animation: spin var(--duration-slow) linear infinite;
}

/* ---------- Flags ---------- */

.flag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-3) 0;
}

.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 26px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--fill-1);
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  user-select: none;
}

@media (hover: hover) {
  .flag-chip:hover {
    background: var(--fill-2);
    color: var(--text);
  }
}

.flag-chip.active {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- Category tabs (legacy, still used inside some panels) ---------- */

.category-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 2px;
  background: var(--fill-2);
  border-radius: var(--radius-md);
}

.cat-tab {
  height: 24px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.cat-tab.active {
  background: var(--surface-hi);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(var(--shadow-ink), var(--elev-alpha-1)), inset 0 0 0 var(--hairline) var(--content-border);
}

@media (hover: hover) {
  .cat-tab:not(.active):hover {
    color: var(--text);
  }
}

.cat-tab:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* ---------- Theme picker ---------- */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.more-themes {
  padding: 0 0 var(--space-2);
}

.more-themes-toggle {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-2);
  padding: var(--space-2) 0;
  text-align: left;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--accent-hi);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

@media (hover: hover) {
  .more-themes-toggle:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

.more-themes-toggle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.more-themes > summary {
  cursor: pointer;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dim);
  user-select: none;
  list-style: revert;
}

.more-themes > summary:hover {
  color: var(--text);
}

.more-themes[open] > summary {
  margin-bottom: var(--space-1);
  color: var(--text);
}

.more-themes > .theme-grid {
  padding: 0;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}

.theme-card:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.theme-card.active .theme-preview {
  box-shadow: 0 0 0 2px var(--pane-bg), 0 0 0 4px var(--accent);
}

.theme-card.active .theme-name {
  color: var(--text);
  font-weight: 600;
}

@media (hover: hover) {
  .theme-card:hover .theme-preview {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-card:hover .theme-preview {
    transform: none;
  }
}

.theme-preview {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 var(--hairline) var(--content-border);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.preview-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-text {
  font-size: 16px;
  font-weight: 600;
}

.preview-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.system-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hi);
}

.theme-name {
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .update-spinner,
  .dep-spinner {
    animation: settings-soft-pulse calc(var(--duration-bounce) * 3) var(--ease-in-out) infinite;
  }
}

@keyframes settings-soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}