/* BACKLINE v0.26b – Theme Engine contract + generic component adapter.
   Component/layout CSS remains responsible for geometry. This layer owns the visual contract
   used by selectable themes. Future themes can define the tokens below and only add bespoke
   selectors when the generic adapter is not enough. */
html[data-ui-theme]{
  --theme-page-bg:var(--bg,#050505);
  --theme-surface-1:var(--panel,#090909);
  --theme-surface-2:var(--panel2,#101010);
  --theme-line:var(--line,#444);
  --theme-text:var(--text,#f4f4ef);
  --theme-muted:var(--muted,#a9a9a2);
  --theme-accent:var(--accent,#f5f5ef);
  --theme-ok:var(--ok,#72e29a);
  --theme-warn:var(--warn,#f0d36f);
  --theme-danger:var(--danger,#ff8e8e);
  --theme-shadow:var(--shadow,0 14px 36px rgba(0,0,0,.5));
  --theme-panel-bg:var(--theme-surface-1);
  --theme-card-bg:var(--theme-surface-2);
  --theme-card-border:var(--theme-line);
  --theme-button-bg:var(--theme-surface-2);
  --theme-button-text:var(--theme-text);
  --theme-button-border:var(--theme-line);
  --theme-button-active-bg:var(--theme-accent);
  --theme-button-active-text:var(--theme-page-bg);
  --theme-input-bg:var(--theme-surface-1);
  --theme-input-text:var(--theme-text);
  --theme-input-border:var(--theme-line);
  --theme-heading-bg:var(--theme-text);
  --theme-heading-text:var(--theme-page-bg);
  --theme-calendar-bg:var(--theme-surface-1);
  --theme-calendar-day-bg:var(--theme-surface-1);
  --theme-event-bg:var(--theme-surface-2);
  --theme-modal-bg:var(--theme-surface-1);
  color-scheme:dark;
}

/* Generic full-coverage adapter for any non-standard registered theme.
   STANDARD intentionally remains the exact proven BACKLINE baseline. */
html[data-ui-theme]:not([data-ui-theme="standard"]) body{color:var(--theme-text);}
html[data-ui-theme]:not([data-ui-theme="standard"]) .card,
html[data-ui-theme]:not([data-ui-theme="standard"]) .toolbar,
html[data-ui-theme]:not([data-ui-theme="standard"]) .update-panel,
html[data-ui-theme]:not([data-ui-theme="standard"]) .statusbar,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-strip,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-strip,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-card,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-card{
  background:var(--theme-panel-bg);color:var(--theme-text);border-color:var(--theme-card-border);box-shadow:var(--theme-shadow);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .genre,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue,
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-row,
html[data-ui-theme]:not([data-ui-theme="standard"]) .big-card,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-person,
html[data-ui-theme]:not([data-ui-theme="standard"]) .info,
html[data-ui-theme]:not([data-ui-theme="standard"]) .time-box,
html[data-ui-theme]:not([data-ui-theme="standard"]) .band-about,
html[data-ui-theme]:not([data-ui-theme="standard"]) .preview-box,
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-social-actions,
html[data-ui-theme]:not([data-ui-theme="standard"]) .mobile-day,
html[data-ui-theme]:not([data-ui-theme="standard"]) .mobile-agenda-event{
  background:var(--theme-card-bg);color:var(--theme-text);border-color:var(--theme-card-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .section-title,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-group-title,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list-divider,
html[data-ui-theme]:not([data-ui-theme="standard"]) .big-list-label,
html[data-ui-theme]:not([data-ui-theme="standard"]) .weekday,
html[data-ui-theme]:not([data-ui-theme="standard"]) .mobile-day-head{
  background:var(--theme-heading-bg);color:var(--theme-heading-text);border-color:var(--theme-card-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) button,
html[data-ui-theme]:not([data-ui-theme="standard"]) .ticket,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-external{
  border-color:var(--theme-button-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .actions button,
html[data-ui-theme]:not([data-ui-theme="standard"]) .view-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .nav-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-quick button,
html[data-ui-theme]:not([data-ui-theme="standard"]) .mode-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .subview-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .calendar-refresh-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .refresh-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .source-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .social-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-open-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .preview-mini-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .my-status-view-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .preview-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-control,
html[data-ui-theme]:not([data-ui-theme="standard"]) .big-ticket,
html[data-ui-theme]:not([data-ui-theme="standard"]) .watch-btn{
  background:var(--theme-button-bg);color:var(--theme-button-text);border-color:var(--theme-button-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .view-btn.active,
html[data-ui-theme]:not([data-ui-theme="standard"]) .mode-btn.active,
html[data-ui-theme]:not([data-ui-theme="standard"]) .subview-btn.active,
html[data-ui-theme]:not([data-ui-theme="standard"]) .social-btn.active,
html[data-ui-theme]:not([data-ui-theme="standard"]) .social-btn.primary,
html[data-ui-theme]:not([data-ui-theme="standard"]) .my-status-view-btn.active,
html[data-ui-theme]:not([data-ui-theme="standard"]) .watch-btn.active{
  background:var(--theme-button-active-bg);color:var(--theme-button-active-text);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) input,
html[data-ui-theme]:not([data-ui-theme="standard"]) select,
html[data-ui-theme]:not([data-ui-theme="standard"]) textarea{
  background:var(--theme-input-bg);color:var(--theme-input-text);border-color:var(--theme-input-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .calendar{background:var(--theme-calendar-bg);border-color:var(--theme-card-border);}
html[data-ui-theme]:not([data-ui-theme="standard"]) .day{background:var(--theme-calendar-day-bg);border-color:var(--theme-card-border);}
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-mini{background:var(--theme-event-bg);border-color:var(--theme-card-border);}
html[data-ui-theme]:not([data-ui-theme="standard"]) .modal-card{background:var(--theme-modal-bg);color:var(--theme-text);border-color:var(--theme-card-border);}
html[data-ui-theme]:not([data-ui-theme="standard"]) .pill,
html[data-ui-theme]:not([data-ui-theme="standard"]) .tag,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-badge,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-chip{background:var(--theme-card-bg);color:var(--theme-muted);border-color:var(--theme-card-border);}
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-meta,
html[data-ui-theme]:not([data-ui-theme="standard"]) .big-meta,
html[data-ui-theme]:not([data-ui-theme="standard"]) .mobile-event-meta,
html[data-ui-theme]:not([data-ui-theme="standard"]) .time-sub{color:var(--theme-muted);}

.appearance-switch{grid-template-columns:repeat(auto-fit,minmax(92px,1fr));}

/* High-specificity adapters for legacy components that historically carried their own
   black/white paint. These are the reason a new theme can now cover the whole UI without
   hunting through old component files. */
html[data-ui-theme]:not([data-ui-theme="standard"]) .old-mode-toggle,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.favorite-group .venue,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.all-venues .venue,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-manager-section,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-manager-row,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-event-invite,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-own-code,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-qr-scanner,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-user-block,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-delete-form,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-open-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-card,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-types span,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-actions button{
  background:var(--theme-card-bg);color:var(--theme-text);border-color:var(--theme-card-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .old-mode-toggle.active,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-types input:checked+span,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-actions .feedback-send{
  background:var(--theme-button-active-bg);color:var(--theme-button-active-text);border-color:var(--theme-accent);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .old-mode-state,
html[data-ui-theme]:not([data-ui-theme="standard"]) .old-mode-toggle.active .old-mode-state,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.favorite-group .venue .label,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.all-venues .venue .label,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.favorite-group .venue .count,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.all-venues .venue .count,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.favorite-group .venue .venue-fav-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.all-venues .venue .venue-fav-btn,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-mini,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-add-form button,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-tab,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-submit,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-logout,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-close{
  background:var(--theme-button-bg);color:var(--theme-button-text);border-color:var(--theme-button-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.favorite-group .venue:hover,
html[data-ui-theme]:not([data-ui-theme="standard"]) .venue-list.calm-venues.all-venues .venue:hover,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-open-btn:hover{
  background:var(--theme-panel-bg);color:var(--theme-text);border-color:var(--theme-accent);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .old-mode-main small,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-open-btn small,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-eyebrow,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-intro,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-types legend,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-message-label,
html[data-ui-theme]:not([data-ui-theme="standard"]) .feedback-meta-note,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-help,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-revision,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-manager-title span,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-manager-section>b,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-manager-person span,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-manager-empty,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-event-invite>span,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-own-code span{
  color:var(--theme-muted);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) #feedbackMessage,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-form input,
html[data-ui-theme]:not([data-ui-theme="standard"]) .account-delete-form input,
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-add-form input{
  background:var(--theme-input-bg);color:var(--theme-input-text);border-color:var(--theme-input-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-qr-panel{
  background:var(--theme-panel-bg);color:var(--theme-text);border-color:var(--theme-card-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .friend-qr-frame{
  background:var(--theme-card-bg);border-color:var(--theme-accent);
}


/* v0.26b – coverage adapters for the remaining legacy-painted sidebar surfaces.
   Visual only: no geometry, DOM, content or feature behavior is changed. */
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-panel,
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-box,
html[data-ui-theme]:not([data-ui-theme="standard"]) .sidebar .real-player,
html[data-ui-theme]:not([data-ui-theme="standard"]) .city-section{
  background:var(--theme-card-bg);
  color:var(--theme-text);
  border-color:var(--theme-card-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-head,
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-head strong,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-kicker,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-id strong,
html[data-ui-theme]:not([data-ui-theme="standard"]) .city-label{
  color:var(--theme-text);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-head span,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-track-meta,
html[data-ui-theme]:not([data-ui-theme="standard"]) .player-time,
html[data-ui-theme]:not([data-ui-theme="standard"]) .city-note{
  color:var(--theme-muted);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-box,
html[data-ui-theme]:not([data-ui-theme="standard"]) .eq-bars{
  background:var(--theme-input-bg);
  border-color:var(--theme-input-border);
}
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-icon,
html[data-ui-theme]:not([data-ui-theme="standard"]) .event-search-clear{
  color:var(--theme-button-text);
}
