/* Watchlist settings: Dashboard card/row vocabulary, isolated from chart toolbar. */
.watchlist-page .header-bar { flex-wrap: nowrap; overflow: hidden; gap: 12px !important; }
.watchlist-page .header-actions { margin-left: auto; min-width: 0; }
.watchlist-page .wl-tf-group { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.watchlist-page .header-actions > span { order: 0; white-space: nowrap; }
.wl-settings-trigger { order: 1; min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-primary, #374151); border-radius: 8px; background: var(--bg-hover, #111827); color: var(--text-primary); font: 600 12px var(--font-ui, 'Outfit', sans-serif); cursor: pointer; flex-shrink: 0; }
.wl-settings-trigger:hover { border-color: var(--accent-blue); }
.wl-settings-trigger:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
@media (max-width: 1100px) { .watchlist-page .header-actions > span { display: none; } }
@media (max-width: 600px) {
    .watchlist-page .header-bar { gap: 8px !important; padding: 0 8px !important; height: 44px; border-bottom: 0; }
    .watchlist-page .header-brand { gap: 0 !important; }
    .watchlist-page .logo { font-size: 12px; gap: 4px; }
    .watchlist-page .logo-icon { display: none; }
    .watchlist-page .header-actions { padding-left: 0; }
    .wl-settings-trigger { padding: 0 8px; min-height: 44px; }
}
.wl-settings-trigger[hidden] { display: none; }
/* Reuse the actual Terminal modern tokens; Old retains the existing Watchlist shell. */
[data-design="modern"] .watchlist-page { --bg-deep: var(--bg-primary); --bg-surface: var(--bg-secondary); --bg-card: var(--bg-widget); --border-color: var(--border-primary); --glass-border: var(--border-primary); background: var(--bg-primary); }
[data-design="modern"] .watchlist-page::before { display: none; }
[data-design="modern"] .watchlist-page .header-bar { background: var(--bg-secondary); backdrop-filter: none; border-color: var(--border-primary); }
[data-design="modern"] .watchlist-page .header-bar::after { display: none; }
[data-design="modern"] .watchlist-page .logo { background: none; -webkit-text-fill-color: currentColor; color: var(--text-primary); }
[data-design="modern"] .watchlist-page .logo-icon { filter: none; }
.wl-settings { --settings-border: rgba(99, 102, 241, .18); --settings-accent: #a5b4fc; --settings-text: #e8eaf1; --settings-muted: #a0a6ba; color-scheme: dark; width: min(460px, calc(100vw - 24px)); max-width: none; max-height: min(840px, calc(100dvh - 24px)); padding: 0; margin: auto; border: 1px solid var(--settings-border); border-radius: 16px; background: #111625; color: var(--settings-text); box-shadow: 0 24px 80px rgba(0, 0, 0, .6); font: 13px/1.5 var(--font-ui, 'Outfit', sans-serif); overflow: hidden; }
.wl-settings[open] { display: flex; flex-direction: column; }
.wl-settings::backdrop { background: rgba(3, 5, 12, .72); backdrop-filter: blur(6px); }
.wl-settings [hidden] { display: none !important; }
.wl-settings__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); flex-shrink: 0; }
.wl-settings__header h2 { font-size: 17px; font-weight: 700; letter-spacing: .2px; margin: 0; }
.wl-settings__header h2 > span:first-child { color: var(--settings-accent); margin-right: 6px; }
.wl-settings__header p { font-size: 11px; color: var(--settings-muted); margin: 2px 0 0; }
.wl-settings button, .wl-settings select, .wl-settings input { font: inherit; color: inherit; }
.wl-settings button, .wl-settings select, .wl-settings input[type="url"] { min-height: 44px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.wl-settings button { cursor: pointer; padding: 8px 12px; }
.wl-settings button:hover { background: rgba(255,255,255,.08); border-color: rgba(165,180,252,.45); }
.wl-settings button:disabled { opacity: .5; cursor: wait; }
.wl-settings button:focus-visible, .wl-settings select:focus-visible, .wl-settings input:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.wl-settings #wl-settings-close { width: 44px; padding: 0; flex-shrink: 0; font-size: 24px; border: 0; background: transparent; color: var(--settings-muted); }
.wl-settings__body { padding: 18px 20px 20px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.wl-settings__body > * { flex-shrink: 0; }
.wl-settings__info { padding: 12px 14px; background: rgba(99,102,241,.06); border: 1px solid var(--settings-border); border-radius: 10px; }
.wl-settings__info strong { color: #c4b5fd; font-size: 12px; }
.wl-settings__info p, .wl-settings__hint { color: var(--settings-muted); font-size: 11px; line-height: 1.55; }
.wl-settings__info p { margin-top: 4px; }
.wl-settings__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px 6px 14px; border: 1px solid var(--settings-border); border-radius: 10px; background: rgba(99,102,241,.035); }
.wl-settings__row > label, .wl-settings__row > span { font-size: 12px; font-weight: 600; }
.wl-settings__segments { display: flex; padding: 3px; gap: 3px; background: rgba(0,0,0,.22); border-radius: 8px; }
.wl-settings__segments button { background: transparent; border-color: transparent; color: var(--settings-muted); min-width: 44px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.wl-settings__segments button[aria-pressed="true"] { border-color: rgba(99,102,241,.55); background: rgba(99,102,241,.18); color: #fff; }
.wl-settings select { width: 190px; max-width: 62%; padding: 8px; }
.wl-settings__audio label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; }
.wl-settings input[type="checkbox"] { appearance: none; position: relative; width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; cursor: pointer; }
.wl-settings input[type="checkbox"]::before { content: ''; display: block; position: absolute; width: 36px; height: 22px; top: 11px; left: 4px; border-radius: 20px; background: #363d50; }
.wl-settings input[type="checkbox"]::after { content: ''; position: absolute; top: 14px; left: 7px; width: 16px; height: 16px; border-radius: 50%; background: #d5d9e5; }
.wl-settings input[type="checkbox"]:checked::before { background: #6366f1; }
.wl-settings input[type="checkbox"]:checked::after { left: 21px; background: #fff; }
.wl-settings__divider { height: 1px; background: rgba(255,255,255,.07); margin: 2px 0; }
.wl-settings__action { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font-size: 12px !important; font-weight: 600 !important; }
.wl-settings__action > span:first-child { font-size: 20px; width: 20px; text-align: center; }
.wl-settings__action > span:last-child { margin-left: auto; color: var(--settings-muted); }
.wl-settings .wl-settings__action--share { border-color: rgba(99,102,241,.3); background: rgba(99,102,241,.08); }
.wl-settings .wl-settings__action--danger { border-color: rgba(239,68,68,.2); color: #fca5a5; }
.wl-settings__panel { padding: 12px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--settings-border); border-radius: 10px; background: rgba(0,0,0,.16); }
.wl-settings__panel label, .wl-settings__panel p { font-size: 12px; }
.wl-settings__panel input { padding: 8px; width: 100%; min-width: 0; }
.wl-settings__panel--danger { border-color: rgba(239,68,68,.3); }
.wl-settings__confirm { display: flex; justify-content: flex-end; gap: 8px; }
.wl-settings #wl-reset-confirm { background: rgba(239,68,68,.12); color: #fca5a5; }
#wl-settings-status { font-size: 12px; overflow-wrap: anywhere; }
#wl-settings-status:empty { display: none; }
#wl-settings-status[data-state="error"] { color: #fca5a5; }
@media (max-width: 420px) {
    .wl-settings__header { padding: 12px 14px; }
    .wl-settings__body { padding: 12px 14px 16px; }
    .wl-settings__row { flex-wrap: wrap; padding: 8px 10px; gap: 6px; }
    .wl-settings__row > .wl-settings__segments { margin-left: auto; }
    .wl-settings select { width: 100%; max-width: 100%; }
    .wl-settings__audio { flex-wrap: nowrap; }
    .wl-settings__audio label { gap: 3px; }
    .wl-settings__audio button { font-size: 11px; padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { .wl-settings *, .wl-settings-trigger { transition: none; } }
