/* Event timeline (Gantt view) on the home page and the calendar. Gold = events, purple = Hot Deals, striped = Working (expected). */
.tl { padding: 14px 16px 10px; }
.tl-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.tl-key { display: inline-flex; align-items: center; gap: 6px; }
.tl-key::before { content: ''; width: 18px; height: 10px; border-radius: 2px; }
.tl-key.k-event::before { background: var(--gold); }
.tl-key.k-hot-deal::before { background: var(--purple); }
.tl-key.k-working::before { background: repeating-linear-gradient(135deg, var(--line-2) 0 3px, transparent 3px 6px); border: 1px dashed var(--muted); }
.tl-nav { display: flex; gap: 4px; }
.tl-btn { background: var(--panel-2); color: var(--silver); border: 1px solid var(--line-2); font: 600 12px/1 var(--mono); padding: 6px 10px; cursor: pointer; }
.tl-btn:hover { color: #fff; border-color: var(--purple-2); }
.tl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl-grid { position: relative; }

.tl-head { display: grid; border-bottom: 1px solid var(--line-2); }
.tl-day { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 6px; border-left: 1px solid var(--line); min-width: 0; }
.tl-day.is-monday { border-left-color: var(--line-2); }
.tl-wd { font: 600 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.tl-date { font: 700 14px/1.1 var(--mono); color: var(--silver); }
.tl-wk { font: 500 10px/1 var(--mono); color: var(--purple-2); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tl-day.is-today .tl-wd, .tl-day.is-today .tl-date { color: var(--gold); }

.tl-body { position: relative; }
.tl-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tl-col.is-monday { border-left-color: var(--line-2); }
.tl-col.is-today { background: rgba(214, 172, 91, .05); }

.tl-ev { position: absolute; height: 24px; display: flex; align-items: center; padding: 0 8px; border-radius: 3px; text-decoration: none; overflow: hidden; font: 600 12px/1 var(--font); white-space: nowrap; transition: filter .15s; box-sizing: border-box; }
.tl-ev span { overflow: hidden; text-overflow: ellipsis; }
.tl-ev:hover, .tl-ev:focus-visible { filter: brightness(1.15); outline: none; }
.tl-ev:focus-visible { box-shadow: 0 0 0 2px #fff; }
.tl-ev.k-event { background: var(--gold); color: #1a1508; }
.tl-ev.k-hot-deal { background: var(--purple); color: #fff; }
.tl-ev.is-working { background-image: repeating-linear-gradient(135deg, rgba(17,17,22,.35) 0 4px, transparent 4px 8px); border: 1px dashed rgba(255,255,255,.45); }
.tl-ev.k-event.is-working { background-color: rgba(214,172,91,.55); }
.tl-ev.k-hot-deal.is-working { background-color: rgba(110,82,196,.6); }
.tl-ev.is-past { opacity: .38; }
.tl-ev.is-long { height: 20px; margin-top: 2px; opacity: .8; font-weight: 500; }
.tl-ev.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-ev.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.tl-now { position: absolute; top: 2px; bottom: 0; width: 0; border-left: 2px solid var(--red); z-index: 2; pointer-events: none; }
.tl-now > span { position: absolute; top: 0; left: -1px; transform: translateX(-50%); background: var(--red); color: #fff; font: 700 9px/1 var(--mono); padding: 2px 4px; letter-spacing: .08em; text-transform: uppercase; }
.tl-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--muted); font-size: 14px; }
.tl-foot { margin: 8px 0 0; font: 500 11px/1.4 var(--mono); color: var(--muted); }

/* Calendar rows reached from a bar */
@keyframes tl-flash { from { box-shadow: 0 0 0 2px var(--gold); } to { box-shadow: 0 0 0 2px transparent; } }
.is-flash { animation: tl-flash 1.6s ease-out; }

@media (max-width: 699px) {
  .tl { padding: 12px 10px 8px; }
  .tl-day { padding: 4px 3px 6px; }
  .tl-date { font-size: 12px; }
  .tl-ev { padding: 0 5px; font-size: 11px; }
  .tl-wk { display: none; }
}

/* ---- Live parts ---- */
.tl { position: relative; overflow: visible; }
.tl-filters { display: flex; gap: 4px; }
.tl-filter { background: transparent; color: var(--muted); border: 1px solid var(--line-2); font: 600 11px/1 var(--mono); padding: 6px 10px; cursor: pointer; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; }
.tl-filter.f-event::before, .tl-filter.f-hot-deal::before { content: ''; width: 10px; height: 8px; border-radius: 2px; }
.tl-filter.f-event::before { background: var(--gold); }
.tl-filter.f-hot-deal::before { background: var(--purple); }
.tl-filter[aria-pressed="true"] { color: #fff; border-color: var(--gold); background: rgba(214,172,91,.1); }
.tl-filter:hover { color: #fff; }
.tl-today.is-off { opacity: .45; }
.tl-grid { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.tl-grid.is-dragging { cursor: grabbing; transition: none; }
.tl-grid.slide-l { animation: tl-in-l .28s ease-out; }
.tl-grid.slide-r { animation: tl-in-r .28s ease-out; }
@keyframes tl-in-l { from { opacity: .2; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes tl-in-r { from { opacity: .2; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* Elapsed part of a live bar, with a slow light sweep so live events read as running */
.tl-ev { isolation: isolate; }
.tl-ev > span { position: relative; z-index: 1; }
.tl-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(0,0,0,.22); transition: width 1s linear; z-index: 0; }
.tl-ev.is-live::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, transparent 0 40%, rgba(255,255,255,.18) 50%, transparent 60% 100%); background-size: 250% 100%; animation: tl-sweep 4.5s linear infinite; pointer-events: none; }
@keyframes tl-sweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.tl-ev.is-soon:not(.is-working) { filter: saturate(.85); }
.tl-ev.is-open { box-shadow: 0 0 0 2px #fff; z-index: 3; }

/* Now line: moves every second and carries the Server Time clock */
.tl-now { transition: left 1s linear; }
.tl-now::after { content: ''; position: absolute; left: -5px; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(217,83,91,.6); animation: tl-pulse 2s ease-out infinite; }
@keyframes tl-pulse { 0% { box-shadow: 0 0 0 0 rgba(217,83,91,.55); } 100% { box-shadow: 0 0 0 9px rgba(217,83,91,0); } }
.tl-now-tag { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Card that opens on a bar */
.tl-pop { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 16px); background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,.45); padding: 14px 14px 12px; animation: tl-pop .16s ease-out; }
@keyframes tl-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tl-pop-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.tl-pop-x:hover { color: #fff; }
.tl-pop-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-right: 18px; }
.tl-pop-title strong { font-size: 16px; color: #fff; margin-right: 2px; }
.tl-pop-timer { margin: 10px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.tl-pop-timer .label { color: var(--gold); }
.tl-pop-count { font: 600 22px/1 var(--mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.tl-pop-meter { height: 4px; background: var(--line); margin-bottom: 10px; }
.tl-pop-meter i { display: block; height: 100%; background: var(--gold); transition: width 1s linear; }
.tl-pop-when { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 10px; font: 500 12px/1.4 var(--mono); color: var(--silver); }
.tl-pop-when dt { color: var(--muted); }
.tl-pop-when dd { margin: 0; }
.tl-pop-local { color: var(--muted); }
.tl-pop-go { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); text-decoration: none; }

@media (max-width: 699px) {
  .tl-legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-ev.is-live::after, .tl-now::after, .tl-grid.slide-l, .tl-grid.slide-r, .tl-pop { animation: none; }
  .tl-now, .tl-prog, .tl-pop-meter i { transition: none; }
}
