@import url('../views/week/logic-specific-to-intentional-calendar-x/intentional-calendar-x.css');

.app-shell {
  transition: padding-left 180ms ease, padding-right 180ms ease;
}

/* Rail row, not a topbar hamburger; inherits nav-icon-button sizing. */
.my-calendars-toggle:hover,
.my-calendars-toggle.is-active {
  color: var(--accent);
  background: var(--utility-surface-strong);
  border-color: var(--accent);
}

.my-calendars-toggle:focus-visible {
  outline: 2px solid var(--tab-active-border);
  outline-offset: 1px;
}

/* ── Right panel: My calendars checklist ───────────────────────────────────
 *
 * A `.chat-panel` since 2026-08-09, so every line of its geometry — the right
 * dock, the width, the offset that keeps it out from under the panel rail, the
 * closed-state transform — comes from styles/chat.css and styles/panel-rail.css
 * and is NOT restated here. It used to be a left drawer with its own copy of
 * all of that (and its own `--my-calendars-panel-width`, which the two rails
 * then had to outrank in three more places). What is left below is the list
 * itself, which is the only part that was ever specific to this panel. */

.my-calendars-panel {
  overflow: hidden;
}

.my-calendars-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 6px;
}

.my-calendars-account {
  margin: 10px 0 4px;
  padding: 0 10px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.my-calendars-account:first-child {
  margin-top: 2px;
}

.my-calendars-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
}

.my-calendars-row:hover {
  background: var(--utility-surface-strong, rgba(127, 127, 127, 0.08));
}

.my-calendars-row--primary {
  cursor: default;
}

.my-calendars-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.my-calendars-row input[type="checkbox"]:disabled {
  opacity: 0.55;
}

.my-calendars-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--border-strong);
}

.my-calendars-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-calendars-msg {
  flex: 0 0 auto;
  padding: 0 20px 14px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Right panel: Today's schedule (chat-panel slot) ───────────────────── */

.today-calendar-date {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.today-calendar-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--daily-goals-bg, var(--card));
}

.today-calendar-empty {
  padding: 24px 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.today-calendar-clone.intentional-calendar-x-root {
  min-width: 0;
  height: auto;
  overflow: visible;
  --dn-week-days: 1;
}

/* `overflow: visible` is what makes the WHEEL work, and it is not cosmetic.
 *
 * In the real Calendar these four are the scroll machinery: `.dn__calendar` and
 * `.dn__view-container` carry `overflow: auto` and are the boxes the hours
 * scroll inside. The clone hands scrolling to `.today-calendar-body` instead and
 * lets its own height run to content, so those boxes end up scroll containers
 * with nothing to scroll — and Chrome stops a wheel gesture at the first scroll
 * container under the pointer whether or not it can move. The wheel died there;
 * the panel's scrollbar still worked, because dragging a scrollbar addresses one
 * scroller directly and never walks the chain. Anything here that stays a
 * scroll container brings the dead wheel straight back.
 *
 * Both class names, so the selector is one specificity step above the
 * `.intentional-calendar-x-root .dn__view-container` it is overriding. Coming
 * later in the file is not enough: intentional-calendar-x.css is @imported at
 * the top of THIS file and loaded again by the Calendar view afterwards, so its
 * copy of these rules has the last word at equal specificity. That second load
 * is why the neighbouring grid-column rules reach for `!important`. */
.today-calendar-clone.intentional-calendar-x-root .dn__calendar-wrapper,
.today-calendar-clone.intentional-calendar-x-root .dn__calendar,
.today-calendar-clone.intentional-calendar-x-root .dn__view-container,
.today-calendar-clone.intentional-calendar-x-root .dn__week-wrapper {
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.today-calendar-clone .dn__week-grid {
  grid-template-columns: var(--dn-week-time-axis-width, 54px) minmax(0, 1fr) !important;
}

.today-calendar-clone .intentional-calendar-x-time-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.today-calendar-clone .dn__current-time-indicator-today {
  left: 0 !important;
  width: 100% !important;
}

/* ── Two clones, and the class says which ──────────────────────────────────
 *
 * `--live` is the ordinary case since 2026-08-12: the panel mounts the real
 * calendar on one day, bound to the same root interactions as the Calendar tab
 * (`modules/render/day_view_mount.js`). Everything below it must therefore look
 * and behave like the grid it is — no cursor override, no pointer-event
 * suppression, no `user-select: none` over text the popups let you edit.
 *
 * `--read-only` is the projection that survives for the one case a live view
 * cannot serve: a day outside the week the shared calendar state holds, while
 * the Calendar tab is on screen reading that week.
 *
 * Never write these rules against `.today-calendar-clone` alone. Both clones
 * carry it, so a rule missing the modifier makes the live panel inert again —
 * and inert is invisible in a screenshot. */
.today-calendar-clone--read-only button,
.today-calendar-clone--read-only [contenteditable] {
  cursor: default !important;
}

/* Read-only, but not inert: the projection is still a DROP TARGET.
 *
 * It has none of the Calendar's root interactions bound to it, so swallowing
 * every pointer event was the cheapest way to guarantee it could not be edited
 * by mistake — and it also made the panel invisible to
 * `document.elementFromPoint`, which is how every goal drag in the app decides
 * what it is over (`modules/events/timed_blocks.js#resolveTimedDropTarget`).
 * Dragging a goal onto it therefore did nothing at all.
 *
 * So the day column and its slots take pointer events — that is all
 * `elementFromPoint` needs to answer "the schedule for <date>" — while the event
 * layer stacked over them stays transparent, which keeps every rendered card
 * unclickable. The drop preview lives in that layer too, and must not swallow
 * the pointer it is following. */
.today-calendar-clone--read-only {
  pointer-events: none;
  user-select: none;
}

.today-calendar-clone--read-only .intentional-calendar-x-time-grid-day,
.today-calendar-clone--read-only .intentional-calendar-x-time-grid-slot {
  pointer-events: auto;
}

.today-calendar-clone--read-only .intentional-calendar-x-time-grid-events,
.today-calendar-clone--read-only .intentional-calendar-x-time-grid-events * {
  pointer-events: none;
}

/* The live clone gets the grid's own affordances back. `ns-resize` is what the
 * Calendar shows over a blank slot you can drag a block out of; without it the
 * one gesture the panel exists for has no cue that it is available. */
.today-calendar-clone--live .intentional-calendar-x-time-grid-slot {
  cursor: ns-resize;
}

/* ── Day navigation: ‹ date › above the grid ───────────────────────────────
 *
 * A row of its own rather than controls in the panel header: the header's right
 * edge is the close button, and an arrow next to it would be pressed by anyone
 * aiming for ×. `daily-goals-sidebar-date-arrow` is the class because the
 * control came from the Daily Goals sidebar's day stepper, shared with it
 * through the `sidebar-date-navigation` island. That panel was deleted on
 * 2026-08-12; this is the only day stepper left, and the class name stayed
 * because the built React bundle emits it (see styles/daily-goals-sidebar.css). */
.today-calendar-nav-slot {
  flex: 0 0 auto;
}

.today-calendar-nav {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.today-calendar-nav .daily-goals-sidebar-date-title {
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
