/* The session CARD (mockup variant A, 2026-09-29): its own sheet, pulled in
   here so every page that loads this one (index.html, week.css, do.css) gets
   it without another import there. */
@import url('cowork-card.css');
/* "Propose new time" and the host's proposal lines (js/cowork-session/session_propose.js, session_people_view.js). */
@import url('cowork-propose.css');

/* The time block's card (popup/session_toggle.js): every block's popup body. */
.timed-block-popup-session {
  margin: 0 0 10px;
}
.timed-block-popup-session-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px 2px;
  border-top: 1px solid rgba(var(--overlay-rgb), 0.08);
  margin-top: 6px;
}
.timed-block-popup-session-body[hidden] {
  display: none;
}
.timed-block-popup-session-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.timed-block-popup-session-groups:empty {
  display: none;
}
.timed-block-popup-session-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.timed-block-popup-session-group-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--overlay-rgb), 0.16);
  background: rgba(var(--overlay-rgb), 0.06);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.timed-block-popup-session-group-btn:hover {
  background: rgba(var(--overlay-rgb), 0.1);
}
.timed-block-popup-session-group-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.timed-block-popup-session-note {
  font-size: 11px;
  color: var(--text-muted);
}
.timed-block-popup-session-note:empty {
  display: none;
}

/* People lists the guests with their answers and a × — the field's own chips
   and "Guests" label would be the same list again. Only the invite box stays. */
.timed-block-popup-session-guests .timed-block-popup-guest-chips,
.timed-block-popup-session-guests .timed-block-popup-event-field-label {
  display: none;
}
/* ── The guest's side: an invitation row (popup/session_invite_row.js) ───── */
.timed-block-popup-invite-actions {
  display: flex;
  gap: 6px;
  padding: 6px 2px 2px;
}
.timed-block-popup-invite-actions .is-current {
  outline: 2px solid var(--accent, #4a9eff);
  outline-offset: 1px;
}
.timed-block-popup-invite-link {
  color: var(--accent, #4a9eff);
  text-decoration: underline;
}

/* A co-working INVITATION on the grid (utils/timed_event_builder.js stamps
   `data-session-invite` with your answer). Drawn the way Google draws one you
   have not said yes to: the page shows through, the session's colour is the
   outline and the ink — a preview, not a commitment. Maybe = the same outline
   over stripes; declined = struck through and faded. Accepting replaces the
   card with your own filled block (session_accept.js).
   Three classes + the attribute: must beat `body.theme-light .icx-event-themed`
   (components.css), which sets the same two vars. */
.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-session-invite] {
  --intentional-event-surface-color: color-mix(in srgb, var(--intentional-event-accent-color, #4a9eff) 10%, var(--bg));
  --intentional-event-text-color: color-mix(in srgb, var(--intentional-event-accent-color, #4a9eff) 60%, var(--text-primary));
  box-shadow: inset 0 0 0 1.5px var(--intentional-event-accent-color, #4a9eff);
  border-radius: 6px;
}

.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-session-invite='tentative'] {
  --intentional-event-surface-color: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--intentional-event-accent-color, #4a9eff) 22%, var(--bg)) 0 6px,
    color-mix(in srgb, var(--intentional-event-accent-color, #4a9eff) 8%, var(--bg)) 6px 12px
  );
}

.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-session-invite='declined'] {
  opacity: 0.55;
  text-decoration: line-through;
}

/* The co-work mark: every session card (yours, accepted, invited) carries two
   people in its top-right corner (`data-cowork-session`, utils/
   timed_event_builder.js). A mask, so it takes the card's own ink in either
   theme. Clicking the card opens its popup, which lists who is joining. */
.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-cowork-session] {
  --cw-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  /* Room for the mark: the title ellipsises before it, never under it. */
  padding-right: 18px;
}

.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-cowork-session]::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 2;
  width: 13px;
  height: 13px;
  background: var(--intentional-event-text-color, currentColor);
  -webkit-mask: var(--cw-mark) center / contain no-repeat;
  mask: var(--cw-mark) center / contain no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

/* The timer mark: the Focus Timer counts this block down (`data-focus-timer`,
   events/timed_block_timer.js). Top-right, left of the co-work mark when both. */
.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-focus-timer] {
  padding-right: 18px;
}
.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-focus-timer][data-cowork-session] {
  padding-right: 34px;
}
.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-focus-timer]::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 2;
  width: 12px;
  height: 12px;
  background: var(--intentional-event-text-color, currentColor);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2 2'/%3E%3Cpath d='M9 2h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2 2'/%3E%3Cpath d='M9 2h6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.8;
  pointer-events: none;
}
.intentional-calendar-x-event-card.intentional-calendar-x-event-card--timed[data-focus-timer][data-cowork-session]::before {
  right: 19px;
}

/* ── Who's joining (js/cowork-session/session_people_view.js) ──────────── */
.cw-people {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.cw-people-head {
  color: var(--text-secondary, #8a8f98);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cw-people-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cw-people-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

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

.cw-people-you {
  color: var(--text-secondary, #8a8f98);
}

.cw-people-status {
  flex: none;
  margin-left: auto;
  color: var(--text-secondary, #8a8f98);
  font-size: 12px;
}

.cw-people-row[data-status='host'] .cw-people-status,
.cw-people-row[data-status='accepted'] .cw-people-status {
  color: #3aa66a;
}

.cw-people-row[data-status='declined'] .cw-people-name {
  opacity: 0.55;
  text-decoration: line-through;
}

.cw-people-joined {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3aa66a;
}

.cw-people-empty {
  color: var(--text-secondary, #8a8f98);
  font-size: 12px;
}

/* The Co-work view (js/app-shell/cowork_mode.js) draws sessions whatever the
   area filter says, so its menu would be a control that does nothing there.
   `!important`: the router shows it with an inline `display`. The rows go
   too, since a desktop shows them inside the Views dropdown instead
   (js/app-shell/views_placement.js). */
html[data-cowork-mode='on'] #area-filter-wrap,
html[data-cowork-mode='on'] #area-filter-panel {
  display: none !important;
}

/* ── One-click booking in the Co-work view ─────────────────────────────────
   The 25 / 50 / 75 picker (js/cowork-session/cowork_book_length.js) is in the
   topbar for good, and shown only while the Co-work view is on the Calendar. */
.cowork-length-wrap {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  margin-right: auto;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

html[data-cowork-mode='on']:has(#view-container[data-view='week']) .cowork-length-wrap {
  display: flex;
}

.cowork-length-label {
  padding: 0 6px 0 8px;
  color: var(--text-secondary);
}

.cowork-length-btn {
  padding: 4px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.cowork-length-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cowork-length-btn.is-active {
  background: rgba(74, 158, 255, 0.28);
  color: #fff;
}

/* The highlight under the mouse (views/week/…/modules/drag/cowork_book_gesture.js):
   where a click books, and for how long. Red, with the reason, where it cannot. */
.icx-cowork-book-preview {
  position: absolute;
  left: 2px;
  right: 2px;
  z-index: 10;
  box-sizing: border-box;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 6px;
  border: 2px solid rgba(74, 158, 255, 0.85);
  background: rgba(74, 158, 255, 0.18);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.3;
  pointer-events: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icx-cowork-book-preview.is-refused {
  border-color: rgba(235, 87, 87, 0.85);
  background: rgba(235, 87, 87, 0.14);
}

html[data-cowork-mode='on'] .intentional-calendar-x-time-grid-day {
  cursor: pointer;
}

/* The placed session waiting for Book (views/week/…/modules/drag/cowork_book_pending.js):
   Focusmate's layout — Book across the top, Clear across the bottom. */
.icx-cowork-book-pending {
  position: absolute;
  left: 2px;
  right: 2px;
  z-index: 11;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid #5b5bd6;
  background: var(--card, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
  cursor: default;
}

html:not([data-cowork-mode='on']) .icx-cowork-book-pending {
  display: none;
}

.icx-cowork-book-pending > button {
  flex: 0 1 36px;
  min-height: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.icx-cowork-book-pending-book {
  border: 0;
  background: #5b5bd6;
  color: #fff;
}

.icx-cowork-book-pending-book:hover {
  background: #4b4bc4;
}

.icx-cowork-book-pending-clear {
  border: 1px solid rgba(91, 91, 214, 0.45);
  background: transparent;
  color: #5b5bd6;
}

.icx-cowork-book-pending-clear:hover {
  background: rgba(91, 91, 214, 0.08);
}

.icx-cowork-book-pending-note {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  /* A line that does not fit wraps into a second column, off the card's right
     edge — whole lines vanish, never half of one. */
  flex-flow: column wrap;
  align-content: flex-start;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-secondary);
}

.icx-cowork-book-pending-note > span {
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icx-cowork-book-pending-note.is-refused {
  color: rgb(220, 70, 70);
}

/* An hour is 192px in the Co-work view (Seth, 2026-10-01: "one hour is kind of
   like a square"), so a 25-minute session is a card you can read and click.
   🔴 The same FOUR places views/do/do.css moves together, and the variables on
   `.dn__calendar` where calendar.css declares them — see the long note there.
   `#view-container[data-view='week']` keeps the Focus Timer's strip (its own
   108px) out of it. */
html[data-cowork-mode='on'] #view-container[data-view='week'] {
  --dn-cowork-hour-height: 192px;
}

html[data-cowork-mode='on'] #view-container[data-view='week'] .intentional-calendar-x-root .dn__calendar {
  --sx-week-grid-hour-height: var(--dn-cowork-hour-height);
  --intentional-calendar-x-half-hour-height: calc(var(--dn-cowork-hour-height) / 4);
}

html[data-cowork-mode='on'] #view-container[data-view='week'] .intentional-calendar-x-time-grid-day,
html[data-cowork-mode='on'] #view-container[data-view='week'] .intentional-calendar-x-root .dn__week-grid__time-axis {
  grid-template-rows: repeat(25, var(--dn-cowork-hour-height));
}

html[data-cowork-mode='on'] #view-container[data-view='week'] .intentional-calendar-x-time-grid-slot {
  min-height: var(--dn-cowork-hour-height);
}

/* ── A block's goals (js/cowork-session/event_goal_list.js; rows in cowork-card.css) ── */
.timed-block-popup-session-goals {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timed-block-popup-session-goals[hidden] {
  display: none;
}
.timed-block-popup-session-goal-take {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--overlay-rgb), 0.16);
  background: rgba(var(--overlay-rgb), 0.06);
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.timed-block-popup-session-goal-take:hover {
  background: rgba(var(--overlay-rgb), 0.1);
}
.timed-block-popup-session-goal-take:disabled {
  opacity: 0.6;
  cursor: default;
}
/* The status row that replaced Join / Leave is in cowork-card.css. */

/* × on a goal row: takes the goal off this block (the day goal stays). */
.timed-block-popup-session-goal-remove {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary, #8a8f98);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  opacity: 0;
}
.cw-tile-goal:hover .timed-block-popup-session-goal-remove,
.timed-block-popup-session-goal-remove:focus-visible {
  opacity: 1;
}
/* No hover on touch: the × is always there. */
@media (hover: none) {
  .timed-block-popup-session-goal-remove { opacity: 1; }
}

.timed-block-popup-session-goal-remove:hover {
  background: rgba(var(--overlay-rgb), 0.1);
  color: var(--text-primary);
}

/* × on a People row: the host uninvites a guest (session_people_view.js). */
.cw-people-remove {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary, #8a8f98);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  opacity: 0;
}
.cw-people-row:hover .cw-people-remove,
.cw-people-remove:focus-visible {
  opacity: 1;
}
.cw-people-remove:hover {
  background: rgba(var(--overlay-rgb), 0.1);
  color: var(--text-primary);
}
@media (hover: none) {
  .cw-people-remove { opacity: 1; }
}
.timed-block-popup-session-body .cw-people {
  margin-top: 0;
}
/* Rows without a × (the host, you) keep their answer in the same column. */
.cw-people-list.can-remove .cw-people-row:not(:has(.cw-people-remove)) {
  padding-right: 28px;
}
