/* ob-plan.css (R6-T2): the Plan shell, header, view control and calendar read notes. Tokens only. */
#obp-head { margin-bottom: 16px; }
#obp-head .obp-head-row {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
}
#obp-head .obp-head-text { min-width: 0; flex: 0 1 auto; }
#obp-head .obp-title { margin: 0; }
#obp-head .obp-sub { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* The view bar (Day/Week/Month plus the two action hosts) lives in #obp-head until a view moves it into its own card. */
.obp-viewbar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }
#obp-head .obp-viewbar { flex: 1 1 auto; }
.obp-viewbar .obp-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.obp-act-host { display: inline-flex; align-items: center; min-height: 44px; }
.obp-act-host:empty { display: none; }
.obp-act-host[data-online="false"] button { opacity: 0.55; cursor: not-allowed; }

/* Day / Goals chips (the sub-views) and the Day / Week / Month control: real buttons, 44 px high. */
.obp-chips { display: inline-flex; gap: 0; padding: 4px; background: var(--obds-card-soft); border-radius: var(--obds-radius-pill); }
.obp-chip {
  min-height: 44px; min-width: 64px; padding: 0 18px; border: 0; border-radius: var(--obds-radius-pill);
  background: transparent; color: var(--obds-text-soft); font: inherit; font-weight: 600; cursor: pointer;
}
/* theme.css forces `:root[data-theme] button { background ...!important }`; these rules outrank it on purpose. T-PLAN-WEB: Day / Goals is ONE segment (board PlanDayStreamPhone). */
:root[data-theme] .obp-chip { background: transparent !important; color: var(--obds-text-soft) !important; border-color: transparent !important; }
:root[data-theme] .obp-chip[aria-pressed="true"] { background: var(--obds-card) !important; color: var(--obds-text) !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
:root[data-theme] .obp-seg-btn { background: transparent !important; color: var(--obds-text-soft) !important; }
:root[data-theme] .obp-seg-btn[aria-pressed="true"] { background: var(--obds-card) !important; color: var(--obds-text) !important; }
:root[data-theme] button.obp-note-act { background: var(--obds-card) !important; color: var(--obds-accent-deep) !important; }
.obp-seg {
  display: inline-flex; gap: 2px; padding: 4px; max-width: 100%;
  background: var(--obds-card-soft); border: 1px solid var(--obds-border); border-radius: var(--obds-radius-pill);
}
.obp-seg-btn {
  min-height: 44px; min-width: 76px; padding: 0 18px; border: 0; border-radius: var(--obds-radius-pill);
  background: transparent; color: var(--obds-text-soft); font: inherit; font-weight: 600; cursor: pointer;
}
.obp-seg-btn[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--obds-border); }
.obp-chip:focus-visible, .obp-seg-btn:focus-visible { outline: 2px solid var(--obds-accent); outline-offset: 2px; }
@media (max-width: 599px) {
  /* One compact row: the title and the Day / Goals chips; the subtitle is hidden. */
  #obp-head { margin-bottom: 8px; }
  #obp-head .obp-head-row { flex-wrap: wrap; }
  #obp-head .obp-head-text { flex: 1 1 auto; }
  #obp-head .obp-sub { display: none; }
  #obp-head .obp-head-row > .obp-viewbar { flex: 1 0 100%; }   /* only while no view has moved it */
  .obp-viewbar .obp-seg { order: 1; display: flex; flex: 1 0 100%; width: 100%; }
  .obp-seg-btn { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .obp-viewbar .obp-head-actions { order: 2; margin-left: 0; width: 100%; }
}

/* The calendar read note (banner and the empty-day cell). */
.obp-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; min-height: 44px;
  background: var(--obds-card-soft); border: 1px solid var(--obds-border); border-radius: var(--obds-radius-md);
  color: var(--obds-text); font-size: 14px; line-height: 1.4;
}
.obp-note > span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.obp-note-act {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--obds-border); border-radius: var(--obds-radius-pill); background: var(--obds-card);
  color: var(--obds-accent-deep); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.obp-note-act:focus-visible { outline: 2px solid var(--obds-accent); outline-offset: 2px; }

#obp-day, #obp-week, #obp-month, #obp-panel { min-width: 0; }

/* N2 (30 Oct 2026, PG-013): on a phone the Plan page's shell top bar holds only the theme half-moon, an empty 80 px strip above the head that no
   board draws. It goes on every Plan view (Day, Week, Month, Goals); the theme switch stays reachable in You > Appearance and the shell footer. */
@media (max-width: 599px) {
  body[data-obp-view] .obds-topbar { display: none; }
}

/* T-VISUAL-PLAN review: ONE view switcher, Day | Week | Month | Goals. On a phone it takes its own full-width row under the title. */
.obp-chip { min-width: 0; padding: 0 16px; }
@media (max-width: 599px) {
  #obp-head .obp-head-row > .obp-head-text { flex: 1 1 auto; }
  #obp-head .obp-head-row > .obp-chips { order: 5; flex: 1 0 100%; display: flex; margin-left: 0; }
  #obp-head .obp-head-row > .obp-chips .obp-chip { flex: 1 1 0; padding: 0 6px; }
}

/* parity: the header is one row on a tablet too: the title block gives way (its sub line ends in an ellipsis) so the switcher, the calendar and the "+" never wrap */
@media (min-width: 600px) { #obp-head .obp-head-row { flex-wrap: nowrap; } #obp-head .obp-head-row > .obp-head-text { flex: 1 1 0; min-width: 0; } #obp-head .obp-head-row > .obp-viewbar { flex: 0 1 auto; } }

/* t6204 (4 Nov 2026): the Week and Month phone header is the Day and Goals one (title row, then the full-width switcher); the 31 Oct "Month cap" that squeezed the switcher onto the title row made it jump under the finger. */
@media (max-width: 599px) { html[data-plan-view] #obp-head .obp-sub { display: block; color: var(--ob3-muted, var(--obds-text-soft)); font-size: 0.9375rem; line-height: 1.3; white-space: normal; overflow: visible; text-overflow: clip; max-width: none; } }
@media (max-width: 599px) { body[data-obp-view] #obp-head .obp-title { font-size: 2rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; } }
}
