/*
 * Pelocate — a search tool, styled like one.
 *
 * The rules of the house:
 *   - One flat background. Separation comes from hairlines, not shadows.
 *   - Purple means interactive or active. It is never decoration.
 *   - Nothing above the results that isn't doing work: on a phone the first
 *     result should be visible without scrolling.
 *   - No text below 12px. Metadata is small, not unreadable.
 */

:root {
  --ink: #1c1d1b;
  --muted: #6b6c66;
  --faint: #93948d;
  --line: #e3e3db;
  --bg: #fbfbf8;
  --surface: #fff;
  --purple: #5a49d6;
  --purple-wash: rgba(90, 73, 214, .07);
  --danger: #c2453b;

  /* Spacing scale — a 4px grid. Reach for these for padding / margin / gap so
     the layout keeps one rhythm; snap a new value to the nearest step rather
     than inventing an in-between. Off-grid literals that remain (6, 7, 10, 14,
     18…) are candidates to migrate onto the scale over time. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radius scale: small (tags/badges), default (cards/inputs/panels), pill. */
  --radius-sm: 4px;
  --radius: 10px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

.content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ---------------- header ---------------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 0 14px;
}

.peloton-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}

.peloton-auth-btn:hover {
  border-color: var(--purple);
  background: var(--purple-wash);
  color: var(--purple);
}

.auth-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  transition: background-color .2s ease;
}

.auth-status-dot.connected {
  background: #2ecc71;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.auth-status-dot.syncing {
  background: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
  animation: pulse-dot 1.2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.auth-status-dot.expired {
  background: #e67e22;
  box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
}

.sync-progress-banner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  margin: 0 0 14px 0;
  font-size: 12px;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: opacity 0.2s ease;
}

.sync-progress-banner.hidden {
  display: none;
}

.sync-progress-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.sync-progress-inner strong {
  color: var(--purple);
  font-weight: 700;
}

.sync-spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.saved-artist-chips-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid #f0f0ed;
  padding-top: 12px;
}

/* "My favourite artists" — one filter that sweeps the whole library. Reads as a
   peer of the activity/language filters; the active state mirrors them. */
.saved-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f7f7f5;
  border: 1px solid #e2e2dd;
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  transition: all 0.15s ease;
}
.saved-music-pill svg { flex: none; }
.saved-music-pill:hover {
  border-color: var(--purple, #7c3aed);
  color: var(--purple, #7c3aed);
}
.saved-music-pill.active {
  background: var(--purple, #7c3aed);
  border-color: var(--purple, #7c3aed);
  color: #ffffff;
  font-weight: 700;
}

.playlist li.fav-track-highlight {
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple, #7c3aed);
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 6px;
  margin: 2px -6px;
}

.logo {
  color: #000000;
  text-decoration: none;
}
.wordmark {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.4px;
}

.wordmark b { color: var(--purple); }

/* ---------------- search ---------------- */

.search-panel {
  background: var(--bg);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.search-input-wrap { position: relative; }

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 19px;
  pointer-events: none;
}

#artist-search {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 92px 0 40px;
  font-size: 16px;            /* under 16px and iOS zooms the page on focus */
  outline: none;
}

#artist-search:focus { border-color: var(--purple); }
#artist-search::placeholder { color: var(--faint); }
/* type=search draws its own clear button on focus, right next to ours. */
#artist-search::-webkit-search-cancel-button { display: none; }

.clear-search {
  position: absolute;
  top: 4px;
  right: 48px;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 22px;
  cursor: pointer;
  display: none;
}

/* Compact and inside the field: the phone keyboard already has a submit key,
   so a full-width button below was 48px spent on a duplicate. */
.search-button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  font-size: 0;
  cursor: pointer;
}

.search-button::after { content: "\2192"; font-size: 18px; line-height: 1; }

/* ---------------- suggestions ---------------- */

.artist-results {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-y: auto;
  max-height: min(58vh, 440px);
}

.suggest-group {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 6px 14px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.artist-choice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 9px 14px;
  text-align: left;
  cursor: pointer;
}

.artist-choice:last-child { border-bottom: 0; }
.artist-choice:hover, .artist-choice:focus-visible { background: var(--purple-wash); }

.artist-choice-image {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

/* Album art is square; only artist portraits are circles. */
.song-choice .artist-choice-image { border-radius: var(--radius-sm); }

.artist-choice-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 17px;
}

.artist-choice-text { min-width: 0; }

.artist-choice-text b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-choice-text small { color: var(--muted); font-size: 12px; }

/* The free-text row leads: it always works, whereas the rows below depend on
   that artist or song existing in the catalogue. */
.artist-choice.free-text .artist-choice-image { background: var(--purple); color: #fff; }
.artist-choice.free-text b { white-space: normal; }

/* ---------------- activity picker ---------------- */

/*
 * Twelve disciplines and up to 21 sub-types will not wrap onto a phone without
 * eating the screen, so each level scrolls sideways — the row height stays
 * fixed however long the list is.
 */
.activity-picker {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.activity-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.activity-row::-webkit-scrollbar { display: none; }

.activity-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.activity-pill:hover { border-color: var(--purple); color: var(--purple); }

.activity-pill.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

/* The count is what makes the choice informed — 1,266 Power Zone rides is a
   different proposition from 3. */
.activity-pill small {
  margin-left: 5px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}

.activity-pill.active small { color: rgba(255, 255, 255, .78); }
.activity-subtypes .activity-pill { font-weight: 500; font-size: 13px; }

/* ---------------- filters ---------------- */

/* ---------------- Merged Filter Control Bar ---------------- */

.filter-control-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 12px;
  padding: 12px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-control-bar.has-filters {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.05);
}

/* A normal flex item in the control bar — NOT display:contents. That detached
   the panel from the flex flow so its 100% basis never forced a wrap: on desktop
   the toggle floated mid-height beside a squashed ~338px panel. Kept compact
   when closed; given its own full-width row (order last) when open. */
.advanced-options {
  min-width: 0;
}
.advanced-options[open] {
  flex-basis: 100%;
  order: 10;
}

/* While the panel is open you edit the filters directly — the panel already
   shows their state (e.g. a highlighted language) — so the summary chips and
   Clear-all in the bar are redundant and only add an awkward extra row above
   the panel. Hide them while open; the panel's own Reset covers clearing. */
.filter-control-bar:has(.advanced-options[open]) .active-filters-chips,
.filter-control-bar:has(.advanced-options[open]) .clear-all-filters-btn {
  display: none;
}

.filter-modal-content {
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.filters-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.filters-toggle-btn::-webkit-details-marker {
  display: none;
}

.filters-toggle-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(124, 58, 237, 0.04);
}

.filters-toggle-btn .filter-icon {
  color: var(--muted);
  transition: color 0.15s ease;
}

.filters-toggle-btn:hover .filter-icon {
  color: var(--purple);
}

.filters-toggle-btn.has-active-filters {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--purple);
  color: var(--purple);
}

.filters-toggle-btn.has-active-filters .filter-icon {
  color: var(--purple);
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.filter-chevron {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.advanced-options[open] .filter-chevron {
  transform: rotate(180deg);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  margin-top: 16px;
}

.difficulty-filter label,
.duration-filter label,
.instructor-filters label,
.language-filters label {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.language-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.language-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.language-pill:hover { border-color: var(--purple); color: var(--purple); }

.language-pill.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.range-display {
  float: right;
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
}

.range-dash { color: var(--faint); margin: 0 3px; }

/*
 * Dual range. The thumbs take no pointer events at all — the track takes the
 * press and decides which thumb was meant (bindRange in app.js), because two
 * native thumbs landing on the same value jam shut and no amount of dragging
 * reopens them. `--thumb` is read from here by that code, so it must stay a
 * length.
 */
.range-sliders {
  --thumb: 18px;
  position: relative;
  height: 34px;
  margin-top: 6px;
}

.range-sliders::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-sm);
  background: var(--line);
  transform: translateY(-50%);
}

.range-fill {
  position: absolute;
  top: 50%;
  height: 3px;
  border-radius: var(--radius-sm);
  background: var(--purple);
  transform: translateY(-50%);
}

.range-sliders input {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
}

.range-sliders input,
.range-sliders input::-webkit-slider-thumb,
.range-sliders input::-moz-range-thumb { pointer-events: none; }

.range-sliders input::-webkit-slider-thumb {
  appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

.range-sliders input::-moz-range-thumb {
  width: var(--thumb);
  height: var(--thumb);
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

/* The input fills the whole track, so its default outline draws a box round
   the entire strip and says nothing about which thumb has focus. */
.range-sliders input:focus-visible { outline: none; }
.range-sliders input:focus-visible::-webkit-slider-thumb,
.range-sliders input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--purple), 0 0 0 4px var(--purple-wash);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 12px;
}

/*
 * Below 580px the duration pair is replaced by chips: an exact length is a
 * one-tap choice, and dragging to "30" is not.
 */
.filter-chips {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.filter-chip {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 9px 15px;
  font-size: 13px;
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
  font-weight: 600;
}

.instructor-filters small {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 12px;
}

/* Type-to-find rather than a wall of pills: search a name, then Show or Hide. */
.ins-search { margin-top: 4px; position: relative; }

#ins-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}
#ins-input:focus { border-color: var(--purple); }
#ins-input::placeholder { color: var(--faint); }

/* The matches float over what's below rather than shoving the panel around. */
.ins-suggest {
  position: absolute;
  z-index: 4;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(28, 29, 27, .12);
}

.ins-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--line);
  padding: 6px 6px 6px 12px;
}
.ins-option:last-child { border-bottom: 0; }

.ins-option-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ins-option-name small { margin-left: 6px; color: var(--faint); font-size: 12px; }

.ins-opt {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ins-opt-show { color: var(--purple); }
.ins-opt-show:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
.ins-opt-hide { color: var(--danger); }
.ins-opt-hide:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.ins-empty { margin: 0; padding: 12px; color: var(--faint); font-size: 13px; }

/* Chosen instructors, grouped under Showing / Hiding. */
.ins-selected:not(:empty) { margin-top: 10px; display: grid; gap: var(--space-2); }

.ins-chip-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ins-chip-label {
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-right: 2px;
}

.ins-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--purple);
  border-radius: var(--radius-pill);
  background: var(--purple);
  color: #fff;
  padding: 6px 10px 6px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ins-chip b { font-size: 16px; font-weight: 400; line-height: 1; opacity: .8; }
.ins-chip:hover b { opacity: 1; }

.ins-chip-group.hide .ins-chip {
  border-color: var(--danger);
  background: var(--danger);
}

.filter-modal-header {
  display: none;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reset-button {
  flex: 1;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  padding: 10px 0;
  cursor: pointer;
}

.reset-button span { color: var(--purple); margin-left: 4px; }

.apply-button {
  min-height: 42px;
  border: 1px solid var(--purple);
  border-radius: var(--radius-pill);
  background: var(--purple);
  color: #fff;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.apply-button:hover {
  background: #4434b0;
}

/* Open filters are long enough that the summary scrolls off the top, so there
   is a way out at the bottom as well as the one you came in by. */
.close-advanced {
  min-height: 42px;
  border: 1px solid var(--purple);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--purple);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.close-advanced:hover { background: var(--purple); color: #fff; }
.close-advanced span { margin-left: 5px; }

/*
 * Desktop filter panel: no dedicated close button — the "Filters" toggle above
 * collapses the panel. The actions read Apply-centered with Reset on the right.
 * (Mobile keeps its own full-screen modal with an × in the header, below.)
 */
@media (min-width: 581px) {
  /* Actions span the whole panel width: Apply centered, Reset to the right.
     grid-row pins both to one row so sparse auto-placement can't push Reset
     onto its own line. */
  .filter-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 6px;
  }
  .filter-actions .apply-button { grid-column: 2; grid-row: 1; justify-self: center; }
  .filter-actions .reset-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex: none;
    text-align: right;
  }
  .filter-actions .close-advanced { display: none; }
}

/* ---------------- results ---------------- */

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 18px 0 12px;
  flex-wrap: wrap;
}

.results-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.results-heading h2 span {
  margin-left: 7px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

/* ---------------- taken filter toggle (above results) ---------------- */

.taken-filter-wrap {
  display: inline-flex;
  align-items: center;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.toggle-control:hover .toggle-label {
  color: var(--ink);
}

.switch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.switch-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.switch-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--line);
  border-radius: var(--radius-pill);
  transition: background 0.2s ease;
  position: relative;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.switch-toggle input:checked + .switch-track { background: var(--purple); }
.switch-toggle input:checked + .switch-track .switch-thumb { transform: translateX(16px); }

.switch-toggle input:focus-visible + .switch-track {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.sort-control {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 12px;
}

.sort-control select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 16px 4px 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235a49d6' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.sort-control select:focus-visible {
  outline: 2px solid var(--purple-wash);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------- active filters summary bar ---------------- */

.active-filters-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.active-filter-chip:hover {
  border-color: #cbd5e1;
}

.active-filter-chip-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  border: 0;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.active-filter-chip-remove:hover {
  background: var(--ink);
  color: #fff;
}

.clear-all-filters-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--purple);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.clear-all-filters-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@media (max-width: 580px) {
  .clear-all-filters-btn {
    margin: 0;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--purple);
  }

  .active-filters-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 1px 0 3px;
  }

  .active-filters-chips::-webkit-scrollbar {
    display: none;
  }

  .active-filter-chip {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 5px 8px 5px 11px;
    min-height: 30px;
  }

  .active-filter-chip-text {
    max-width: 160px;
  }

  .active-filter-chip-remove {
    width: 20px;
    height: 20px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.07);
    color: var(--ink);
  }
}

.artist-songs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.artist-songs::-webkit-scrollbar { display: none; }

.artist-songs-label {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.song-chip {
  flex: 0 0 auto;
  max-width: 15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--purple-wash);
  color: var(--ink);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.song-chip:hover { border-color: var(--purple); color: var(--purple); }



.song-chip small {
  margin-left: 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}

/* The selected song reads as filled, and carries an × so it's obvious a second
   tap removes it. */
.song-chip.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.song-chip.active small { color: rgba(255, 255, 255, .78); }

.song-chip.active::after {
  content: "×";
  margin-left: 8px;
  font-weight: 400;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.class-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.class-art {
  position: relative;
  background: var(--line);
}

.class-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.art-top {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: var(--radius-sm);
  background: rgba(16, 17, 15, .72);
  padding: 3px 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.art-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

/* Language shown as a small flag over the bottom-left of the artwork instead of
   spelled out in the metadata. Missing/other locales fall back to English. The
   white ring keeps it legible over any image. Only non-English classes get a
   flag — English is the default and shows none; German and Spanish are drawn
   with gradients. */
.lang-flag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .55), 0 1px 3px rgba(0, 0, 0, .45);
  z-index: 2;
}

.lang-flag--de { background: linear-gradient(#000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%); }
.lang-flag--es { background: linear-gradient(#c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%); }

.taken-chip {
  border-radius: var(--radius-sm);
  background: #166534;
  padding: 3px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.fav-music-chip {
  border-radius: var(--radius-sm);
  background: #7c3aed;
  padding: 3px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(16, 17, 15, 0.72);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.bookmark-btn:hover {
  background: rgba(225, 29, 72, 0.85);
  border-color: #e11d48;
  color: #fff;
  transform: scale(1.08);
}

.bookmark-btn.is-bookmarked {
  background: #e11d48;
  border-color: #e11d48;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.45);
}

.bookmark-btn.is-bookmarked:hover {
  background: #be123c;
  border-color: #be123c;
}

.heart-icon {
  display: block;
  transition: transform .15s ease;
}

.bookmark-btn:active .heart-icon {
  transform: scale(0.85);
}

.stack-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(16, 17, 15, 0.72);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.stack-btn:hover {
  background: rgba(79, 70, 229, 0.85);
  border-color: #4f46e5;
  color: #fff;
  transform: scale(1.08);
}

.stack-btn.is-stacked {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.45);
}

.stack-btn.is-stacked:hover {
  background: #4338ca;
  border-color: #4338ca;
}

.stack-icon {
  display: block;
  transition: transform .15s ease;
}

.stack-btn:active .stack-icon {
  transform: scale(0.85);
}

.class-card.is-taken {
  border-color: #bbf7d0;
}

.class-card.is-bookmarked {
  border-color: #fecdd3;
}

.class-card.is-stacked {
  border-color: #c7d2fe;
}

.class-card.is-taken.is-bookmarked {
  border-color: #86efac;
}

.card-info { padding: 12px 14px 13px; }

.card-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.meta { color: var(--muted); font-size: 12px; }

/* The artists are why anyone is here, so they read as content — not as a
   headline stamped across a photograph. */
.artist-row {
  margin: 7px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.artist-row.unavailable { color: var(--faint); font-weight: 500; }

.card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: 9px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.playlist { font-size: 13px; min-width: 0; }

.playlist summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--purple);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}

.playlist summary::-webkit-details-marker { display: none; }
.playlist summary::before { content: "\266A\00a0\00a0"; }

.playlist summary .playlist-toggle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--purple);
  background: rgba(90, 73, 214, 0.12);
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;
  transition: transform .2s ease, background-color .15s ease;
}

.playlist summary:hover .playlist-toggle-icon {
  background: rgba(90, 73, 214, 0.24);
}

.playlist[open] summary .playlist-toggle-icon {
  transform: rotate(180deg);
}

.playlist ol {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.playlist li { margin-top: 3px; line-height: 1.45; }
.playlist li span { color: var(--faint); }

.playlist-loading, .playlist-unavailable {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.playlist-loading { margin-top: 8px; }

.class-link {
  flex-shrink: 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.class-link:hover { text-decoration: underline; }

.load-more {
  display: block;
  width: 100%;
  max-width: 320px;
  min-height: 46px;
  margin: 20px auto 0;
  border: 1px solid var(--purple);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.load-more:hover:not(:disabled) { background: var(--purple); color: #fff; }
.load-more:disabled { opacity: .55; cursor: default; }

/* ---------------- states ---------------- */

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.search-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(110, 86, 207, 0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
  flex-shrink: 0;
}

.search-button.loading::after {
  content: "" !important;
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.class-grid.loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.loading-state {
  grid-column: 1 / -1;
  padding: 36px 0;
  color: var(--muted);
  font-size: 13px;
}

.loading-state span { color: var(--purple); margin-left: 6px; }


.empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state span { color: var(--purple); font-size: 26px; }
.empty-state h3 { margin: 10px 0 4px; color: var(--ink); font-size: 16px; }
.empty-state p { margin: 0; font-size: 13px; }

.retry-button {
  margin-top: 14px;
  min-height: 42px;
  border: 1px solid var(--purple);
  border-radius: var(--radius-pill);
  background: var(--purple);
  color: #fff;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 80px);
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 13px;
  opacity: 0;
  transition: .22s;
  z-index: 6;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------------- phone ---------------- */

@media (max-width: 580px) {
  .content { padding: 0 16px 40px; }
  .app-header { padding: 14px 0 10px; }

  /*
   * Refining shouldn't mean scrolling back to the top — but a panel pinned the
   * whole time eats a third of the screen you are reading results on. It
   * leaves on the way down and comes back on the way up.
   */
  .search-panel {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-top: 8px;
    transition: transform .22s ease;
  }

  .search-panel.unpinned { transform: translateY(-100%); }

  /*
   * A sticky box taller than the viewport cannot be scrolled through: top: 0
   * re-pins its top edge every frame, so its lower half is unreachable. When
   * it does not fit, it stops sticking. Applied by updatePanelFit().
   */
  .search-panel.too-tall {
    position: static;
    transform: none;
  }

  /* Bleed the pill rows to the edge so it reads as scrollable. */
  .activity-row { margin: 0 -16px; padding: 0 16px; }
  .activity-pill { min-height: 42px; padding: 10px 15px; font-size: 14px; }
  .activity-subtypes .activity-pill { min-height: 38px; padding: 8px 13px; }

  /* Touch-friendly range sliders for both Difficulty and Length filters. */
  .range-sliders { --thumb: 22px; height: 44px; }

  /* The full-screen modal covers the page, so lock the body behind it. Scoped
     to this breakpoint: on desktop the filter is inline and must not lock. */
  body.modal-open {
    overflow: hidden !important;
  }

  /* Full-screen filter modal overlay on mobile */
  .advanced-options[open] .filter-modal-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px 20px 24px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  }

  /* One column in the narrow full-screen modal (desktop uses two). */
  .filter-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .filter-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
  }

  .close-advanced-icon {
    border: 0;
    background: none;
    font-size: 26px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
  }

  .filter-actions {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .apply-button {
    flex: 1;
    text-align: center;
  }

  .close-advanced {
    display: none;
  }


  .class-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .results-heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 0 10px;
  }
  .results-actions {
    width: 100%;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .taken-filter-wrap {
    margin-right: auto;
  }
  .sort-control {
    margin-left: auto;
  }
  /* Bleed to the edge so it reads as scrollable, like the activity rows. */
  .artist-songs { margin: 0 -16px 14px; padding: 0 16px; }
  .song-chip { min-height: 40px; padding: 9px 14px; font-size: 13px; }
  /* Both sit on one row, so the row's own height is the touch target. */
  .card-foot { padding-top: 10px; padding-bottom: 2px; }
  .playlist summary, .class-link { padding: 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .search-panel, .toast { transition: none; }
}

/* ---------------- Peloton Modal ---------------- */

.peloton-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.peloton-modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: modalSlideUp .2s ease-out;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.peloton-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.peloton-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
}
.modal-close-btn:hover { color: var(--ink); }

.peloton-modal-body {
  padding: 20px;
}

.auth-notice {
  margin: 0 0 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.auth-privacy-details:hover {
  border-color: #d2d2c8;
}

.auth-privacy-details[open] {
  border-color: var(--purple);
  background: var(--surface);
}

.auth-privacy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
}

.auth-privacy-summary::-webkit-details-marker {
  display: none;
}

.auth-privacy-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
}

.privacy-icon {
  color: var(--purple);
  flex-shrink: 0;
}

.privacy-chevron {
  font-size: 13px;
  color: var(--faint);
  transition: transform 0.2s ease;
  line-height: 1;
}

.auth-privacy-details[open] .privacy-chevron {
  transform: rotate(180deg);
  color: var(--purple);
}

.auth-privacy-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.auth-privacy-body p {
  margin: 0 0 6px;
}

.auth-privacy-body p:last-child {
  margin-bottom: 0;
}

.auth-privacy-body strong {
  color: var(--ink);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.form-group input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: var(--surface);
  transition: border-color .15s;
}

.form-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-wash);
}

.form-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fdf2f2;
  border: 1px solid #f8b4b4;
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
}

.form-actions {
  margin-top: 20px;
}

.peloton-submit-btn {
  width: 100%;
  height: 44px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: opacity .15s;
}

.peloton-submit-btn:hover {
  opacity: 0.92;
}

.peloton-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.peloton-connected-state {
  text-align: center;
  padding: 6px 0;
}

.connected-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 14px 16px;
  border-radius: 8px;
  text-align: left;
  margin-bottom: 18px;
}

.connected-badge .check-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2ecc71;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.connected-badge strong {
  display: block;
  font-size: 14px;
  color: #166534;
}

.connected-badge p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #15803d;
}

.sync-timestamp-info {
  margin: 4px 0 0 !important;
  font-size: 12px !important;
  color: #166534 !important;
  opacity: 0.85;
}

.modal-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.peloton-resync-btn {
  flex: 1;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--purple);
  color: var(--purple);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .15s ease;
}

.peloton-resync-btn:hover {
  background: var(--purple-wash);
}

.peloton-resync-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.peloton-disconnect-btn {
  flex: 1;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--danger);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s;
}

.peloton-disconnect-btn:hover {
  background: #fdf2f2;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

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

