/* ArtMoment teambuilding hlasovačka — built on the shared brand system. */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

:root {
  --brand: #253848;
  --brand-light: #34536b;
  --bg: #eef2f5;
  --card: #ffffff;
  --ink: #333333;
  --ink-alt: #1a1a2e;
  --muted: #64748b;
  --on-brand: #ffffff;
  --line: #e2e8f0;
  --pill: #e9eef3;
  --row-alt: #f7f9fb;
  --hover: #f0f4f7;
  --danger: #e74c3c;
  --success: #27ae60;
  --warning: #e0a458;
  --accent: #34536b;
  --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-full: 999px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.04);
  --max: 1100px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.45;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 16px; }

/* header */
.header {
  background: var(--brand); color: var(--on-brand);
  padding: 16px 22px; border-radius: var(--r-lg);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.header img.logo { height: 30px; width: auto; filter: brightness(0) invert(1); }
.header h1 { font-size: 1.35rem; font-weight: 700; margin: 0; letter-spacing: .2px; }
.header .sub { color: rgba(255,255,255,.72); font-size: 13px; margin-top: 2px; }
.header .spacer { margin-left: auto; }
.header .total-badge {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-full); padding: 8px 16px; font-weight: 700; text-align: center;
}
.header .total-badge b { font-size: 1.3rem; display: block; line-height: 1; }
.header .total-badge span { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; opacity: .8; }

/* cards */
.card {
  background: var(--card); padding: 20px; border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-card); margin-bottom: 18px;
}
.card > h2 {
  font-size: 12px; font-weight: 700; color: var(--muted);
  margin: 0 0 4px; text-transform: uppercase; letter-spacing: .7px;
}
.card .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: var(--r-full); background: var(--brand);
  color: #fff; font-size: 12px; font-weight: 700; margin-right: 8px;
}
.card .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* identity inputs */
.id-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field { flex: 1 1 220px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; color: var(--ink); background: #fff;
}
.field input:focus { outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(52,83,107,.12); }
.you-pill {
  display: none; margin-top: 12px; padding: 9px 14px; border-radius: var(--r-sm);
  background: #eafaf1; border: 1px solid #b9eccd; color: #1d7a45; font-size: 13.5px; font-weight: 600;
}
.you-pill.show { display: block; }

/* calendar */
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); }
.swatch.sel { background: var(--brand); border-color: var(--brand); }
.swatch.avail { background: #fff; }
.swatch.off { background: var(--row-alt); }

.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.month h3 {
  margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--ink-alt); text-align: center;
  text-transform: capitalize;
}
.dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.dow span { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.dow span.we { color: #c0392b88; }
.grid-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { aspect-ratio: 1 / 1; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; position: relative; }
.day.empty { background: transparent; }
.day.off { color: #cbd5e1; background: var(--row-alt); }
.day.avail {
  background: #fff; border: 1.5px solid var(--brand-light); color: var(--brand); cursor: pointer;
  transition: transform .06s ease, background .12s ease;
}
.day.avail:hover { background: var(--hover); transform: translateY(-1px); }
.day.avail.sel { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-card); }
.day.avail .count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-full); background: var(--warning); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--card);
}
.day.avail.sel .count { background: #fff; color: var(--brand); }

/* activities */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-full); background: #fff;
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); user-select: none;
  transition: all .12s ease;
}
.chip:hover { border-color: var(--brand-light); background: var(--hover); }
.chip.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .c-emoji { font-size: 16px; }
.chip .c-count { font-size: 12px; font-weight: 700; opacity: .7; }
.chip.sel .c-count { opacity: .9; }
#otherWrap { margin-top: 14px; display: none; }
#otherWrap.show { display: block; }

/* submit */
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.btn {
  background: var(--brand); color: #fff; padding: 12px 26px; border: none;
  border-radius: var(--r-sm); font-weight: 700; cursor: pointer; font: inherit; font-size: 15px;
}
.btn:hover { opacity: .92; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.msg { font-size: 14px; font-weight: 600; }
.msg.ok { color: var(--success); }
.msg.err { color: var(--danger); }

/* results */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .results-grid { grid-template-columns: 1fr; } }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: none; }
.rank .rank-top { display: flex; align-items: center; gap: 10px; }
.rank .rank-date { font-weight: 700; color: var(--ink-alt); }
.rank .rank-medal { font-size: 15px; }
.rank .bar-wrap { flex: 1; height: 9px; background: var(--row-alt); border-radius: var(--r-full); overflow: hidden; }
.rank .bar { height: 100%; background: var(--brand); border-radius: var(--r-full); transition: width .4s ease; }
.rank .rank-n { font-weight: 700; color: var(--brand); min-width: 26px; text-align: right; }
.rank .voters { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; }
.rank .voter { font-size: 11.5px; background: var(--pill); border: 1px solid var(--line); border-radius: var(--r-full); padding: 2px 9px; color: var(--muted); }
.empty-note { color: var(--muted); font-style: italic; font-size: 14px; }

/* who voted feed */
.feed { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.feed .entry { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--row-alt); }
.feed .entry .who { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.feed .entry .who b { color: var(--ink-alt); font-size: 14.5px; }
.feed .entry .when { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.feed .entry .picks { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.feed .tag { font-size: 11.5px; padding: 2px 9px; border-radius: var(--r-full); }
.feed .tag.date { background: #e7edf2; color: var(--brand); border: 1px solid #d3dde6; }
.feed .tag.act { background: #fff4e6; color: #b9772a; border: 1px solid #f3e0c4; }

footer { color: var(--muted); font-size: 12px; text-align: center; padding: 22px; }
