/* Public Transit Polls — mobile-first styles */

:root {
  --bg:        #f0f7fb;
  --ink:       #0a3a52;
  --ink-soft:  #4a6c7e;
  --accent:    #2196c4;
  --accent-2:  #5cc4e6;
  --line:      #d4e6f0;
  --card:      #ffffff;
  --shadow:    0 2px 12px rgba(10, 58, 82, 0.10);
  --radius:    14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- HEADER ---------- */
.dc-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.dc-header-images {
  display: flex;
  justify-content: flex-start;
  gap: 0;
}
.dc-header-images img {
  width: 33.333%;
  height: 80px;
  object-fit: cover;
  display: block;
}
.dc-title {
  margin: 10px 0 0;
  font-size: clamp(18px, 5.2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: left;
  line-height: 1.1;
  white-space: nowrap;
}

/* ---------- POLL NAV (dots + arrows) ---------- */
.dc-nav-wrap {
  padding: 10px 16px 6px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.dc-dots {
  display: block;
  margin-bottom: 8px;
  font-size: 0; /* kill inline-block gap */
}
.dc-dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line);
  border: none;
  padding: 0;
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  position: relative;
  vertical-align: middle;
}
.dc-dot::after {
  content: '';
  position: absolute;
  inset: -12px;
}
.dc-dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}
.dc-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dc-nav-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  font-style: italic;
}
/* ---------- SCROLL ZONES (shared) ---------- */
.dc-scroll {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
}
.dc-scroll::-webkit-scrollbar { display: none; }
.dc-scroll > * {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* ---------- POLLS ---------- */
.dc-polls { padding: 4px 0 16px; }
.dc-poll {
  padding: 0 16px;
}
.dc-poll-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.dc-poll-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: block;
}
.dc-poll-q {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.dc-poll-body {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.dc-sauces {
  border: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dc-sauce {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: var(--bg);
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}
.dc-sauce:has(input:checked) {
  border-color: var(--accent);
  background: #e6f4fa;
}
.dc-sauce input {
  accent-color: var(--accent);
  width: 18px; height: 18px;
  margin: 0;
}
.dc-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  margin-bottom: 10px;
}
.dc-form textarea:focus,
.dc-sauce:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.dc-submit {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.dc-submit:active { transform: scale(0.98); }
.dc-submit:hover  { background: #1a7ba3; }
.dc-status {
  min-height: 20px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.dc-status.is-ok    { color: #2a7a3a; }
.dc-status.is-error { color: #b33b2b; }

/* ---------- DASHBOARD ---------- */
.dc-dashboards {
  padding: 8px 0 16px;
  background: linear-gradient(180deg, transparent, #e1eff7 40%, #e1eff7);
}
.dc-dashboard {
  padding: 16px;
}
.dc-dashboard h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.dc-total {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.dc-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dc-bars li {
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.dc-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.dc-bar-name  { color: var(--ink); font-weight: 600; }
.dc-bar-count { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dc-bar-track {
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.dc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(.2,.8,.2,1);
}

/* ---------- SUMMARY ---------- */
.dc-summary {
  margin: 12px 16px 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  min-height: 90px;
  position: relative;
}
.dc-summary-panel {
  display: none;
}
.dc-summary-panel.is-active {
  display: block;
  animation: dc-fade 0.3s ease;
}
@keyframes dc-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dc-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 8px;
}
.dc-summary-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.dc-summary-count {
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.dc-summary-themes {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.dc-theme {
  display: inline-block;
  padding: 3px 10px;
  margin: 2px 4px 2px 0;
  background: #e6f4fa;
  border: 1px solid #c2def0;
  color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-style: normal;
}

/* ---------- FOOTER ---------- */
.dc-footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 16px;
}

/* ---------- LARGER SCREENS ---------- */
@media (min-width: 700px) {
  .dc-header { padding: 20px 24px 14px; }
  .dc-header-images img { height: 120px; }
  .dc-poll-thumb { width: 110px; height: 110px; }
  .dc-poll-q { font-size: 18px; }
  .dc-poll, .dc-dashboard { padding: 0 24px; }
  .dc-summary { margin: 16px 24px; }
}
