/* Slack UI kit — Slack's own brand, with Numbers Game MCP posts inside */

@import url('../../colors_and_type.css');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body {
  background: #1A1718;
  color: #1D1C1D;
  font-family: 'Hanken Grotesk', "Lato", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ───────── Slack workspace nav (super-left rail) ───────── */
.slack {
  --s-rail-bg: #481349;
  --s-rail-fg: rgba(255,255,255,0.78);
  --s-side-bg: #19171D;
  --s-side-bg-2: #232026;
  --s-side-fg: #D1D2D3;
  --s-side-fg-dim: #9B9A9E;
  --s-active: #1164A3;
  --s-active-fg: #FFFFFF;
  --s-main-bg: #FFFFFF;
  --s-ink: #1D1C1D;
  --s-ink-2: #616061;
  --s-ink-3: #868686;
  --s-line: #DDDDDD;
  --s-line-2: #E8E8E8;
  --s-link: #1264A3;
  --s-mention: #E8912D;

  width: 1440px;
  height: 900px;
  margin: 40px auto;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 68px 280px 1fr;
  background: var(--s-rail-bg);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.2),
    0 32px 96px rgba(0,0,0,0.5),
    0 12px 32px rgba(0,0,0,0.3);
  font-size: 15px;
  line-height: 1.5;
  color: var(--s-ink);
}

/* Workspace rail */
.slack-rail {
  background: var(--s-rail-bg);
  display: flex; flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  gap: 14px;
}
.slack-rail .workspace {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ink);
  border: 2px solid white;
  color: #F2EBDC;
  display: flex; align-items: center; justify-content: center;
  font: italic 400 18px ui-serif, Georgia, serif;
  cursor: pointer;
}
.slack-rail .nav {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 6px; flex: 1;
}
.slack-rail .nav .ic {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--s-rail-fg);
  font: 600 10px/1.1 'Hanken Grotesk', sans-serif;
  gap: 3px; cursor: pointer;
}
.slack-rail .nav .ic.active { background: rgba(255,255,255,0.10); color: white; }
.slack-rail .nav .ic span { font-size: 10px; }
.slack-rail .avatar {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: #6B7A8F;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font: 600 12px sans-serif;
  margin-top: auto;
  position: relative;
}
.slack-rail .avatar::after {
  content: ""; position: absolute;
  bottom: -2px; right: -2px;
  width: 12px; height: 12px;
  background: #007A5A;
  border: 2px solid var(--s-rail-bg);
  border-radius: 50%;
}

/* ───────── Channel sidebar ───────── */
.slack-side {
  background: var(--s-side-bg);
  color: var(--s-side-fg);
  display: flex; flex-direction: column;
  min-height: 0;
}
.slack-side .ws-head {
  padding: 12px 16px 10px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.slack-side .ws-head .name { font: 700 17px/1 sans-serif; color: white; }
.slack-side .ws-head .meta { font: 12px/1 sans-serif; color: var(--s-side-fg-dim); margin-top: 4px; }
.slack-side .ws-head .grow { flex: 1; }
.slack-side .ws-head .compose {
  width: 32px; height: 32px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--s-side-bg);
}

.slack-side .sect { padding: 6px 0; }
.slack-side .sect-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px 6px;
  font: 600 13px/1.2 sans-serif;
  color: var(--s-side-fg);
}
.slack-side .sect-head .ico { color: var(--s-side-fg-dim); }
.slack-side .row {
  display: flex; align-items: center; gap: 10px;
  height: 28px;
  padding: 0 16px;
  font: 400 15px/1 sans-serif;
  color: var(--s-side-fg);
  cursor: pointer;
}
.slack-side .row:hover { background: rgba(255,255,255,0.04); }
.slack-side .row.active {
  background: var(--s-active);
  color: var(--s-active-fg);
  font-weight: 700;
}
.slack-side .row .hash { font-weight: 400; opacity: 0.85; }
.slack-side .row.active .hash { opacity: 1; }
.slack-side .row .mention {
  margin-left: auto;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: #E01E5A;
  border-radius: 9px;
  font: 700 11px/18px sans-serif;
  color: white; text-align: center;
}
.slack-side .row.bot .ic {
  width: 18px; height: 18px;
  border-radius: 3px;
  background: var(--ink); color: var(--ochre-soft);
  display: flex; align-items: center; justify-content: center;
  font: italic 700 11px ui-serif, Georgia, serif;
}
.slack-side .row.unread { font-weight: 700; color: white; }
.slack-side .row.unread .hash { opacity: 1; }

/* ───────── Main panel ───────── */
.slack-main {
  background: var(--s-main-bg);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}

.slack-head {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--s-line);
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
}
.slack-head .ch-title {
  display: flex; align-items: center; gap: 6px;
  font: 800 18px/1 sans-serif;
  color: var(--s-ink);
}
.slack-head .ch-title .hash { color: var(--s-ink-2); font-weight: 400; }
.slack-head .ch-meta {
  font: 13px/1.3 sans-serif;
  color: var(--s-ink-2);
}
.slack-head .ch-meta strong { color: var(--s-ink); font-weight: 600; }
.slack-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.slack-head .members {
  display: flex; align-items: center;
  background: white; border: 1px solid var(--s-line); border-radius: 6px;
  padding: 3px 8px 3px 4px; gap: 6px;
}
.slack-head .members .av {
  width: 22px; height: 22px; border-radius: 4px;
  background: #BAA4D2; color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 10px sans-serif;
  margin-left: -4px;
}
.slack-head .members .av:first-child { margin-left: 0; }
.slack-head .members .count { font: 700 13px sans-serif; color: var(--s-ink-2); margin-left: 6px; }

/* ───────── Thread ───────── */
.slack-thread {
  flex: 1; overflow-y: auto;
  padding: 16px 0 110px;
}
.slack-msg {
  padding: 8px 24px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
}
.slack-msg:hover { background: #F8F8F8; }
.slack-msg .av {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: #BAA4D2; color: white;
  display: flex; align-items: center; justify-content: center;
  font: 700 14px sans-serif;
  flex: none;
}
.slack-msg.bot .av {
  background: var(--ink);
  color: #F2EBDC;
  font: italic 700 16px ui-serif, Georgia, serif;
}
.slack-msg .who {
  font: 900 15px/1.2 sans-serif;
  color: var(--s-ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.slack-msg .app-badge {
  font: 600 10px/1 sans-serif;
  background: var(--s-line);
  color: var(--s-ink-2);
  padding: 2px 4px; border-radius: 3px;
  letter-spacing: 0.04em;
}
.slack-msg .ts {
  font: 12px/1 sans-serif;
  color: var(--s-ink-3);
  margin-left: 6px;
}
.slack-msg .text {
  font: 15px/1.5 sans-serif;
  color: var(--s-ink);
  margin-top: 2px;
}
.slack-msg .text a { color: var(--s-link); text-decoration: none; }
.slack-msg .text .mention { color: var(--s-link); background: rgba(29, 155, 209, 0.10); padding: 0 3px; border-radius: 3px; }
.slack-msg .text strong { font-weight: 700; }

/* attachment with left color bar */
.slack-att {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 4px 1fr;
  max-width: 580px;
  border-radius: 4px;
  overflow: hidden;
  background: #F8F8F8;
  border: 1px solid var(--s-line-2);
}
.slack-att .bar { background: var(--ochre); }
.slack-att .att-body { padding: 14px 16px; }
.slack-att .att-pretitle {
  font: 700 12px/1 sans-serif;
  color: var(--s-ink-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.slack-att .att-title {
  font: 700 15px/1.3 sans-serif;
  color: var(--s-ink);
  margin-top: 4px;
}
.slack-att .att-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 24px;
  margin-top: 12px;
}
.slack-att .att-fields .lbl {
  font: 700 12px/1.2 sans-serif;
  color: var(--s-ink);
}
.slack-att .att-fields .val {
  font: 14px/1.3 sans-serif;
  color: var(--s-ink);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.slack-att .att-fields .val.pos { color: #2E7D32; }
.slack-att .att-fields .val.neg { color: #C62828; }
.slack-att .att-summary {
  font: 14px/1.55 sans-serif;
  color: var(--s-ink-2);
  margin-top: 12px;
}
.slack-att .att-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.slack-att .att-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: white;
  border: 1px solid var(--s-line);
  border-radius: 4px;
  font: 700 13px sans-serif;
  color: var(--s-ink);
  cursor: pointer;
}
.slack-att .att-btn.primary {
  background: #007A5A;
  border-color: #007A5A;
  color: white;
}
.slack-att .att-flagged {
  margin-top: 12px;
  background: white;
  border: 1px solid var(--s-line);
  border-radius: 4px;
  padding: 10px 14px;
}
.slack-att .att-flagged .h {
  font: 700 12px sans-serif; color: var(--s-ink-2);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.slack-att .att-flagged .item {
  display: flex; justify-content: space-between;
  font: 14px/1.4 sans-serif; color: var(--s-ink);
  padding: 4px 0;
  border-bottom: 1px solid #F0F0F0;
}
.slack-att .att-flagged .item:last-child { border-bottom: 0; }
.slack-att .att-flagged .item .v { color: var(--s-ink-2); font-variant-numeric: tabular-nums; }

/* File card (PDF preview) */
.slack-file {
  margin-top: 8px;
  max-width: 420px;
  background: white;
  border: 1px solid var(--s-line);
  border-radius: 4px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
}
.slack-file .ic {
  width: 48px; height: 48px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font: 700 11px sans-serif;
  letter-spacing: 0.06em;
}
.slack-file .ic .nmark {
  font: italic 400 18px ui-serif, Georgia, serif;
}
.slack-file .info .name {
  font: 700 14px sans-serif;
  color: var(--s-ink);
}
.slack-file .info .meta {
  font: 12px/1.3 sans-serif;
  color: var(--s-ink-2);
  margin-top: 2px;
}

/* Reactions */
.slack-reacts {
  display: flex; gap: 4px;
  margin-top: 8px; flex-wrap: wrap;
}
.slack-reacts .r {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 8px;
  background: white;
  border: 1px solid var(--s-line);
  border-radius: 12px;
  font: 700 12px sans-serif;
  color: var(--s-ink-2);
}
.slack-reacts .r.you { background: #E8F5FA; border-color: #1264A3; color: #1264A3; }
.slack-reacts .r .emoji {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* Thread reply summary */
.slack-replies {
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font: 13px/1 sans-serif;
  color: var(--s-link);
  cursor: pointer;
}
.slack-replies:hover { background: white; border: 1px solid var(--s-line); padding: 3px 7px; }
.slack-replies .avs { display: flex; }
.slack-replies .avs .av {
  width: 20px; height: 20px; border-radius: 3px;
  margin-left: -3px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 9px sans-serif; color: white;
  border: 2px solid white;
}
.slack-replies .avs .av:first-child { margin-left: 0; }
.slack-replies strong { font-weight: 700; }
.slack-replies .last { color: var(--s-ink-3); font-weight: 400; }

/* Day divider */
.slack-divider {
  display: flex; align-items: center;
  padding: 14px 24px 8px;
  font: 700 13px sans-serif;
  color: var(--s-ink-2);
}
.slack-divider::before {
  content: ""; flex: 1; height: 1px; background: var(--s-line);
  margin-right: 12px;
}
.slack-divider .pill {
  background: white;
  border: 1px solid var(--s-line);
  border-radius: 12px;
  padding: 3px 10px;
}
.slack-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--s-line);
  margin-left: 12px;
}

/* Composer */
.slack-composer-wrap {
  position: absolute; bottom: 16px; left: calc(68px + 280px + 24px); right: 24px;
}
.slack-composer {
  background: white;
  border: 1px solid var(--s-line);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.slack-composer .input {
  padding: 12px 16px;
  font: 15px sans-serif;
  color: var(--s-ink-3);
  min-height: 24px;
}
.slack-composer .row {
  display: flex; align-items: center;
  padding: 4px 8px;
  border-top: 1px solid var(--s-line-2);
  gap: 4px;
}
.slack-composer .row .ic {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--s-ink-2);
  border-radius: 4px;
}
.slack-composer .row .grow { flex: 1; }
.slack-composer .send {
  width: 28px; height: 28px;
  background: #007A5A;
  color: white;
  border: 0;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.slack-main { position: relative; }
