/* ============================================================
   KAMI OS — CYCLE 5 · CALENDAR DAY TIMELINE
   Hour-scaled rail · positioned event blocks · live now-line.
   All classes prefixed .c5c- (owned by the calendar branch).
   ============================================================ */

.c5c-tl { margin-bottom: 14px; }

/* ---------- Rail container (06:00–24:00) ---------- */
.c5c-rail {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(0, 229, 255, 0.025), transparent 140px),
    rgba(4, 8, 14, 0.35);
  overflow: hidden;
}

/* Hour lines — span the block area only; labels sit in the left gutter */
.c5c-hr {
  position: absolute;
  left: 46px;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(83, 160, 255, 0.12);
  pointer-events: none;
}
.c5c-hr-label {
  position: absolute;
  left: -46px;
  top: -6px;
  width: 40px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}

/* Inner layer that hosts the event blocks (percent lanes resolve here) */
.c5c-lay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50px;
  right: 4px;
}

/* ---------- Event blocks ---------- */
.c5c-ev {
  position: absolute;
  min-height: 44px; /* tap-target floor (geometry also enforces this) */
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  overflow: hidden;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(18, 28, 48, 0.92), rgba(11, 17, 32, 0.85));
  box-shadow: 0 4px 14px -8px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  z-index: 1;
}
.c5c-ev:active { background: rgba(0, 229, 255, 0.1); }

.c5c-ev-time {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.c5c-ev-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Done — green edge (inline), tint + settled text */
.c5c-ev.c5c-done { background: rgba(74, 222, 128, 0.07); }
.c5c-ev.c5c-done .c5c-ev-title { color: #4ade80; opacity: 0.8; }
.c5c-ev.c5c-done .c5c-ev-time { color: rgba(74, 222, 128, 0.55); }

/* Live NOW block — same green ring language as the agenda cards */
.c5c-ev.c5c-live {
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35), inset 0 0 20px rgba(74, 222, 128, 0.06);
  z-index: 2;
}

/* ---------- Now-line (today only) ---------- */
.c5c-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid var(--bad);
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.45);
  pointer-events: none;
  z-index: 3;
}
.c5c-now::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.7);
}
.c5c-now-t {
  position: absolute;
  left: 2px;
  top: -8px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 77, 109, 0.45);
  border-radius: 4px;
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--bad);
}
/* Inside a live block right now → line flips green: "you're on a block" */
.c5c-now.c5c-on { border-top-color: var(--good); box-shadow: 0 0 10px rgba(46, 230, 166, 0.45); }
.c5c-now.c5c-on::after { background: var(--good); box-shadow: 0 0 8px rgba(46, 230, 166, 0.7); }
.c5c-now.c5c-on .c5c-now-t { color: var(--good); border-color: rgba(46, 230, 166, 0.45); }

/* ---------- All-day / no-start chips (above the rail) ---------- */
.c5c-allday { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.c5c-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: rgba(4, 8, 14, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.c5c-chip-t {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.c5c-chip.c5c-done { background: rgba(74, 222, 128, 0.07); color: #4ade80; }

/* ---------- Empty day note (rail still renders) ---------- */
.c5c-rail-empty {
  position: absolute;
  top: 42%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-faint);
  pointer-events: none;
}

/* ---------- Day chevrons (agenda panel header) ---------- */
.btn.sm.c5c-chev {
  min-width: 44px;
  height: 36px;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}
/* On narrow phones let the day-panel header wrap instead of squeezing */
.panel-head:has(.c5c-chev) { flex-wrap: wrap; row-gap: 8px; }

/* ---------- Divider between timeline and agenda cards ---------- */
.c5c-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.c5c-divider::before,
.c5c-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}
