/* Editorial calendar (pages/calendar.js) – calmer grid, planned vs. published at a glance, compact side panel. Loaded after layout.css. */
.bp-cal { border-radius: calc(var(--radius) + 4px); }
.bp-calhead div { padding: 10px 10px 8px; font-weight: 600; color: var(--text-2); background: var(--surface); }
.bp-calhead div:nth-child(n+6) { color: var(--text-3); }
.bp-day { min-height: 118px; padding: 8px; gap: 5px; background: var(--surface); }
.bp-day:nth-child(7n), .bp-day:nth-child(7n-1) { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.bp-day.past, .bp-day.out { background: var(--surface-2); }
.bp-day.past .dn, .bp-day.out .dn { color: var(--text-3); font-weight: 500; }
.bp-day:not(.past):not(.out):hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.bp-day .dn { font-size: 13px; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.bp-day.today { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.bp-day.today .dn { width: 26px; height: 26px; }

/* events: planned = dashed outline (still to come), published = soft fill + ✓, failed = red + ! */
.bp-ev { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 5px; padding: 4px 7px; border-radius: 7px; font-size: 12px; line-height: 1.3;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 45%, var(--border)); }
.bp-ev svg { display: none; }
.bp-ev .tm { font-weight: 600; color: var(--text-2); }
.bp-ev .tt { grid-column: 1 / -1; color: var(--text); }
.bp-ev.st-scheduled, .bp-ev.st-publishing { border-style: dashed; }
.bp-ev.st-published { opacity: 1; background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--surface)); border-color: transparent; }
.bp-ev.st-published .tt { color: var(--text-2); }
.bp-ev.st-failed { background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.bp-ev:hover { background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--surface)); text-decoration: none; }
.bp-ev.st-published::after { content: "✓"; grid-row: 1; grid-column: 3; justify-self: end; color: var(--ok); font-weight: 700; font-size: 11px; }
.bp-ev.st-failed::after { content: "!"; grid-row: 1; grid-column: 3; justify-self: end; color: var(--err); font-weight: 700; }

/* side panel: compact lists that scroll instead of making the page endless */
.bp-calside .card-body { max-height: 420px; overflow: auto; }
.bp-unpl { display: flex; flex-direction: column; gap: 8px; }
.bp-uitem { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; }
.bp-uitem::before { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bp-uitem > a { flex: 1; min-width: 0; }
.bp-uitem > .xs { order: 3; flex-basis: 100%; padding-left: 18px; }
.bp-uitem .btn { margin: 0; order: 2; align-self: center; }

@media (max-width: 700px) {
  .bp-day { min-height: 64px; padding: 4px; }
  .bp-cal.month .bp-ev { display: block; padding: 0; height: 6px; border: 0; background: var(--c); }
  .bp-cal.month .bp-ev::before, .bp-cal.month .bp-ev::after { content: none; }
  .bp-cal.week .bp-day { min-height: 0; padding: 10px; }
  .bp-cal.week .bp-day:nth-child(7n), .bp-cal.week .bp-day:nth-child(7n-1) { background: var(--surface); }
  .bp-calside .card-body { max-height: none; }
}
.cal-key { display: inline-flex; align-items: center; gap: 6px; }
.cal-key i { width: 18px; height: 11px; border-radius: 4px; display: inline-block; margin-left: 8px; }
.cal-key i:first-child { margin-left: 0; }
.cal-key .k-plan { border: 1px dashed var(--text-3); } .cal-key .k-pub { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); } .cal-key .k-fail { background: var(--err-bg); border: 1px solid color-mix(in srgb, var(--err) 40%, transparent); }
