/* Glass Slack — Slack-dark theme, sized for the Meta display glasses (600x600).
   High-contrast, large type, single-column: legible on a tiny near-eye panel. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #1a1d21;  /* app background */
  --bar:       #350d36;  /* Slack aubergine top bar */
  --panel:     #222529;  /* rows / cards */
  --panel-sel: #1164a3;  /* selected row (Slack blue) */
  --ink:       #d1d2d3;  /* primary text */
  --dim:       #9a9ca0;  /* secondary text */
  --me:        #2bac76;  /* "you" accent */
  --accent:    #e8912d;  /* highlights */
  --key:       #2c2f33;
  --key-sel:   #1164a3;
}

html, body {
  width: 600px;
  height: 600px;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  user-select: none;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  position: relative;
  width: 600px;
  height: 600px;
  display: flex;
  flex-direction: column;
}

/* ---------- top bar ---------- */
#bar {
  flex: 0 0 56px;
  background: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 24px;
  font-weight: 700;
}
#bar-team { font-size: 18px; font-weight: 400; color: #d9b8da; }

/* ---------- main view ---------- */
#view {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
}

/* ---------- bottom hint bar ---------- */
#hint {
  flex: 0 0 40px;
  background: #101214;
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 16px;
  letter-spacing: 0.2px;
}
#hint b { color: var(--ink); font-weight: 600; }

/* ---------- generic centered screens (auth / loading / error) ---------- */
.center {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 30px;
}
.center h1 { font-size: 40px; }
.center p { font-size: 20px; color: var(--dim); max-width: 460px; }
.cta {
  margin-top: 10px;
  background: var(--me);
  color: #06251a;
  font-size: 24px;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 12px;
}
.err { color: #ff6b6b; font-size: 18px; }

/* ---------- conversation list ---------- */
#list {
  height: 100%;
  overflow-y: auto;
  padding: 8px 0;
  scroll-behavior: smooth;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 22px;
  border-left: 4px solid transparent;
}
.row .sigil { width: 26px; text-align: center; color: var(--dim); font-weight: 700; }
.row .label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .badge {
  background: var(--accent);
  color: #1a1d21;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 8px;
}
.row.sel {
  background: var(--panel-sel);
  border-left-color: #fff;
  color: #fff;
}
.row.sel .sigil { color: #cfe4f5; }

/* ---------- messages ---------- */
#msgs {
  height: 100%;
  overflow-y: auto;
  padding: 14px 18px 18px;
  scroll-behavior: smooth;
}
.msg {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-left: 3px solid transparent;
  border-radius: 6px;
}
.msg.sel { background: #2a2d31; border-left-color: var(--accent); }
.msg .meta { font-size: 15px; color: var(--dim); margin-bottom: 2px; }
.msg .meta .who { color: var(--ink); font-weight: 700; }
.msg.me .meta .who { color: var(--me); }
.msg .body { font-size: 20px; line-height: 1.3; white-space: pre-wrap; word-break: break-word; }
.msg .body a { color: #6ab7ff; }

/* reaction chips under a message */
.reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.react-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2c2f33;
  border: 1px solid #3a3d42;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 16px;
  color: var(--ink);
}
.react-chip.mine { background: #11364f; border-color: var(--panel-sel); }

/* the final "row" in a conversation: a tap-to-write compose affordance */
.msg-input {
  margin: 10px 6px 4px;
  padding: 14px 16px;
  border: 2px solid #3a3d42;
  border-radius: 12px;
  color: var(--dim);
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-input.sel {
  border-color: var(--accent);
  color: var(--ink);
  background: #222529;
}
.msg-input::before { content: "✎ "; }

/* ---------- compose / on-screen keyboard ---------- */
#compose { height: 100%; display: flex; flex-direction: column; }
#draft {
  flex: 0 0 auto;
  min-height: 64px;
  margin: 14px 18px;
  padding: 12px 14px;
  background: var(--panel);
  border: 2px solid #3a3d42;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1.3;
  word-break: break-word;
}
#draft .caret { color: var(--accent); animation: blink 1s steps(1) infinite; }
#draft .interim { color: var(--dim); }
#draft .mic { margin-left: 6px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#draft.empty::before { content: "Type or tap 🎤 to speak…"; color: var(--dim); }

#vstat {
  flex: 0 0 auto;
  height: 20px;
  margin: -6px 18px 4px;
  font-size: 15px;
  color: var(--accent);
  text-align: center;
}

#kbd {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 12px;
}
.krow { display: flex; gap: 8px; justify-content: center; }
.kkey {
  flex: 1 1 0;
  text-align: center;
  background: var(--key);
  border-radius: 8px;
  padding: 12px 0;
  font-size: 22px;
  min-width: 0;
}
.kkey.wide { flex: 2 1 0; font-size: 18px; }
.kkey.sel { background: var(--key-sel); color: #fff; outline: 2px solid #fff; }
.kkey.act { color: var(--accent); font-weight: 700; }

/* ---------- reaction picker ---------- */
#emoji {
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}
.etile {
  width: 118px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  background: var(--key);
  border-radius: 14px;
}
.etile.cancel { font-size: 32px; color: var(--dim); }
.etile.sel { background: var(--key-sel); outline: 3px solid #fff; }

/* thin custom scrollbars so they don't dominate the small screen */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #3a3d42; border-radius: 3px; }
