/* Calendar (revamp 2026-10-29, limbajul paginii Acasă). Mobil întâi: zilele una sub alta, postările ca rânduri cu
   miniatură; două coloane de zile de la 640px, săptămâna pe 7 coloane de la 1180px. Culorile vin doar din variabilele
   RelevantMark (shared/style.css) — aceleași pentru toți utilizatorii. */

.cal-page { display: flex; flex-direction: column; gap: 20px; max-width: 1320px; }

/* --- Antet + navigarea între săptămâni --- */
.cal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; }
.cal-hello { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-title {
  margin: 0; font-family: 'Newsreader', serif; font-weight: 600; line-height: 1.08; color: var(--accent-strong);
  font-size: clamp(28px, 4vw, 42px);
}
.cal-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); max-width: 620px; }

.weeknav {
  display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; flex: none; gap: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-inner); padding: 6px; box-shadow: var(--shadow-card);
}
.weeknav-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--accent-strong); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.weeknav-btn svg { width: 18px; height: 18px; }
.weeknav-btn:hover { border-color: var(--accent); color: var(--accent); }
.weeknav .range { font-size: 14.5px; font-weight: 700; color: var(--ink); white-space: nowrap; padding: 0 6px; min-width: 150px; text-align: center; }
.weeknav-today {
  min-height: 40px; border-radius: 10px; border: none; background: var(--accent-soft); color: var(--accent-strong);
  font: inherit; font-size: 13px; font-weight: 700; padding: 0 14px; cursor: pointer;
}
.weeknav-today:hover { background: var(--accent); color: #FFFFFF; }
.weeknav-btn:focus-visible, .weeknav-today:focus-visible, .cal-sum-cta:focus-visible, .cpost:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* --- Rezumatul: programate · publicate · de aprobat --- */
.cal-summary {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px;
}
.cal-sum-nums { display: flex; flex-wrap: wrap; gap: 10px 28px; flex: 1 1 320px; }
.cal-sum-item { display: flex; align-items: baseline; gap: 8px; }
.cal-sum-num {
  font-family: 'Newsreader', serif; font-weight: 600; line-height: 1; color: var(--accent-strong);
  font-size: clamp(34px, 5vw, 48px); font-variant-numeric: lining-nums tabular-nums;
}
.cal-sum-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.st-dot.scheduled { background: var(--review); }
.st-dot.published { background: var(--ok); }
.st-dot.pending { background: var(--amber); }
.cal-sum-cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px;
  background: var(--accent-strong); color: #FFFFFF; font-weight: 700; font-size: 15px; text-decoration: none;
}
.cal-sum-cta[hidden] { display: none; }
.cal-sum-cta:hover { background: var(--sidebar-bg); color: #FFFFFF; }
.cal-sum-cta svg { width: 17px; height: 17px; color: var(--cyan); }
.cal-sum-note { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.cal-sum-note:empty { display: none; }

.queue-note {
  background: var(--amber-soft); color: #6B4416; border: 1px solid #E4C692; border-radius: var(--radius-inner);
  padding: 12px 16px; font-size: 13.5px; line-height: 1.5;
}

/* --- Săptămâna --- */
.cal-week {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.cal-week .sec-head { margin: 0; }
.cal-week-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cleg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.cleg b { font-weight: 700; }
.cleg-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.cleg-state { color: var(--ink-soft); }
.cleg.is-disc .cleg-state { color: var(--danger); font-weight: 600; }
.cleg.is-off { opacity: .6; }
.cleg.is-off .cleg-state { font-style: italic; }

.board { min-width: 0; }
.cgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cday { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cday-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.cday-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.cday-date { font-size: 12.5px; color: var(--ink-soft); }
.cday.is-today .cday-name, .cday.is-today .cday-date { color: var(--accent); }
.cday.is-today .cday-posts { box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
.cday-posts { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cday-free {
  border-radius: var(--radius-inner); border: 1.5px dashed var(--border-strong); color: var(--ink-soft);
  font-size: 13px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px 12px;
}

/* O postare: pe telefon un rând (pătrat colorat + text), pe ecran lat o „carte” verticală (vezi media 1180px). */
.cpost {
  display: flex; align-items: center; gap: 12px; min-width: 0; border-radius: var(--radius-inner);
  border: 1px solid var(--border); background: #FBF8F2; padding: 8px; text-decoration: none; color: var(--ink);
}
a.cpost:hover { border-color: var(--accent); color: var(--ink); }
.cthumb {
  flex: none; width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #FFFFFF; font-weight: 800; font-size: 15px; position: relative; overflow: hidden;
}
.cthumb.is-ghost { background: var(--surface); border: 1.5px dashed currentColor; }
.cchip {
  display: none; font-size: 11px; font-weight: 800; color: #FFFFFF; background: rgba(11, 37, 48, .55);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.cbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.cmeta { font-size: 12.5px; font-weight: 700; }
.ctitle {
  font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ctitle.muted { color: var(--ink-soft); font-weight: 500; }
.cstate {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 2px 9px; margin-top: 2px; white-space: nowrap;
}
.cstate::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cstate.published { background: var(--ok); color: #FFFFFF; }
.cstate.published::before { content: '✓'; width: auto; height: auto; background: none; font-size: 11px; line-height: 1; }
.cstate.scheduled { background: var(--review-soft); color: var(--review); }
/* Chihlimbariul pe fundal deschis are nevoie de o nuanță mai închisă pentru contrast ≥ 4,5:1 la text mic. */
.cstate.pending { background: var(--amber-soft); color: #8E3A1C; }
.cstate.rejected { background: var(--surface-alt); color: var(--ink-soft); text-decoration: line-through; }
.cstate.planned { background: transparent; color: var(--ink-soft); border: 1px dashed var(--border-strong); }

/* Starea se vede și pe marginea cărții: în așteptare = chenar chihlimbariu; publicată = fundal alb, ușor mai stinsă în trecut. */
.cpost.st-pending { border-color: var(--amber); background: #FFF8F3; }
.cpost.st-published { background: var(--surface); }
.cday.is-past .cpost.st-published .cthumb { opacity: .85; }
.cpost.st-rejected { opacity: .7; }
.cpost.is-planned { background: transparent; border-style: dashed; border-color: var(--border-strong); }

.cal-off { border-top: 1px solid var(--border); padding-top: 12px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.cal-off p { margin: 0 0 4px; }
.cal-off b { color: var(--ink); }

/* Fundalul / textul în culoarea de brand a canalului (aceleași clase ca în acasa.css). */
.bg-linkedin { background: var(--ch-linkedin); }
.bg-facebook { background: var(--ch-facebook); }
.bg-instagram { background: var(--ch-instagram); }
.bg-x { background: var(--ch-x); }
.bg-email { background: var(--ch-email); }
.bg-blog { background: var(--ch-blog); }
.fg-linkedin { color: var(--ch-linkedin); }
.fg-facebook { color: var(--ch-facebook); }
.fg-instagram { color: var(--ch-instagram-solid); }
.fg-x { color: var(--ch-x); }
.fg-email, .fg-blog { color: var(--accent-strong); }

/* --- Tabletă: zilele câte două --- */
@media (min-width: 640px) {
  .cal-week { padding: 22px; }
  .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
  .cal-lead { font-size: 16px; }
}

/* --- Ecran lat: săptămâna pe 7 coloane, câte o „carte” pe postare --- */
@media (min-width: 1180px) {
  .cal-week { padding: 26px; }
  .cgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
  .cday-head { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
  .cday.is-today .cday-head { border-bottom-color: var(--accent); }
  .cday.is-today .cday-posts { box-shadow: none; padding-left: 0; }
  .cday-free { min-height: 112px; }
  .cpost { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
  .cthumb { width: auto; height: 64px; border-radius: 0; align-items: flex-end; justify-content: flex-start; padding: 8px; }
  .cthumb.is-ghost { height: 40px; border: none; border-bottom: 1.5px dashed var(--border-strong); align-items: center; }
  .cshort { display: none; }
  .cchip { display: inline-block; }
  .cbody { padding: 8px 10px 10px; }
  .cpost:not(.is-planned) .cmeta { display: none; }
  .ctitle { font-size: 12.5px; -webkit-line-clamp: 4; }
  .cstate { font-size: 11px; padding: 2px 8px; }
}
