/* Theme preview colors remain available while another theme is active. */
:root {
  --color-theme-master-ball-preview-primary: #8b5cf6;
  --color-theme-master-ball-preview-secondary: #111827;
  --color-theme-master-ball-preview-tertiary: #ede9fe;
}

/* Master Ball tier theme for Cherish Dex application chrome. */
:root[data-app-theme='master-ball'] {
  color-scheme: dark;

  /* Surfaces */
  --color-bg-base: #0f081c;
  --color-bg-deep: #150c26;
  --color-bg-surface: #1b1230;
  --color-bg-panel: #21153a;
  --color-bg-card: #281a45;
  --color-bg-popover: #2e1f4f;
  --color-bg-elevated: #35245a;
  --color-bg-canvas: #080411;
  --color-bg-canvas-alt: #120a20;
  --color-bg-panel-subtle: #1c1230;
  --color-bg-hero: #1f1236;
  --color-bg-card-warm: #281839;
  --color-bg-card-warm-alt: #2a1a42;
  --color-bg-media: #332350;
  --color-bg-thumbnail: #3b2a62;
  --color-bg-thumbnail-alt: #44306e;
  --color-bg-placeholder: #3b2d56;
  --color-bg-success-edge: #142117;
  --color-bg-danger-panel: #31192b;
  --color-bg-step-inactive: #36264f;
  --color-bg-tech: #151221;

  /* Content */
  --color-text-primary: #f8fafc;
  --color-text-strong: #f1f5f9;
  --color-text-soft: #dbe1ea;
  --color-text-body: #c7cfdb;
  --color-text-body-strong: #e5eaf2;
  --color-text-secondary: #a7b0c0;
  --color-text-caption: #8f98aa;
  --color-text-caption-alt: #8f98aa;
  --color-text-tertiary: #7d8798;
  --color-text-low: #6e7788;
  --color-text-muted: #626b7b;
  --color-text-subtle: #565f70;
  --color-text-placeholder: #4b5465;
  --color-text-disabled: #3f4858;
  --color-text-ghost: #333b4a;
  --color-text-emphasis: #ffffff;
  --color-text-control: #c3cad7;
  --color-text-feature: #bec6d3;
  --color-text-detail: #aeb7c6;
  --color-text-description: #9fa9ba;
  --color-text-summary: #8d97aa;
  --color-text-plan-label: #7d8798;
  --color-text-bulk: #737d8f;
  --color-text-code: #b8a4ff;
  --color-text-bulk-subtle: #6f798b;
  --color-text-scanner-label: #788798;
  --color-text-confidence: #6f798b;
  --color-text-limit: #626b7b;
  --color-text-detected: #74c7d8;
  --color-text-hint: #687287;
  --color-text-referral-note: #6b6470;
  --color-text-alert-note: #6f798b;
  --color-text-about-muted: #798497;
  --color-text-card: #d5dce8;
  --color-text-card-alt: #d5dce8;
  --color-text-search: #d2d9e6;
  --color-text-upload: #cdd5e2;
  --color-text-scanner: #9aa4b6;
  --color-text-scanner-summary: #7f899b;
  --color-text-alert-description: #aab6c6;
  --color-text-manual: #c7b8d4;
  --color-text-referral: #d7bd8e;
  --color-text-neutral: #cbd5e1;
  --color-on-accent: #ffffff;
  --color-on-action-wishlist: #ffffff;
  --color-accent-text: var(--color-accent-primary-light);
  --color-account-highlight: #c740ff;
  --color-status-success-text: var(--color-success-soft);
  --color-status-warning-text: var(--color-warning-light);
  --color-status-danger-text: var(--color-danger-soft);
  --color-control-check-bg: var(--color-bg-elevated);
  --color-control-check-border: rgb(var(--rgb-overlay) / 18%);
  --color-control-check-border-hover: var(--color-accent-primary-light);
  --color-control-check-bg-checked: var(--color-accent-primary);
  --color-control-check-border-checked: var(--color-accent-primary-light);
  --color-control-check-mark: var(--color-on-accent);
  --color-scrollbar-track: rgb(var(--rgb-overlay) / 3%);
  --color-scrollbar-thumb: rgb(var(--rgb-accent-primary) / 42%);
  --color-scrollbar-thumb-hover: rgb(var(--rgb-accent-primary) / 68%);
  --color-control-field-bg: var(--color-bg-elevated);
  --color-control-field-border: rgb(var(--rgb-overlay) / 14%);
  --color-control-field-border-hover: var(--color-accent-primary-light);
  --color-control-menu-bg: var(--color-bg-popover);
  --color-control-option-hover: rgb(var(--rgb-accent-primary) / 12%);
  --color-control-option-selected: rgb(var(--rgb-accent-primary) / 20%);
  --color-control-stepper-bg: rgb(var(--rgb-overlay) / 5%);
  --color-control-stepper-hover: rgb(var(--rgb-accent-primary) / 16%);
  --color-control-slider-track: rgb(var(--rgb-overlay) / 13%);
  --color-control-slider-fill: var(--color-accent-primary);
  --color-control-slider-thumb: var(--color-accent-primary-light);
  --color-control-slider-thumb-ring: var(--color-bg-surface);

  --color-price-tcgplayer-text: #dbeafe;
  --color-price-tcgplayer-bg: #1b2854;
  --color-price-tcgplayer-border: #60a5fa;
  --color-price-cardmarket-text: #fef3c7;
  --color-price-cardmarket-bg: #3b2608;
  --color-price-cardmarket-border: #f59e0b;
  /* Reacciones sociales (💗 me encanta, 👍 me gusta, ⭐ favorito). */
  --color-reaction-heart: #f062a8;
  --color-reaction-like: #8a78f0;
  --color-reaction-star: #f0cf72;

  /* Product brand and application accents */
  --color-brand-primary: #8b5cf6;
  --color-brand-primary-light: #c4b5fd;
  --color-brand-primary-dark: #6d28d9;
  --color-brand-primary-deep: #4c1d95;
  --color-brand-soft: #ede9fe;
  --color-brand-muted: #ddd6fe;
  --color-brand-gold: #f0c36a;
  --color-brand-name-primary: var(--color-brand-primary-light);
  --color-brand-name-secondary: #ffffff;
  --color-brand-name-dark: var(--color-brand-primary-dark);
  --color-accent-primary: var(--color-brand-primary);
  --color-accent-primary-light: var(--color-brand-primary-light);
  --color-accent-primary-dark: var(--color-brand-primary-dark);
  --color-accent-primary-deep: var(--color-brand-primary-deep);
  --color-accent-primary-soft: var(--color-brand-soft);
  --color-accent-primary-muted: #ddd6fe;
  --color-accent-violet-soft: #c4b5fd;
  --color-accent-violet: #a78bfa;
  --color-accent-secondary: #ffffff;
  --color-accent-secondary-light: #f5f3ff;
  --color-accent-tertiary: #ec4899;
  --color-accent-fuchsia: #f0abfc;

  /* Functional actions */
  --color-action-wishlist: #f472b6;
  --color-action-wishlist-strong: #db2777;
  --color-action-wishlist-deep: #831843;
  --rgb-action-wishlist: 244 114 182;
  --rgb-action-wishlist-strong: 219 39 119;
  --color-action-destructive: #fb923c;
  --color-action-destructive-strong: #f97316;
  --color-action-destructive-deep: #9a3412;
  --rgb-action-destructive: 251 146 60;
  --rgb-action-destructive-strong: 249 115 22;
  --color-action-cancel: #b8aec8;
  --rgb-action-cancel: 184 174 200;

  /* RGB channels */
  --rgb-overlay: 255 255 255;
  --rgb-shadow: 0 0 0;
  --rgb-white: 255 255 255;
  --rgb-black: 0 0 0;
  --rgb-bg-base: 15 8 28;
  --rgb-bg-deep: 21 12 38;
  --rgb-bg-surface: 27 18 48;
  --rgb-bg-void: 8 4 17;
  --rgb-bg-tech: 21 18 33;
  --rgb-champagne: 250 232 170;
  --rgb-accent-primary: 139 92 246;
  --rgb-accent-primary-200: 237 233 254;
  --rgb-accent-primary-300: 221 214 254;
  --rgb-accent-primary-light: 196 181 253;
  --rgb-accent-primary-dark: 109 40 217;
  --rgb-accent-secondary: 255 255 255;
  --rgb-accent-secondary-300: 245 243 255;
  --rgb-accent-secondary-500: 255 255 255;
  --rgb-accent-tertiary: 236 72 153;
  --rgb-accent-tertiary-300: 249 168 212;
  --rgb-accent-tertiary-400: 244 114 182;
  --rgb-accent-fuchsia: 240 171 252;

  /* Backwards-compatible aliases */
  --bg-base: var(--color-bg-base);
  --bg-surface: var(--color-bg-surface);
  --bg-elevated: var(--color-bg-elevated);
  --border: rgb(var(--rgb-overlay) / 9%);
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-disabled);
  --accent-cyan: var(--color-accent-secondary);
  --accent-purple: var(--color-accent-primary);
  --accent-pink: var(--color-accent-tertiary);
}
