/* observations.css — Observations page styles */

/* Capture strip host; the strip itself is in obs-capture.css. */
.obs-capture-host {
  background: var(--surface);
  border-bottom: 0.5px solid var(--divider-medium);
  padding: 10px 12px;
  flex-shrink: 0;
}
.obs-capture-host .obsc {
  border: 0;
  padding: 0;
}

/* ── Popover (shared) ──────────────────────────────────────── */
.obs-popover {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--overlay-pressed);
  border-radius: var(--radius);
  box-shadow:
    0 8px 30px var(--overlay-pressed),
    0 0 0 0.5px var(--divider-subtle);
  max-height: 380px;
  display: none;
  overflow: hidden;
}
.obs-popover.open {
  display: flex;
  flex-direction: column;
}
.obs-popover.right-align {
  left: auto;
  right: 0;
}
.obs-popover-search {
  font-size: var(--text-base);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  width: 100%;
  outline: none;
  box-sizing: border-box;
  color: var(--text);
}
.obs-popover-search::placeholder {
  color: var(--text-3);
}
.obs-popover-list {
  overflow-y: auto;
  flex: 1;
}
.obs-popover-item {
  padding: 5px 10px;
  cursor: pointer;
  font-size: var(--text-base);
  color: var(--text);
  transition: background 0.08s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.obs-popover-item:hover {
  background: rgba(0, 122, 255, 0.06);
}
.obs-popover-item.selected {
  background: rgba(0, 122, 255, 0.04);
  font-weight: 600;
}
.obs-popover-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-2xs);
  color: transparent;
  transition:
    background-color 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.obs-popover-item.selected .obs-popover-check {
  background: var(--active);
  border-color: var(--active);
  color: #fff;
}
.obs-popover-section {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
  padding: 8px 10px 3px;
  user-select: none;
}
.obs-popover-section:not(:first-child) {
  border-top: 1px solid var(--border);
  margin-top: 2px;
  padding-top: 8px;
}
.obs-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* The Term Questionnaire's observations search (report-questionnaire.js,
   reports.css .qno-search) is drawn with these. */
.obs-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.obs-search-icon {
  position: absolute;
  left: 8px;
  pointer-events: none;
  color: var(--text-3);
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
}
.obs-search-icon svg {
  width: 13px;
  height: 13px;
}
.obs-search-input {
  height: var(--chip-h);
  font-family: var(--font-base);
  font-size: var(--text-sm);
  padding: 0 12px 0 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--overlay-hover);
  color: var(--text);
  outline: none;
  width: 180px;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.obs-search-input:focus {
  background: var(--surface);
  border-color: var(--active);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.obs-search-input::placeholder {
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════════════════
   TOOLBAR — Search, Show and the filter chips (obs-toolbar.js)
   The same "Three Things" bar as the Assignments and Gradebook pages: the
   parts they share (Search with its Filter button, Show's badges, the
   chips) are in styles.css, the panel's frame in gradebook.css. Every
   control is --control-h tall, a chip --chip-h. The filter panel floats over
   the feed, under Search.
   ══════════════════════════════════════════════════════════════ */
.obs-toolbar {
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  gap: 8px;
  /* Search is 280 wide when there is room, and gives way to 160 first. */
  --atb-search-min: 160px;
  --atb-search-max: 280px;
}
/* The panel: Student and Tag (a search box over a list that scrolls), Type
   with Date, Context with Assessment and Quoted. A column keeps the width it
   was drawn at, so a search that hides rows does not narrow it. */
.obp-panel .gbf-cols {
  max-height: var(--obp-cols-h, none);
  overflow-y: auto;
}
.obp-col {
  min-width: 180px;
  max-width: none;
}
/* Every row is the panel's 34px, in a short column and in a list that
   scrolls alike: the Gradebook's rows grow across a row, not down a column. */
.obp-col .assess-filter-item {
  flex: 0 0 auto;
}
.obp-find {
  display: block;
  width: calc(100% - 8px);
  height: 28px;
  margin: 2px 4px 4px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: rgba(118, 118, 128, 0.12);
  color: var(--text);
  font-family: var(--font-base);
  font-size: var(--text-sm);
  outline: none;
}
.obp-find::placeholder {
  color: var(--text-3);
}
.obp-find:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--active);
}
.obp-panel .obp-list {
  height: 272px;
  max-height: none;
}
.obp-gap {
  margin-top: 8px;
}
.obp-section {
  margin-top: 4px;
}
/* From and To, under Custom Dates. */
.obp-dates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 10px 2px;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.obp-dates[hidden] {
  display: none;
}
.obp-dates label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.obp-dates input {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  color: var(--text);
  background: var(--surface);
}

/* Point to preview: while the pointer or the keyboard rests on an unpressed
   Open Concerns, the cards that are not open concerns dim (a Concern with a
   Resolved follow-up is closed). The delay keeps the feed still as the
   pointer crosses the bar. */
.page-layout:has(.atb-show [data-show='concerns']:is(:hover, :focus-visible):not([aria-pressed='true']))
  #obs-feed
  :is(.obs-card:not([data-sentiment='concern']), .obs-card:has(.obs-fu-closed)) {
  opacity: 0.35;
}
@media (prefers-reduced-motion: no-preference) {
  #obs-feed .obs-card {
    transition:
      box-shadow 0.12s,
      border-color 0.12s,
      opacity 150ms ease 120ms;
  }
}

/* ══════════════════════════════════════════════════════════════
   FEED
   ══════════════════════════════════════════════════════════════ */
.obs-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* 12px from the page's edges and between boxes, as on every page. */
  padding: 0 12px 20px;
}
.obs-feed-date-group {
  margin-top: 18px;
}
.obs-feed-date-label {
  display: flex;
  align-items: baseline;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-3);
  margin: 0 4px 8px;
}
.obs-feed-date-count {
  margin-left: auto;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.obs-feed .obs-feed-date-group {
  max-width: 860px;
}
.obs-feed .obs-card {
  margin-bottom: 12px;
}
/* Under the newest observations: how many show, and Show More. */
.obs-feed-more {
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--text-3);
}

/* One observation: a fixed type column so names line up, the note, a
   meta line, and a delete that shows on hover or focus. */
.obs-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 24px;
  gap: 0 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 10px 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition:
    box-shadow 0.12s,
    border-color 0.12s;
}
.obs-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 2px 8px var(--overlay-hover);
}
.obs-card:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}

.obs-card-main {
  min-width: 0;
}
.obs-card-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.obs-card-student {
  font-size: var(--text-base);
  font-weight: 650;
  color: var(--text);
}
.obs-card-with {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.obs-card-time {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Without a name (the student page) the date leads the line. */
.obs-card-time:first-child {
  margin-left: 0;
}
.obs-card-text {
  font-size: var(--text-md);
  color: var(--text);
  line-height: 1.5;
  margin-top: 3px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Meta line: the setting is lightest, a linked assessment reads as a
   link, tags keep their dots, a quoted note gets a stamp at the right. */
.obs-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: var(--text-sm);
}
.obs-card-context {
  color: var(--text-3);
}
.obs-card-assessment {
  color: var(--link);
  font-weight: 500;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.obs-card-meta .obs-card-link {
  color: var(--text-2);
  white-space: nowrap;
}
.obs-card-meta .obsc-pill-competency {
  background: none;
  color: var(--link);
  font-weight: 500;
}
/* The tags flow on the meta line with the context. */
.obs-card-dims {
  display: contents;
}
/* A tag: a chip on other screens (Class Settings starters), plain text
   with its dot on the card. */
.obs-card-dim {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 6px;
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--overlay-hover);
  color: var(--text-2);
}
.obs-card-meta .obs-card-dim {
  gap: 5px;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: 400;
  background: none;
  white-space: nowrap;
}
.obs-card-dim .dim-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.obs-card-quoted {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0 6px;
  line-height: 18px;
  white-space: nowrap;
}

/* Delete shows on hover or keyboard focus only (it also lives in the
   edit window). Touch screens without hover always show it. */
.obs-card-delete {
  justify-self: end;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 3px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition:
    opacity 0.12s,
    color 0.12s,
    background 0.12s;
}
.obs-card:hover .obs-card-delete,
.obs-card:focus-within .obs-card-delete,
.obs-card-delete:focus-visible {
  opacity: 1;
}
.obs-card-delete:hover {
  background: var(--overlay-hover);
  color: var(--priority);
}
@media (hover: none) {
  .obs-card-delete {
    opacity: 1;
  }
}

/* Text pills on other screens (the Assignments comment popover, the
   questionnaire, Class Settings starters, the evidence drawer). The
   feed card does not use them. */
.obs-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--surface);
}
.obs-pill-type {
  border-color: transparent;
  font-weight: 600;
}
.obs-pill-type[data-sentiment='strength'] {
  color: var(--score-3);
  background: color-mix(in srgb, var(--score-3) 12%, transparent);
}
.obs-pill-type[data-sentiment='growth'] {
  color: var(--link);
  background: color-mix(in srgb, var(--active) 12%, transparent);
}
.obs-pill-type[data-sentiment='concern'] {
  color: var(--score-2);
  background: color-mix(in srgb, var(--score-2) 14%, transparent);
}
.obs-pill-type[data-sentiment='note'] {
  color: var(--obs-note-text);
  background: color-mix(in srgb, var(--obs-note) 22%, transparent);
}
.obs-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.obs-empty-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}
.obs-empty-sub {
  font-size: var(--text-base);
}

/* ══════════════════════════════════════════════════════════════
   FOCUS CARD — Click-to-expand modal with inline editing
   ══════════════════════════════════════════════════════════════ */
.obs-focus-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.15s;
}
.obs-focus-backdrop.open {
  opacity: 1;
  transition: opacity 0.2s;
}

/* The edit window: the feed card grown, with the types in a folder band. */
.obs-focus-card {
  width: 680px;
  max-width: calc(100% - 48px);
  max-height: calc(100vh - 80px);
  overflow: visible;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.obs-focus-card.open {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.obs-focus-card > .obs-band {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.obs-focus-body {
  padding: 14px 18px 16px;
}
.obs-focus-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.obs-focus-student {
  font-size: var(--text-lg);
  font-weight: 650;
  color: var(--text);
}
.obs-focus-with {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.obs-focus-textarea {
  min-height: 104px;
  max-height: 280px;
  overflow-y: auto;
}
.obs-focus-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.obs-focus-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border: none;
  background: none;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--danger);
  cursor: pointer;
}
.obs-focus-delete:hover {
  text-decoration: underline;
}
.obs-focus-hint {
  margin-left: 12px;
  font-size: var(--text-xs);
  color: var(--text-3);
}
.obs-focus-spacer {
  flex: 1;
}

.obs-focus-tag-popover-wrap {
  position: relative;
  display: inline-flex;
}
.obs-focus-tag-popover-wrap .obs-popover {
  bottom: 100%;
  top: auto;
  margin-bottom: 4px;
  margin-top: 0;
}

/* ══════════════════════════════════════════════════════════════
   ROSTER AND OPEN CONCERNS (page-observations.js syncRoster)
   Days since each student was last observed, amber from 3 weeks; the
   Not Observed in 3+ Weeks switch above the list; the Open Concerns
   button at the head of the filters. They replace the Dashboard's
   Observations grid (DECISIONS, "Observations off the Dashboard").
   ══════════════════════════════════════════════════════════════ */
/* The days replace the grades here, so the grades menu goes. */
body.obs-roster #sb-show-btn {
  display: none;
}
#gb-sidebar .student-row-mark.obs-days {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
#gb-sidebar .student-row-mark.obs-days.is-overdue {
  font-weight: 700;
  color: var(--score-2-text);
}
.obs-roster-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
  padding: 0 10px 0 12px;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--score-2-text);
  background: var(--score-2-bg);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.obs-roster-toggle-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.obs-roster-toggle-n {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.obs-roster-toggle.active {
  color: #fff;
  background: var(--score-2);
}
.obs-roster-toggle:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}

/* The type block and the tags on this page's cards are buttons (ObsCard.html,
   filters: true): they set the Type and Tag filters. */
button.obs-type {
  padding: 0;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
button.obs-type:hover {
  filter: brightness(0.94);
}
button.obs-type:focus-visible,
button.obs-card-dim:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
button.obs-card-dim {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.obs-card-meta button.obs-card-dim {
  padding: 0 2px;
  border-radius: 4px;
  color: var(--text-2);
}
.obs-card-meta button.obs-card-dim:hover {
  background: var(--overlay-hover);
  color: var(--text);
}
