/* =========================================================
   Life OS — social.css  (📣 Social: pages/social.js)
   ========================================================= */
.soc-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 16px; padding: 0 4px;
  border-radius: 5px; background: var(--pc); color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1;
}
.soc-badge.big { min-width: 24px; height: 20px; font-size: 0.68rem; border-radius: 6px; }
.soc-badges { display: inline-flex; gap: 2px; flex: 0 0 auto; }

/* Chips (calendar) */
.soc-chip {
  display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; text-align: left; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--pc) 35%, var(--border)); border-left: 3px solid var(--pc);
  background: color-mix(in srgb, var(--pc) 10%, var(--panel)); color: var(--text);
  border-radius: 6px; padding: 3px 5px; font-size: 0.74rem; margin-bottom: 3px;
}
.soc-chip:hover { background: color-mix(in srgb, var(--pc) 18%, var(--panel)); }
.soc-chip-time { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 0.7rem; flex: 0 0 auto; }
.soc-chip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.soc-chip.st-idea { opacity: 0.7; border-style: dashed; border-left-style: solid; }
.soc-chip.st-posted .soc-chip-title { text-decoration: line-through; color: var(--text-muted); }
.soc-chip.st-posted::after { content: '✓'; margin-left: auto; color: #22a06b; font-weight: 700; }
.soc-chip.dragging, .soc-card.dragging, .soc-tile.dragging { opacity: 0.35; }

/* Cards (board, lists) */
.soc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.soc-card { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); min-width: 0; }
.soc-card.st-posted { opacity: 0.75; }
.soc-card-thumb { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 8px; }
.soc-card-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.soc-card-title { text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--text); font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-card-title:hover { text-decoration: underline; }
.soc-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.74rem; color: var(--text-muted); }
.soc-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.soc-actions .btn-small { margin: 0; }
.soc-done-btn { border-color: color-mix(in srgb, #22a06b 45%, var(--border)); }
.soc-posted { font-size: 0.78rem; color: #22a06b; font-weight: 600; align-self: center; }

/* Thumbnails */
.soc-thumb { position: relative; overflow: hidden; background: color-mix(in srgb, var(--pc) 22%, var(--bg-soft)); display: flex; align-items: center; justify-content: center; }
.soc-thumb img, .soc-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.soc-thumb.text { background: linear-gradient(140deg, var(--pc), color-mix(in srgb, var(--pc) 45%, #1d1b3a)); }
.soc-thumb-text { color: #fff; font-weight: 700; font-size: 0.62rem; line-height: 1.2; padding: 5px; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; word-break: break-word; }
.soc-thumb-play { position: absolute; color: #fff; font-size: 0.8rem; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.soc-thumb-count { position: absolute; top: 3px; right: 4px; color: #fff; font-size: 0.6rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.soc-thumb.loading { animation: socShimmer 1s infinite alternate; }
@keyframes socShimmer { to { opacity: 0.6; } }

/* Dashboard */
.soc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.soc-week-day { border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-height: 92px; min-width: 0; background: var(--bg-soft); }
.soc-week-day.today { border-color: color-mix(in srgb, var(--dash-color, var(--accent)) 60%, var(--border)); background: color-mix(in srgb, var(--dash-color, var(--accent)) 7%, var(--bg-soft)); }
.soc-week-label { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; padding: 0 0 5px; font-size: 0.74rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.soc-plus { opacity: 0; font-size: 0.9rem; }
.soc-week .soc-chip .soc-badges, .soc-cal.month .soc-chip .soc-badges { display: none; }
.soc-chip { overflow: hidden; }       /* the colored edge already shows the platform */
.soc-week-day:hover .soc-plus { opacity: 1; }
@container (max-width: 640px) { .soc-week { grid-template-columns: 1fr; } .soc-week-day { min-height: 0; } }
.soc-mix { display: flex; flex-direction: column; gap: 6px; }
.soc-mix-row { display: grid; grid-template-columns: 120px 1fr 28px; align-items: center; gap: 8px; font-size: 0.8rem; }
.soc-mix-name { display: inline-flex; align-items: center; gap: 6px; }
.soc-mix-track { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.soc-mix-bar { height: 100%; border-radius: 99px; transition: width 0.5s var(--ease); }
.soc-mix-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* Calendar */
.soc-cal-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.soc-cal-bar .btn-small { margin: 0; }
.soc-cal-bar .icon-btn { font-size: 1.3rem; }
.soc-cal-title { font-weight: 600; min-width: 140px; text-align: center; }
.soc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel); margin-bottom: 12px; }
.soc-cal-dow { font-size: 0.7rem; color: var(--text-faint); text-align: center; padding: 5px 0; border-bottom: 1px solid var(--border); }
.soc-cal-cell { min-height: 104px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; cursor: pointer; }
.soc-cal-cell:nth-child(7n) { border-right: 0; }
.soc-cal.week .soc-cal-cell { min-height: 260px; }
.soc-cal-cell.other { background: var(--bg-soft); }
.soc-cal-cell.other .soc-cal-num { opacity: 0.45; }
.soc-cal-cell.today .soc-cal-num { color: #fff; background: var(--dash-color, var(--accent)); border-radius: 99px; display: inline-block; padding: 0 7px; }
.soc-cal-num { font-size: 0.75rem; font-weight: 600; margin-bottom: 3px; color: var(--text-muted); }
.soc-cal-items { min-height: 40px; }
.soc-cal-cell.drop-hover, .soc-week-day.drop-hover, .soc-col.drop-hover, .soc-pool.drop-hover { outline: 2px dashed var(--dash-color, var(--accent)); outline-offset: -3px; background: color-mix(in srgb, var(--dash-color, var(--accent)) 10%, transparent); }
.soc-pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 4px; border-radius: 8px; }
.soc-pool .soc-chip { width: auto; max-width: 260px; margin: 0; }
@container (max-width: 640px) {
  .soc-cal.week { grid-template-columns: 1fr; }
  .soc-cal.week .soc-cal-cell { min-height: 0; border-right: 0; }
  .soc-cal.month .soc-cal-cell { min-height: 64px; padding: 2px; }
  .soc-cal.month .soc-chip { padding: 2px 3px; font-size: 0.65rem; }
  .soc-cal.month .soc-chip .soc-badges, .soc-cal.month .soc-chip-time { display: none; }
}

/* Board */
.soc-board-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.soc-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 10px; min-width: 0; }
.soc-col { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); padding: 8px; min-height: 240px; display: flex; flex-direction: column; gap: 6px; }
.soc-col-head { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.86rem; padding: 2px 2px 4px; }
.soc-col-n { font-size: 0.72rem; color: var(--text-muted); background: var(--panel); border-radius: 99px; padding: 1px 7px; }
.soc-col-head .icon-btn { margin-left: auto; font-size: 1.1rem; }
.soc-col-items { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.soc-col-empty { font-size: 0.78rem; color: var(--text-faint); text-align: center; padding: 18px 4px; border: 1px dashed var(--border); border-radius: 8px; }
.soc-col.st-ready { border-top: 3px solid #2f80ed; }
.soc-col.st-posted { border-top: 3px solid #22a06b; }
.soc-col.st-draft { border-top: 3px solid #e8833a; }
.soc-col.st-idea { border-top: 3px solid #a5a29c; }

/* Feed preview */
.soc-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; max-width: 520px; margin: 0 auto; }
.soc-tile { position: relative; cursor: pointer; aspect-ratio: 1 / 1; border-radius: 2px; overflow: hidden; }
.soc-feed.tall .soc-tile { aspect-ratio: 9 / 16; }
.soc-feed.text { grid-template-columns: 1fr; max-width: 520px; }
.soc-feed.text .soc-tile { aspect-ratio: auto; min-height: 64px; border-radius: 10px; }
.soc-feed.text .soc-thumb-text { -webkit-line-clamp: 3; font-size: 0.85rem; text-align: left; }
.soc-tile-img { position: absolute; inset: 0; }
.soc-feed.text .soc-tile-img { position: relative; min-height: 64px; justify-content: flex-start; }
.soc-tile-tag { position: absolute; left: 4px; bottom: 4px; font-size: 0.62rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 1px 6px; border-radius: 99px; }
.soc-tile:not(.st-posted)::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); border-radius: inherit; pointer-events: none; }
.soc-tile.st-idea, .soc-tile.st-draft { filter: saturate(0.6); }
.soc-tile:hover { filter: brightness(1.08); }
.soc-tile.drop-before, .soc-tile.drop-after { outline: 3px solid var(--dash-color, var(--accent)); outline-offset: -3px; }

/* Platform toggles */
.soc-plat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.soc-plat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 99px; border: 1px solid var(--border); background: var(--panel); color: var(--text-muted); cursor: pointer; font-size: 0.82rem; }
.soc-plat .soc-badge { filter: grayscale(1); opacity: 0.55; }
.soc-plat.on { color: var(--text); border-color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, var(--panel)); font-weight: 600; }
.soc-plat.on .soc-badge { filter: none; opacity: 1; }

/* Editor */
.soc-editor { width: min(640px, 94vw); max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.soc-ed-head { display: flex; align-items: center; justify-content: space-between; }
.soc-ed-title { font-size: 1.05rem; font-weight: 600; }
.soc-ed-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.soc-ed-row .pop-field { margin: 0; }
.soc-status-seg { width: 100%; }
.soc-status-seg .seg-btn { padding: 6px 4px; }
.soc-ed-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.soc-ed-tools .btn-small, .soc-open-row .btn-small, .soc-ed-foot .btn-small { margin: 0; }
.soc-caption { resize: vertical; min-height: 120px; line-height: 1.45; font-size: 0.92rem; }
.soc-counts { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.74rem; color: var(--text-muted); }
.soc-count { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.soc-count.over { color: var(--danger); font-weight: 700; }
.soc-media { display: flex; flex-wrap: wrap; gap: 8px; }
.soc-media-item { position: relative; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); }
.soc-media-item img, .soc-media-item video { width: 100%; height: 100%; object-fit: cover; }
.soc-media-tools { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; }
.soc-media-tools .icon-btn { width: 24px; height: 24px; background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 6px; }
.soc-media-add { width: 104px; height: 104px; border-radius: 10px; border: 2px dashed var(--border); background: transparent; color: var(--text-muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 0.74rem; }
.soc-media-add span { font-size: 1.4rem; }
.soc-media-add:hover { border-color: var(--dash-color, var(--accent)); color: var(--text); }
.soc-open-row { display: flex; flex-wrap: wrap; gap: 6px; }
.soc-open-row:empty { display: none; }
.soc-ed-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }

/* Hashtags & templates */
.soc-lib { display: flex; flex-direction: column; gap: 10px; }
.soc-lib-item { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.soc-lib-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.soc-lib-row .btn-small { margin: 0; }
.soc-lib-name { flex: 1; min-width: 120px; font-weight: 600; }
.soc-lib-new { border-style: dashed; }
.soc-lib-new .btn-small { align-self: flex-start; margin: 0; }

/* Reminder banner */
.soc-remind {
  position: fixed; right: 16px; bottom: 16px; z-index: 8000; width: min(420px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid color-mix(in srgb, #0ea5e9 50%, var(--border)); border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: popIn 0.25s var(--ease);
}
.soc-remind-head { display: flex; gap: 10px; align-items: flex-start; }
.soc-remind-head > div { flex: 1; min-width: 0; }
.soc-remind-icon { font-size: 1.5rem; }
.soc-remind-title { font-weight: 700; }
.soc-remind-sub { font-size: 0.8rem; color: var(--text-muted); }
.soc-remind-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.soc-remind-actions .btn-small { margin: 0; }

/* 📣 tag on the main Calendar */
.cal-social { border-left: 3px solid var(--pc) !important; text-decoration: none; }
.cal-social.done span { text-decoration: line-through; opacity: 0.7; }
