/* ============================================================
   content.css — Studio · Content calendar (Nelson only)
   Loads after inbox-crm.css and reuses its chrome: the ink top
   bar and day list, the warm paper work surface, numbered gold
   cards, status chips. Only what's new to this page lives here.
   ============================================================ */

/* inbox-crm.css gives views a display; hidden must still win (the Inbox gets this from inbox.css) */
[hidden] { display: none !important; }

/* ---------------- the shell (same split as the Inbox) ---------------- */
#calView:not([hidden]) {
  display: grid; grid-template-columns: var(--list-w) minmax(0, 1fr);
  height: calc(100dvh - var(--bar-h) - env(safe-area-inset-top)); min-height: 0;
}
.cc .lpane-count { margin-left: auto; }
.crm-stat b small { font-size: 0.55em; color: var(--muted); margin-left: 0.08em; }
.crm-stat.zero b small { color: var(--faint); }
/* the stats are the status filters: the one that's on gets a quiet gold wash */
button.crm-stat[aria-pressed="true"] { background: rgba(233, 185, 73, 0.14); }
button.crm-stat:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* ---------------- the days (ink) ---------------- */
.cc .lgroup { display: flex; justify-content: space-between; gap: 1rem; }
.cc .lgroup span { color: var(--faint); letter-spacing: 0.08em; }
.cc-row { align-items: center; }
.cc-date {
  display: grid; place-items: center; align-content: center; width: 40px; height: 44px;
  border: 1px solid var(--ink-edge); border-radius: 8px; background: var(--ink-2); color: var(--text);
}
.cc-date i { font: normal 500 0.58rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cc-date b { font: 400 1.3rem/1 var(--font-display); margin-top: 0.18rem; font-variant-numeric: tabular-nums; }
.cc-row.is-today .cc-date { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.cc-row.is-today .cc-date i { color: rgba(11, 11, 13, 0.72); }
.cc-today { font-style: normal; font-weight: 600; color: var(--gold); }
.cc-row.is-done .crow-name { color: var(--muted); }
.cc-row .crow-top { align-items: center; }
.cc-row .crow-what { margin-top: 0.1rem; }

/* ---------------- the post (paper) ---------------- */
.cc .work-empty { display: grid; gap: 0.2rem; }
.cc .work-empty[hidden] { display: none; }
.cc-sk { display: grid; gap: 0.8rem; width: min(560px, 80vw); }
.cc-sk i { display: block; height: 110px; border-radius: 12px; background: var(--paper-2); }
.cc-sk i:first-child { height: 56px; width: 60%; }
@media (prefers-reduced-motion: no-preference) { .cc-sk i { animation: sk 1.1s var(--ease) infinite alternate; } }

.cc .wsub b { font-weight: 500; }

/* where the post stands: one tap, left to right */
.cc-status { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--paper-edge); border-radius: 999px; background: var(--card); }
.cc-status button, .cc-plat button {
  min-height: 34px; padding: 0 0.95em; border: 0; border-radius: 999px; background: transparent;
  font: 600 0.88rem var(--font-ui); color: var(--paper-muted);
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease);
}
.cc-status button.is-past { color: var(--paper-ink); }
.cc-status button[aria-pressed="true"], .cc-plat button[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper); }
.cc-status button[aria-pressed="true"][data-status="posted"] { background: var(--green-ink); }
.cc-status button:active, .cc-plat button:active, .cc-copy:active { transform: scale(0.97); }
.cc-plat button:disabled { color: var(--paper-edge); cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .cc-status button:not([aria-pressed="true"]):hover, .cc-plat button:not([aria-pressed="true"]):not(:disabled):hover { color: var(--paper-ink); background: var(--paper-2); }
}

.cc-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0 1rem;
  padding: 1rem clamp(1rem, 2.2vw, 2rem) 2.5rem;
}
.cc-body[hidden] { display: none; }
.cc-col { min-width: 0; }
.cc .scard { padding: 0.95rem 1.15rem 1.1rem; }
.cc .scard > header { flex-wrap: wrap; }
.cc-meta { margin-left: auto; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--paper-faint); font-variant-numeric: tabular-nums; }
.cc-meta.is-over { color: var(--red-ink); }

.cc-label, .cc-where span, .cc-when span {
  display: block; margin: 0 0 0.3rem; font-family: var(--font-mono); font-weight: 500; font-size: 0.6875rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-muted);
}
.cc-hook { margin: 0 0 0.9rem; font: 600 1.3rem/1.3 var(--font-body); letter-spacing: -0.005em; color: var(--paper-ink); max-width: 40ch; text-wrap: balance; }
.cc-hook.is-none, .cc-caption.is-none, .cc-none { font: 0.95rem/1.5 var(--font-ui); color: var(--paper-muted); }
.cc .facts { margin-top: 0.2rem; }
.cc .facts div { grid-template-columns: 7.6rem minmax(0, 1fr); }

/* the script: numbered beats, so "Beat 3" in the shot list points somewhere */
.cc-script { list-style: none; margin: 0; padding: 0; counter-reset: beat; display: grid; gap: 0.75rem; }
.cc-script li { counter-increment: beat; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.5rem; }
.cc-script li::before { content: counter(beat); padding-top: 0.32rem; font: 500 0.6875rem/1 var(--font-mono); color: var(--paper-faint); }
.cc-script li.cc-none { grid-template-columns: 1fr; }
.cc-script li.cc-none::before { content: none; }
.cc-script p { margin: 0; font: 1.06rem/1.6 var(--font-body); max-width: 62ch; overflow-wrap: anywhere; }
/* the card's one action sits at the top, so on set it's open, tap, paste */
.cc-act { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem 1rem; margin: 0 0 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--paper-line); }
.cc-where { margin: 0; flex: 1 1 14rem; font: 0.9rem/1.4 var(--font-ui); color: var(--paper-ink); }
.cc-where:empty { visibility: hidden; }
.cc-copy { display: inline-flex; align-items: center; gap: 0.45rem; }
.cc-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cc-copy.is-done { background: var(--green-ink); border-color: var(--green-ink); color: var(--paper); }

/* shot list: angle code + direction */
.cc-shots { list-style: none; margin: 0; padding: 0; }
.cc-shots li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--paper-line); font: 0.95rem/1.45 var(--font-ui); }
.cc-shots li:first-child { border-top: 0; padding-top: 0.1rem; }
.cc-shots li.cc-note { grid-template-columns: minmax(0, 1fr); }
.cc-code { align-self: start; display: grid; place-items: center; height: 24px; border-radius: 6px; border: 1px solid var(--paper-edge); color: var(--paper-ink); font: 600 0.72rem var(--font-mono); letter-spacing: 0.04em; }

/* captions */
.cc-plat { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--paper-edge); border-radius: 999px; background: #fffdf9; margin-bottom: 0.8rem; }
.cc-plat button { flex: 1; padding: 0 0.6em; font-size: 0.86rem; }
.cc-act-cap { margin-bottom: 0.75rem; padding-bottom: 0; border-bottom: 0; }
.cc-when { display: flex; align-items: baseline; gap: 0.6rem; margin: 0; font: 600 0.92rem var(--font-ui); }
.cc-when span { margin: 0; }
.cc-count { margin: 0.5rem 0 0; text-align: right; }
.cc-caption {
  padding: 0.85rem 0.95rem; background: #fffdf9; border: 1px solid var(--paper-edge); border-radius: 10px;
  font: 0.98rem/1.55 var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--paper-ink);
}
.cc-caption:focus-visible { outline: 2px solid var(--paper-ink); outline-offset: 2px; }

/* before you post */
.cc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.cc-checks li { position: relative; padding-left: 1.4rem; font: 0.95rem/1.45 var(--font-ui); }
/* plain markers, not boxes: nothing here is tickable, so nothing should look tickable */
.cc-checks li::before { content: ""; position: absolute; left: 0.25rem; top: 0.55em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--paper-ink); }
.cc-checks li.cc-standing { color: var(--paper-muted); }
.cc-checks li.cc-standing::before { background: var(--paper-edge); }

.cc #noteBox { min-height: 110px; }

/* ---------------- feedback ---------------- */
.cc-err { color: var(--red); font: 0.9rem var(--font-ui); margin: 0.4rem 0 0; min-height: 1.2em; }
.cc-toast {
  position: fixed; z-index: 70; left: 50%; top: calc(var(--bar-h) + 10px + env(safe-area-inset-top));
  transform: translate(-50%, -8px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  padding: 0.65rem 1.1rem; border-radius: 999px; background: var(--paper-ink); color: var(--paper);
  border: 1px solid rgba(245, 242, 235, 0.16); box-shadow: 0 10px 28px rgba(11, 11, 13, 0.28); font: 600 0.92rem var(--font-ui);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.cc-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) {
  .cc-toast { top: auto; bottom: 20px; left: 20px; transform: translateY(8px); }
  .cc-toast.show { transform: translateY(0); }
}

/* ---------------- sizes ---------------- */
/* big screens: script + shots on the left, captions + checks + notes on the right */
@media (min-width: 1180px) {
  .cc-body { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); }
}
@media (min-width: 760px) and (max-height: 860px) {
  .cc .whead { padding-top: 1.1rem; }
  .cc .whead h2 { font-size: 2.2rem; }
}
@media (max-width: 959px) and (min-width: 760px) {
  .cc .whead { grid-template-areas: "id" "acts"; padding-bottom: 0.9rem; }
}
@media (max-width: 1179px) and (min-width: 960px) {
  .cc .whead { padding-bottom: 0.9rem; }
}

/* phones: one screen at a time, the page scrolls */
@media (max-width: 759px) {
  #calView:not([hidden]) { display: block; height: auto; }
  .cc .whead { grid-template-areas: "id" "acts"; padding-bottom: 0.9rem; }
  .cc .crumb { display: none; }
  .cc .whead-acts { display: block; }
  .cc-status { display: flex; width: 100%; }
  .cc-status button { flex: 1; min-height: 44px; padding: 0 0.3em; }
  .cc-body { display: block; overflow: visible; padding: 0.9rem 16px calc(2rem + env(safe-area-inset-bottom)); }
  .cc .scard { padding: 0.9rem 0.95rem 1rem; }
  .cc-hook { font-size: 1.2rem; }
  .cc-script p { font-size: 1.04rem; }
  .cc-plat button { min-height: 44px; }
  .cc-act .cc-copy { width: 100%; justify-content: center; height: 48px; font-size: 1rem; }
  .cc-act-cap .cc-when { flex: 1 1 100%; }
  .cc-date { height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-status button, .cc-plat button, .cc-toast { transition: none; }
}
