/* Posting calendar (shared/calendar.js). Light by default (client portal); the admin overrides the --cal-* colours. */
.cal {
  --cal-bg: #fff; --cal-bg2: #F7F9FD; --cal-line: #DCE3F2; --cal-ink: #0E1A3D; --cal-mut: #66708C; --cal-sel: #2E51B9; --cal-today: #F19B38;
  --t-reel: #7C5CE0; --t-carousel: #2E7BD6; --t-long: #D8423A; --t-story: #C2589A; --t-community: #4E8B6A; --t-post: #5A6380;
  --t-live: #E0457B; --t-campaign: #C6A04A; --t-note: #8A93AD;
  --c: var(--t-post);
  color: var(--cal-ink);
}
.cal button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-title { font-size: 17px; min-width: 150px; text-align: center; }
.cal-arrow { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--cal-line) !important; font-size: 18px; line-height: 1; }
.cal-today { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--cal-line) !important; font-size: 13px; }
.cal-sp { flex: 1; }
.cal-seg { display: inline-flex; border: 1px solid var(--cal-line); border-radius: 999px; padding: 2px; }
.cal-seg button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--cal-mut); }
.cal-seg button.on { background: var(--cal-sel); color: #fff; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--cal-line); border-radius: 12px; overflow: hidden; background: var(--cal-line); gap: 1px; }
.cal-dow { background: var(--cal-bg2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cal-mut); padding: 6px 8px; }
.cal-cell { background: var(--cal-bg); min-height: 104px; padding: 4px 4px 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal-cell.out { background: var(--cal-bg2); }
.cal-cell.out .cal-n { opacity: .45; }
.cal-cell.past .cal-pill { opacity: .7; }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--cal-sel); }
.cal-cell.over { box-shadow: inset 0 0 0 2px var(--cal-today); }
.cal-n { font-size: 12px; font-weight: 600; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; margin: 0 0 1px 2px; }
.cal-cell.today .cal-n { background: var(--cal-today); color: #fff; }
.cal-pills { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-pill { display: block; font-size: 11.5px; line-height: 1.25; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, var(--cal-bg)); border-left: 3px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cal-ink); }
.cal-pill[draggable=true] { cursor: grab; }
.cal-pill.cont { height: 7px; padding: 0; margin: 4px -4px 4px -5px; border: 0; border-radius: 0; background: color-mix(in srgb, var(--c) 55%, transparent); }
.cal-pill.k-campaign:not(.cont) { margin-right: -4px; border-radius: 6px 0 0 6px; }
.cal-pill.st-draft { background: transparent; outline: 1px dashed color-mix(in srgb, var(--c) 60%, transparent); outline-offset: -1px; }
.cal-pill.st-cancelled { text-decoration: line-through; opacity: .5; }
.cal-pill.st-posted::before { content: "✓ "; font-weight: 700; color: var(--c); }
.cal-pill.has-sugg { box-shadow: inset -4px 0 0 var(--cal-today); }
.cal-more { font-size: 11px; color: var(--cal-mut); padding-left: 4px; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cal-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--c); }

/* tones */
.f-reel { --c: var(--t-reel); } .f-carousel { --c: var(--t-carousel); } .f-long { --c: var(--t-long); } .f-story { --c: var(--t-story); }
.f-community { --c: var(--t-community); } .f-post { --c: var(--t-post); }
.k-live { --c: var(--t-live); } .k-campaign { --c: var(--t-campaign); } .k-note { --c: var(--t-note); }

/* the chosen day + list view */
.cal-day, .cal-aday { margin-top: 14px; }
.cal-dayhead { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.cal-dayhead strong { font-size: 15px; }
.cal-aday.today .cal-dayhead strong { color: var(--cal-today); }
.cal-add { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--cal-line) !important; }
.cal-rows { display: flex; flex-direction: column; gap: 8px; }
.cal-row { display: grid; grid-template-columns: 4px 60px minmax(0, 1fr) auto; gap: 10px; align-items: start; text-align: left; width: 100%;
  background: var(--cal-bg); border: 1px solid var(--cal-line) !important; border-radius: 12px; padding: 10px 12px 10px 0; overflow: hidden; }
.cal-row .cal-bar { align-self: stretch; background: var(--c); margin: -10px 0; grid-row: 1 / span 2; }
.cal-row .cal-when { grid-row: 1 / span 2; }
.cal-row.st-draft { border-style: dashed !important; }
.cal-row.st-cancelled .cal-t { text-decoration: line-through; opacity: .6; }
.cal-when { display: flex; flex-direction: column; font-size: 12px; font-weight: 700; color: var(--cal-mut); padding-top: 2px; line-height: 1.3; }
.cal-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cal-st { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--cal-bg2); color: var(--cal-mut); letter-spacing: .04em; }
.cal-st.posted { color: #1F9D63; }
.cal-t { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.cal-acc { font-size: 12.5px; color: var(--cal-mut); }
.cal-note { font-size: 12.5px; color: var(--cal-mut); font-style: italic; overflow-wrap: anywhere; }
.cal-sugg { font-size: 12.5px; color: #9A5300; font-weight: 600; }
.cal-ps { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--cal-bg2); color: var(--cal-mut); white-space: nowrap; align-self: center; }
.cal-ps.client { background: #FFF1E0; color: #9A5300; } .cal-ps.changes { background: #FDE8E6; color: #D0473E; }
.cal-ps.approved { background: #E3F6EC; color: #1F9D63; } .cal-ps.published { background: #061946; color: #fff; }
.cal-when b { color: var(--cal-ink); font-weight: 700; }
.cal-wk { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cal-mut); margin: 22px 2px 0; padding-bottom: 6px; border-bottom: 1px solid var(--cal-line); }
.cal-agenda > .cal-wk:first-child { margin-top: 4px; }
.cal-empty { color: var(--cal-mut); font-size: 14px; margin: 6px 2px 10px; }

/* phones: dots in the grid, details in the day list */
@media (max-width: 640px) {
  .cal-title { min-width: 0; flex: 0 0 100%; text-align: left; order: -1; font-size: 18px; margin-bottom: 2px; }
  .cal-cell { min-height: 52px; align-items: center; padding: 4px 2px; }
  .cal-pills { display: none; }
  .cal-dots { display: flex; }
  .cal-dow { text-align: center; padding: 6px 0; }
  .cal-row { grid-template-columns: 4px 56px minmax(0, 1fr); }
  .cal-row .cal-ps { grid-column: 3; justify-self: start; }
}
