/* theme-picker — appearance dialog: mode, accent swatches, theme grid with mini previews */
.theme-picker {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.theme-picker__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-5);
}

.theme-picker__label {
  min-width: 90px;
  color: var(--c-text-dim);
}

/* swatches — accent colour choice */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.swatches__item {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--c-text);
  font-size: var(--fs-s);
  font-weight: 700;
  cursor: pointer;
}

.swatches__item--auto {
  border: 1px dashed var(--c-text-faint);
}

.swatches__item--active {
  border: 2px solid var(--c-text);
}

.swatches__dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.swatches__dot--rainbow {
  background: conic-gradient(#e34948, #eda100, #1baf7a, #2a78d6, #4a3aa7, #e87ba4, #e34948);
}

.swatches__custom {
  overflow: hidden;
}

.swatches__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* theme grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: var(--sp-4);
  list-style: none;
}

.theme-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid;
  border-color: var(--bevel-card);
  border-radius: var(--r-panel);
  background: var(--c-card-bg);
  color: var(--c-text);
  text-align: left;
  cursor: pointer;
}

.theme-card:hover {
  background: var(--c-card-hover, var(--c-bg-hover));
}

.theme-card--active {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}

.theme-card__preview {
  position: relative;
  display: block;
  height: 54px;
  border-bottom: 1px solid var(--c-dark);
}

.theme-card__bar {
  position: absolute;
  inset: 0 0 auto;
  height: 14px;
}

.theme-card__line {
  position: absolute;
  top: 24px;
  left: 10px;
  width: 45%;
  height: 4px;
  border-radius: 2px;
  opacity: 0.85;
}

.theme-card__dot {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 28px;
  height: 12px;
  border-radius: 3px;
}

.theme-card__name {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4) 0;
  font-weight: 700;
}

.theme-card__default {
  color: var(--c-text-faint);
  font-size: var(--fs-xs);
  font-weight: 400;
  text-transform: uppercase;
}

.theme-card__desc {
  display: -webkit-box;
  overflow: hidden;
  margin: var(--sp-1) var(--sp-4) var(--sp-4);
  color: var(--c-text-faint);
  font-size: var(--fs-xs);
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
