/* alerts.css - /events/alerts (the test of the redesigned alerts page): the list, the preview and one editor. */
.al-gate { max-width: 560px; text-align: center; }
.al-page { padding-bottom: var(--space-6); font-family: var(--font); color: var(--text); }

/* the header */
.al-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-3); }
.al-head-title { flex: 1 1 320px; }
.al-head h1 { margin: 2px 0; font-size: 28px; }
.al-head p { margin: 0; }
.al-back { font-size: 13px; text-decoration: none; color: var(--accent); }
.al-currency { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.al-currency .select { width: auto; }
.al-tabs a { display: block; padding: 5px 12px; border-radius: 4px; font: 600 13px var(--font); color: var(--text-muted); text-decoration: none; }
.al-tabs a.on { background: var(--surface-2); color: var(--text); }

/* getting started */
.al-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: var(--space-4); padding: 10px 14px;
  border: 1px solid rgba(0, 191, 255, .35); border-radius: var(--radius); background: #1e4a54; }
.al-setup[hidden] { display: none; }
.al-setup-title { margin-right: 4px; }
.al-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid transparent; border-radius: var(--radius-pill);
  background: var(--surface-sunken); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.al-step:hover { border-color: var(--border-strong); }
.al-step.next { border-color: var(--accent); }
.al-step-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 12px; font-weight: 800; }
.al-step.next .al-step-dot { background: var(--accent); color: var(--accent-text); }
.al-step.done .al-step-dot { background: var(--ok); color: #062a1a; }
.al-setup-help { flex: 1 1 240px; color: var(--text-muted); font-size: 13px; }

/* three columns: list, preview, editor (stacking on narrow screens) */
.al-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr) 400px; gap: var(--space-4); align-items: start; }
@media (max-width: 1250px) { .al-grid { grid-template-columns: 230px minmax(0, 1fr) 340px; } }
@media (max-width: 1100px) { .al-grid { grid-template-columns: 250px minmax(0, 1fr); } .al-editor { grid-column: 1 / -1; } }
@media (max-width: 760px) { .al-grid { grid-template-columns: minmax(0, 1fr); } .al-preview-card { order: -1; } }
.al-grid .card { padding: 14px; margin: 0; }

/* the list */
.al-defaults { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; margin-bottom: 12px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface-sunken); color: var(--text); font: 700 14px var(--font); text-align: left; cursor: pointer; }
.al-defaults.on { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent); }
.al-defaults-name { flex: 1; }
.al-defaults-look { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.al-list-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 6px; }
.al-list-head h2 { margin: 0; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.al-list-head span { font-size: 12px; color: var(--text-muted); }
.al-kinds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.al-kinds li { display: flex; align-items: center; gap: 6px; padding-right: 8px; border-radius: var(--radius-sm); }
.al-kinds li:hover { background: rgba(255, 255, 255, .05); }
.al-kinds li.on { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent); }
.al-kinds li button { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: none; color: var(--text);
  font: 600 14px var(--font); text-align: left; cursor: pointer; }
.al-kinds li.unused button { color: var(--text-faint); cursor: not-allowed; }
.al-kinds input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.al-kind-icon { width: 20px; text-align: center; }
.al-kind-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-custom { flex-shrink: 0; padding: 1px 7px; border-radius: var(--radius-pill); background: rgba(0, 191, 255, .16); color: var(--accent); font-size: 11px; }
.al-more { display: flex; align-items: center; gap: 8px; width: 100%; margin: 10px 0 4px; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface-sunken); color: var(--text); font: 600 13px var(--font); text-align: left; cursor: pointer; }
.al-more .chev { color: var(--text-muted); }
.al-plat-icon { width: 16px; height: 16px; border-radius: 4px; vertical-align: middle; }
/* services not connected: their icons, each listing its events on hover */
.al-missing { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.al-missing > span { font-size: 12px; color: var(--text-muted); }
.al-missing-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.al-missing-icon { display: inline-flex; padding: 4px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.al-missing-icon:hover, .al-missing-icon:focus-visible { background: var(--surface-2); }
.al-missing-icon img { width: 18px; height: 18px; border-radius: 4px; filter: grayscale(1); opacity: .7; }
.al-missing-icon:hover img, .al-missing-icon:focus-visible img { filter: none; opacity: 1; }

/* the preview */
.al-preview-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.al-preview-top h2 { flex: 1; margin: 0; font-size: 15px; }
.al-samples { display: flex; flex-wrap: wrap; gap: 6px; }
.al-sample { padding: 4px 10px; border: 0; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-muted); font: 600 12px var(--font); cursor: pointer; }
.al-sample.on { background: var(--surface-2); color: var(--text); }
.al-preview { position: relative; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.al-preview[data-bg="checker"] { background: repeating-conic-gradient(#2a2d36 0 25%, #1d2027 0 50%) 0 0 / 20px 20px; }
.al-preview[data-bg="dark"] { background: #0e0f13; }
.al-preview[data-bg="light"] { background: #e9ebf0; }
.al-stage { width: 1920px; height: 1080px; transform-origin: top left; }
.al-stage { position: relative; }
.al-stage > div { width: 100%; height: 100%; }
/* "Max alert width" being changed: a shadow that wide, in the middle */
.al-stage > .al-width-guide { position: absolute; top: 0; left: 50%; transform: translateX(-50%); box-sizing: border-box; pointer-events: none;
  border-left: 5px dashed rgba(0, 191, 255, .75); border-right: 5px dashed rgba(0, 191, 255, .75); background: rgba(0, 191, 255, .08);
  opacity: 0; transition: opacity .35s; }
.al-stage > .al-width-guide.show { opacity: 1; transition-duration: .1s; }
.al-width-guide span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 10px;
  background: rgba(0, 0, 0, .6); color: #7fdcff; font: 700 34px 'Noto Sans', Arial, sans-serif; }
.al-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.al-preview-actions #al-test { display: inline-flex; align-items: center; gap: 8px; }
.al-preview-actions #al-test svg { width: 14px; height: 14px; }
.al-bg { margin-left: auto; }
.al-bg span { padding: 3px 8px; font-size: 12px; }
.al-last { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; margin: 10px 0 0; }
.al-last img { width: 14px; height: 14px; border-radius: 3px; }

/* the editor */
.al-editor h2 { margin: 0; font-size: 18px; }
.al-ed-title { display: flex; align-items: center; gap: 8px; }
.al-ed-title h2 { flex: 1; }
.al-sub { margin: 4px 0 12px; color: var(--text-muted); font-size: 13px; }
.al-h3 { margin: 22px 0 8px; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.al-for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.al-for > span { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.al-tabs-row { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.al-tab { padding: 8px 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--text-muted); font: 600 13px var(--font); cursor: pointer; }
.al-tab.on { border-bottom-color: var(--accent); color: var(--text); }
.al-dot { color: var(--accent); }
.al-fields { display: flex; flex-direction: column; gap: 8px; }

/* one setting: a summary with Change, or open with its control */
.al-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.al-row.open { flex-direction: column; align-items: stretch; gap: 8px; }
.al-row.changed { box-shadow: inset 0 0 0 1px rgba(0, 191, 255, .45); }
.al-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.al-row-label { font-size: 13px; font-weight: 600; }
.al-row-head .al-row-label { flex: 1; }
.al-row-sub { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.al-row-changed { font-size: 12px; color: var(--accent); cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.al-undo, .al-link { padding: 0; border: 0; background: none; color: var(--accent); font: 600 12px var(--font); cursor: pointer; text-decoration: underline; }
.al-row-control { display: flex; flex-direction: column; gap: 8px; }
.al-row-control .row { align-items: center; gap: 8px; }
.al-sound .select { flex: 1; min-width: 0; }
.al-tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.al-token { padding: 2px 9px; border: 0; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font: 600 12px var(--font); cursor: pointer; }
.al-range { display: flex; align-items: center; gap: var(--space-2); }
.al-range input { flex: 1; min-width: 0; accent-color: var(--accent); }
.al-range output { min-width: 48px; text-align: right; font: 13px var(--font); color: var(--text-muted); }
.al-platdots { display: inline-grid; grid-template-columns: repeat(2, 7px); gap: 3px; align-content: center; justify-content: center; }
.al-platdots i { width: 7px; height: 7px; border-radius: 50%; }
.al-block .input { flex: 1; min-width: 0; }
.al-blocked { display: flex; flex-wrap: wrap; gap: 6px; }
.al-blocked:empty { display: none; }

/* the looks */
.al-looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.al-look { padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text); overflow: hidden; text-align: left; cursor: pointer; }
.al-look:hover { border-color: var(--border-strong); }
.al-look.on { border-color: var(--accent); }
.al-look-tile { height: 58px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#22383d 0 25%, #1b3035 0 50%) 0 0 / 14px 14px; }
.al-look-name { display: block; padding: 6px 10px; font: 600 13px var(--font); }
.al-look-name small { color: var(--accent); font-weight: 600; margin-left: 4px; }
.al-look-note { margin: 8px 0 0; }
.al-fine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.al-fine .al-wide { grid-column: 1 / -1; }
.al-fine .field > span { font-size: 12px; }
@media (max-width: 520px) { .al-fine, .al-looks { grid-template-columns: minmax(0, 1fr); } }
