/* Retro's own styling, on top of room-base.css. Phone first: everything stacks by default and spreads out on wide screens.
   No inline styles anywhere (strict CSP): colours come from classes. */

.acc-green  { --acc: #1a9b55; }
.acc-red    { --acc: #d64545; }
.acc-blue   { --acc: #3b7ddd; }
.acc-amber  { --acc: #c98a14; }
.acc-purple { --acc: #8a56d6; }
.acc-teal   { --acc: #17a2a2; }
.acc-slate  { --acc: #6b7a90; }

.row.wrap { flex-wrap: wrap; }
.rt-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
button, select { max-width: 100%; }
button { min-height: 40px; }
button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button.ghost.small { padding: 6px 10px; }
.rt-panel { min-width: 0; }
.rt-panel > * { min-width: 0; }
.stack > * { min-width: 0; }

/* ---- who is here, tabs ---- */
.rt-presence { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 2px 6px; }
.rt-who.away { opacity: .55; }
.rt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px; margin: 0 0 16px; }
.rt-tabs button { white-space: normal; line-height: 1.2; padding: 8px 14px; }
@media (max-width: 600px) { .rt-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .rt-tabs button { padding: 6px 4px; font-size: 14px; } }

/* ---- header of a running retro ---- */
.rt-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.rt-title h1 { margin: 0; }
.rt-steps { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.rt-steps li { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-size: 14px; min-width: 0; }
.rt-steps .n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--border); color: var(--text); flex: none; }
.rt-steps li.done { color: var(--text); }
.rt-steps li.done .n { background: var(--good); color: #fff; }
.rt-steps li.current { border-color: var(--accent); color: var(--text); font-weight: 700; box-shadow: 0 0 0 1px var(--accent) inset; }
.rt-steps li.current .n { background: var(--accent); color: #fff; }
.rt-steps .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .rt-steps li:not(.current) .l { display: none; } .rt-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); } .rt-steps li.current { grid-column: span 2; } }
.rt-hostbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.rt-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.rt-limit { display: inline-flex; align-items: center; gap: 4px; }
.rt-limit button { min-width: 40px; padding: 4px 10px; }
.rt-hint { color: var(--muted); margin: 4px 0 14px; }
.rt-gate { border-color: var(--caution); }
.rt-gate h3 { margin: 0 0 4px; }
.rt-flash { margin: 0 0 8px; color: var(--good); font-weight: 600; }

/* ---- columns (write, group, past records) ---- */
.rt-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; align-items: start; }
.rt-col { min-width: 0; background: var(--panel); border: 1px solid var(--border); border-top: 5px solid var(--acc, var(--border)); border-radius: 10px; padding: 12px; }
.rt-col h3 { margin: 0 0 2px; font-size: 18px; color: var(--text); }
.rt-col h3 .muted { font-weight: 400; }
.rt-col > p { margin: 0 0 8px; }
.rt-compose { display: grid; gap: 8px; margin: 8px 0; }
.rt-compose textarea { min-height: 64px; }
.rt-count { margin: 0 0 8px; }
.rt-list { display: grid; gap: 8px; }

/* ---- cards and topics ---- */
.rt-card { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--acc, var(--border)); border-radius: 8px; padding: 10px; min-width: 0; overflow-wrap: anywhere; }
.rt-card.mine { border-left-color: var(--accent); }
.rt-card p { margin: 0 0 6px; white-space: pre-wrap; }
.rt-card.editing { display: grid; gap: 8px; }
.rt-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-card-actions:empty { display: none; }
.rt-topic { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--acc, var(--border)); border-radius: 8px; padding: 8px; margin: 0 0 8px; min-width: 0; overflow-wrap: anywhere; }
.rt-topic > .rt-card { border: 0; padding: 4px; border-radius: 0; background: transparent; }
.rt-group { border-left-width: 6px; background: color-mix(in srgb, var(--acc, #888) 8%, var(--panel)); }
.rt-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.rt-group-head h4 { margin: 0; font-size: 16px; }
.rt-group-cards { display: grid; gap: 6px; }
.rt-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; margin: 6px 0; }
@media (max-width: 420px) { .rt-picker { grid-template-columns: minmax(0, 1fr); } }
.rt-dot { color: var(--acc); font-weight: 700; font-size: 13px; }

/* ---- vote ---- */
.rt-votebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; }
.rt-pips { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.rt-pips i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); display: inline-block; }
.rt-pips i.on { background: var(--accent); }
.rt-voting { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.rt-vote { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.rt-vote-body { min-width: 0; flex: 1; }
.rt-vote-body h4 { margin: 0 0 4px; }
.rt-vote-card { margin: 0 0 4px; white-space: pre-wrap; }
.rt-stepper { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.rt-stepper button { min-width: 44px; min-height: 44px; font-size: 22px; padding: 0; line-height: 1; }
.rt-stepper .n { min-width: 24px; text-align: center; font-weight: 700; font-size: 18px; }

/* ---- discuss: current topic + form on the left, takeaways on the right, topic list below; stacked on phones ---- */
.rt-discuss { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; grid-template-areas: "current" "side" "list"; align-items: start; }
.rt-current { grid-area: current; min-width: 0; }
.rt-side { grid-area: side; min-width: 0; margin: 0; }
.rt-topics { grid-area: list; min-width: 0; }
@media (min-width: 900px) {
  .rt-discuss { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "current side" "list side"; }
  .rt-side { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow-y: auto; }
}
.rt-now { border-left: 6px solid var(--acc, var(--accent)); margin: 0; }
.rt-now-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.rt-now-card { font-size: 18px; margin: 4px 0; white-space: pre-wrap; }
.rt-votes { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; background: var(--border); font-weight: 700; flex: none; }
.rt-nudge { background: color-mix(in srgb, var(--caution) 14%, var(--panel)); border: 1px solid var(--caution); border-radius: 8px; padding: 10px; margin: 8px 0; display: grid; gap: 8px; }
.rt-row { display: flex; align-items: center; gap: 10px; }
.rt-row.current { outline: 2px solid var(--accent); }
.rt-row.discussed { opacity: .7; }
.rt-row-body { min-width: 0; flex: 1; }
.rt-row-body p { margin: 0 0 2px; white-space: pre-wrap; }
.rt-takeaway-form { display: grid; gap: 8px; margin-bottom: 12px; }
.rt-prompt { font-weight: 700; }
.rt-side h3 { margin: 0 0 8px; }

/* ---- action items ---- */
.rt-items { display: grid; gap: 10px; }
.rt-item { background: var(--panel); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 10px; padding: 12px; min-width: 0; overflow-wrap: anywhere; }
.rt-side .rt-item { background: var(--bg); }
.rt-item.st-done { border-left-color: var(--good); }
.rt-item.st-dropped { border-left-color: var(--muted); opacity: .8; }
.rt-item-text { margin: 0 0 6px; font-size: 17px; white-space: pre-wrap; }
.st-dropped .rt-item-text { text-decoration: line-through; }
.rt-chips { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.rt-chip { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; max-width: 100%; overflow-wrap: anywhere; }
.rt-chip.st-open { border-color: var(--accent); }
.rt-chip.st-done { border-color: var(--good); color: var(--good); }
.rt-chip.st-dropped { color: var(--muted); }
.rt-chip.due.overdue { background: var(--warn); border-color: var(--warn); color: #fff; font-weight: 700; }
.rt-chip.due.soon { background: var(--caution); border-color: var(--caution); color: #fff; font-weight: 700; }
.rt-chip.warn { border-color: var(--caution); color: var(--caution); }
.rt-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-edit { gap: 8px; }
.rt-history { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.rt-history h4 { margin: 0 0 6px; }
.rt-timeline { margin: 0; padding: 0 0 0 4px; list-style: none; border-left: 2px solid var(--border); }
.rt-timeline li { position: relative; padding: 0 0 8px 14px; font-size: 14px; }
.rt-timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rt-timeline time { color: var(--muted); font-weight: 600; margin-right: 4px; }
.rt-filters { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 8px; margin: 10px 0 14px; }
@media (max-width: 600px) { .rt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rt-item.frozen { border-left-color: var(--muted); background: var(--bg); margin-bottom: 10px; }
.rt-now-status { margin: 0; }
.rt-now-status.st-done strong { color: var(--good); }
.rt-now-status.st-dropped strong { color: var(--muted); }
.rt-now-status.st-open strong { color: var(--accent); }

/* ---- history and templates ---- */
.rt-history-list { display: grid; gap: 10px; }
.rt-past-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.rt-past-main { min-width: 0; }
.rt-past-main h3 { margin: 0; font-size: 18px; }
.rt-past-main p { margin: 2px 0 4px; }
.rt-bar { margin-bottom: 8px; }

.rt-tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px; text-align: left; margin: 8px 0 12px; }
.rt-tpl { display: flex; align-items: flex-start; gap: 10px; background: var(--bg); border: 2px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; min-height: 48px; min-width: 0; }
.rt-tpl.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.rt-tpl input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.rt-tpl-body { display: grid; gap: 4px; min-width: 0; }
.rt-tpl-cols { display: flex; flex-wrap: wrap; gap: 4px; }
.rt-tpl-col { font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--acc); color: var(--acc); font-weight: 600; }
.rt-pick-home { text-align: left; }
.rt-pick-home h2 { margin-top: 0; }
