/* ==========================================================================
   theFlourish — Slack replica
   A faithful Slack client mock, used as a product visual. Self-contained: it
   carries Slack's own palette and depends on no site tokens, so it drops into
   any page and looks identical on light or dark themes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   SLACK REPLICA
   A faithful Slack client mock used as the pillar visuals. It reproduces
   Slack's own light UI, so its colours are deliberately hardcoded and do NOT
   follow the site theme — a real Slack window looks the same on either.
   -------------------------------------------------------------------------- */
.slack-ui {
  --sl-plum: #3f0e40;
  --sl-plum-top: #4a154b;
  --sl-hover: rgba(255, 255, 255, 0.12);
  --sl-text: #1d1c1d;
  --sl-text-2: #616061;
  --sl-line: #e2e2e2;
  --sl-skel: #ececec;

  container-type: inline-size;
  background: var(--sl-plum-top);
  border-radius: 10px;
  overflow: hidden;
  font-family: 'Lato', var(--sans, 'Geist', 'Inter', system-ui, sans-serif);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  user-select: none;
  /* Host sections may be centred; a chat client is always left-aligned. */
  text-align: left;
}

/* --- title bar: traffic lights, search, account --- */
.slack-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}

.slack-lights {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.slack-lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.slack-lights i:nth-child(1) { background: #ff5f57; }
.slack-lights i:nth-child(2) { background: #febc2e; }
.slack-lights i:nth-child(3) { background: #28c840; }

.slack-search {
  flex: 1;
  height: 25px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--sl-hover);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.slack-search svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.slack-account {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: #2f7d6d;
}

/* --- shell: rail + white panel --- */
.slack-shell {
  display: flex;
  padding: 0 8px 8px 0;
  min-height: 0;
}

.slack-rail {
  width: 58px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 4px 10px;
  background: var(--sl-plum);
}

.slack-rail-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #36c5f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.slack-rail-logo svg {
  width: 17px;
  height: 17px;
  color: #fff;
}

.slack-rail-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 4px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.slack-rail-item svg {
  width: 18px;
  height: 18px;
}

.slack-rail-item span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.slack-rail-item.is-active {
  background: var(--sl-hover);
  color: #fff;
}

.slack-rail-me {
  margin-top: auto;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #2f7d6d;
}

.slack-rail-me::after {
  content: '';
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2bac76;
  border: 2px solid var(--sl-plum);
}

/* --- white message panel --- */
.slack-panel {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.slack-chanhead {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 900;
  color: var(--sl-text);
  border-bottom: 1px solid var(--sl-line);
  flex-shrink: 0;
}

.slack-chanhead .hash {
  font-weight: 400;
  color: var(--sl-text-2);
}

.slack-chanhead svg {
  width: 12px;
  height: 12px;
  color: var(--sl-text-2);
}

.slack-feed {
  padding: 12px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Greyed-out earlier history, so the channel reads as a live one. */
.slack-skel {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
}

.slack-skel-av {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--sl-skel);
}

.slack-skel-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.slack-skel-lines i {
  height: 8px;
  border-radius: 4px;
  background: var(--sl-skel);
}

.slack-msg {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
  align-items: start;
}

.slack-av {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #5b4a7d;
}

.slack-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.slack-name {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--sl-text);
  letter-spacing: -0.01em;
}

.slack-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1px 4px;
  border-radius: 2px;
  background: #e8e8e8;
  color: var(--sl-text-2);
}

.slack-time {
  font-size: 11px;
  color: var(--sl-text-2);
}

.slack-text {
  font-size: 13.5px;
  line-height: 1.46;
  color: var(--sl-text);
}

.slack-text strong {
  font-weight: 700;
}

.slack-text a,
.slack-link {
  color: #1264a3;
}

.slack-text ul {
  margin: 4px 0 0;
  padding-left: 17px;
}

.slack-text li {
  margin-bottom: 2px;
}

/* Slack's message attachment: a coloured bar on the left edge. */
.slack-attach {
  margin-top: 7px;
  padding-left: 11px;
  border-left: 4px solid #1264a3;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.46;
  color: var(--sl-text);
}

.slack-actions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.slack-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 4px;
  border: 1px solid rgba(29, 28, 29, 0.3);
  background: #fff;
  color: var(--sl-text);
}

.slack-btn--primary {
  background: #007a5a;
  border-color: #007a5a;
  color: #fff;
}

.slack-reactions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.slack-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 11px;
  background: #f8f8f8;
  border: 1px solid var(--sl-line);
  color: var(--sl-text-2);
}

.slack-reaction--mine {
  background: #e8f5fa;
  border-color: #1264a3;
  color: #1264a3;
}

/* --- composer --- */
.slack-composer {
  margin: 10px 14px 14px;
  border: 1px solid #b7b7b7;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  flex-shrink: 0;
}

.slack-composer-plus {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--sl-text-2);
}

.slack-composer-field {
  flex: 1;
  font-size: 12.5px;
  color: #8d8d8e;
}

.slack-send {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #8d8d8e;
  flex-shrink: 0;
}

.slack-send svg {
  width: 16px;
  height: 16px;
}

/* Narrow embeds: drop the rail labels, then the rail itself. */
@container (max-width: 400px) {
  .slack-rail { width: 46px; }
  .slack-rail-item span { display: none; }
  .slack-feed { padding: 10px 11px 4px; }
  .slack-composer { margin: 8px 11px 11px; }
}

@container (max-width: 300px) {
  .slack-rail { display: none; }
  .slack-shell { padding: 0 8px 8px 8px; }
}
