/* events.css - the Events page (/events) and its OBS dock. Builds on /css/theme.css. */

.login-gate { text-align: center; padding: var(--space-6) var(--space-4); }
.login-gate p { color: var(--text-muted); margin: 0 0 var(--space-4); }

.events-page { margin-bottom: var(--space-4); }
.ev-card { display: flex; flex-direction: column; min-height: calc(100vh - 140px); overflow: hidden; }
.ev-toolbar {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.ev-toolbar .title { font: 600 16px var(--font); }
.ev-toolbar .spacer { flex: 1; }
/* a source that isn't connected: greyed, with a pointer to Settings */
.ev-filter-group.off .ev-filter-head { opacity: .55; }
.ev-filter-group.off .ev-filter-head img { filter: grayscale(1); }
.ev-filter-note { margin: 0 0 4px 20px; font: 12px/1.4 var(--font); color: var(--text-muted); }
.ev-filter-note a { color: var(--accent); }

/* small square icon button (new dock link) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted); cursor: pointer;
}
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover, .icon-btn.danger:focus-visible { background: rgba(255, 107, 107, .14); }

/* test controls sit apart from the background picker, behind a divider */
.ev-test-box { display: inline-flex; gap: 4px; align-items: center; margin-left: var(--space-3); padding-left: var(--space-3); border-left: 1px solid var(--border); }

/* filters: a toggle-all button per platform + the Filter menu (a checkbox per type) */
.ev-filter-wrap { position: relative; }
.ev-filter-btn { display: inline-flex; align-items: center; gap: 5px; }
.ev-filter-count {
  min-width: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-text);
  font: 700 10px/16px var(--font); text-align: center;
}
/* fixed + sized from the window in events.js, so it fits (and scrolls) in a small OBS dock */
.ev-filter-menu {
  position: fixed; z-index: 30; display: flex; flex-direction: column; gap: 6px; min-width: 210px;
  padding: 10px 12px; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.ev-filter-menu[hidden] { display: none; }
.ev-filter-group { display: flex; flex-direction: column; gap: 4px; }
.ev-filter-group[open] { padding-bottom: 4px; }
.ev-filter-head {
  display: flex; align-items: center; gap: 6px; padding: 3px 2px;
  font: 700 12px var(--font); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
}
.ev-filter-head:hover { color: var(--text); }
.ev-filter-shown { font-weight: 600; color: var(--text-faint); letter-spacing: 0; }
.ev-filter-group .ev-filter-item { padding-left: 20px; }
.ev-filter-pf { width: 12px; height: 12px; object-fit: contain; }
.ev-filter-all { font-weight: 600; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-bottom: 2px; }
.ev-filter-head img { width: 14px; height: 14px; object-fit: contain; }
.ev-filter-item { display: flex; align-items: center; gap: 7px; font: 13px var(--font); cursor: pointer; white-space: nowrap; }
/* the site's slider switches (theme.css .switch), a bit smaller to fit the menu */
.ev-filter-item.switch > span:first-of-type { transform: scale(.85); transform-origin: left center; margin-right: -4px; }
.ev-filter-ic { font-style: normal; }

/* the list, newest on top */
.ev-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; background: var(--feed-bg); color: var(--feed-text); }
.ev-theme { width: auto; padding: 5px 8px; font-size: 13px; }
.ev-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--feed-alt); border-left: 3px solid var(--accent);
  font: 14px/1.4 var(--font);
}
.ev-row[data-platform="twitch"] { border-left-color: var(--twitch); }
.ev-row[data-platform="kick"] { border-left-color: var(--kick); }
.ev-row[data-platform="youtube"] { border-left-color: var(--youtube); }
.ev-row[data-platform="joystick"] { border-left-color: var(--joystick); }
.ev-row[data-platform="fourthwall"] { border-left-color: #ffb547; }
.ev-row[data-platform="kofi"] { border-left-color: #29abe0; }
.ev-row[data-platform="streamlabs"] { border-left-color: #80f5d2; }
.ev-row[data-platform="patreon"] { border-left-color: #ff424d; }
.ev-row[data-platform="throne"] { border-left-color: #c9a6ff; }
.ev-row.fresh { animation: ev-in 1.2s ease-out; }
@keyframes ev-in { from { background: rgba(0, 191, 255, .18); } to { background: transparent; } }
.ev-icon { flex-shrink: 0; width: 1.4em; text-align: center; }
.ev-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ev-message { color: var(--feed-muted); font-style: italic; font-size: 13px; }
.ev-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--feed-muted); font-size: 12px; }
.ev-meta img { width: 14px; height: 14px; object-fit: contain; }
.ev-test { font-size: 10px; padding: 0 4px; border-radius: 3px; background: var(--feed-alt); color: var(--feed-muted); text-transform: uppercase; letter-spacing: .04em; }
.ev-empty { margin: 0; padding: var(--space-6) var(--space-4); text-align: center; color: var(--text-muted); }

/* OBS dock: fills the dock, compact */
body.events-dock { margin: 0; height: 100vh; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); }
body.events-dock #app { display: flex; flex-direction: column; height: 100vh; }
body.events-dock #app[hidden] { display: none; }
body.events-dock .ev-dock-bar { padding: 5px 6px; gap: 4px; }
body.events-dock .ev-filter-btn { padding: 2px 8px; font-size: 11px; }
body.events-dock .ev-dock-bar .spacer { flex: 1; }
body.events-dock .ev-theme { padding: 2px 6px; font-size: 11px; max-width: 120px; }
body.events-dock .ev-filter-menu { padding: 8px 10px; }
body.events-dock .ev-row { padding: 6px 8px; gap: 8px; font-size: 13px; }

@media (max-width: 600px) {
  .ev-toolbar .spacer { display: none; }
  .ev-meta time { display: none; }
}

/* the landing page's events (events/landing.js) */
.lde-bar { display: flex; justify-content: center; margin-bottom: 10px; }
.lde-bar.lde-themes { margin: 10px 0 0; }
.lde-list { height: 340px; overflow: hidden; margin: 0; border-radius: 10px; }
.lde-list.lde-short { height: 280px; }
.ld-obs-dock .lde-list { flex: 1; height: auto; border-radius: 0; font-size: 12px; }
