/* ============================================================
   THE SPECTRUM — "Old Steam" (2010-2013) theme
   Plain CSS, no build step. Lean & flat.
   ============================================================ */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #171a21;
  color: #c7d5de;
  font-family: Arial, "Motiva Sans", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #66c0f4;
  text-decoration: none;
}

h1, h2, h3, h4, p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

/* ============================================================
   Document shell
   ============================================================ */

/* ---------- Site header ---------- */
.site-header {
  background: #171a21;
  border-bottom: 1px solid #000;
  height: 52px;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  color: #ffffff;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 16px;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  color: #8f98a0;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .5px;
  padding: 16px 10px;
  text-decoration: none;
  transition: color .15s ease;
  border-bottom: 2px solid transparent;
  line-height: 1;
}

.nav-link:hover {
  color: #c7d5de;
}

.nav-link.active {
  color: #66c0f4;
  border-bottom: 2px solid #66c0f4;
}

/* ---------- Page ---------- */
.page {
  min-height: calc(100vh - 52px - 60px);
  background: #171a21;
}

.page-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.page-title {
  color: #ffffff;
  font-weight: bold;
  font-size: 22px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---------- Panel ---------- */
.panel {
  background: linear-gradient(90deg, #1b2838, #2a475e);
  border: 1px solid #000;
  border-radius: 2px;
  padding: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #1b2838;
  color: #8f98a0;
  font-size: 11px;
  text-align: center;
  padding: 20px 16px;
}

/* ============================================================
   Slider list & rows
   ============================================================ */

.slider-list {
  display: flex;
  flex-direction: column;
}

.slider-row {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 4px 8px;
  border-bottom: 1px solid #0e141b;
  background: transparent;
  transition: background .15s ease;
}

.slider-row:hover {
  background: rgba(102, 192, 244, 0.05);
}

/* ---------- Side columns ---------- */
.slider-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.slider-left {
  justify-content: flex-end;
  text-align: right;
}

.slider-right {
  justify-content: flex-start;
  text-align: left;
}

.side-label {
  color: #c7d5de;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ---------- Middle / track ---------- */
.slider-mid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 240px;
}

.slider-value {
  color: #8f98a0;
  font-size: 11px;
  text-align: center;
  height: 14px;
  line-height: 14px;
  margin-bottom: 2px;
}

.slider-track {
  position: relative;
  height: 8px;
  width: 100%;
  background: #000000;
  border: 1px solid #0e141b;
  border-radius: 2px;
  cursor: pointer;
  outline: none;
}

.slider-track:focus-visible {
  border-color: #66c0f4;
}

.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0; /* set inline by JS */
  background: rgba(102, 192, 244, 0.4);
  border-radius: 2px;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 0; /* set inline by JS as percentage */
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  background: linear-gradient(to bottom, #67c1f5, #1a44c2);
  border: 1px solid #000;
  border-radius: 2px;
  cursor: grab;
}

.slider-handle:active {
  cursor: grabbing;
}

/* ---------- Locked state (share page) ---------- */
.slider-row.locked,
.slider-row.locked:hover {
  background: transparent;
}

.slider-row.locked .slider-track,
.slider-row.locked .slider-handle {
  cursor: default;
}

.locked-value {
  color: #8f98a0;
  font-size: 11px;
  text-align: center;
  height: 14px;
  line-height: 14px;
  margin-bottom: 2px;
}

/* ============================================================
   Avatars
   ============================================================ */

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  overflow: hidden;
  background: #1b2838;
  border: 1px solid #000;
}

.avatar-person {
  background: linear-gradient(135deg, #66c0f4, #1a44c2);
  color: #ffffff;
}

/* Country flag: rendered as background-image by flag-icons (.fi) */
.avatar.avatar-country {
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
}

/* Brand icon: transparent bg, contains an <img> */
.avatar-brand {
  background: transparent;
  border: 1px solid transparent;
}

.avatar-brand img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* Invisible spacer to keep columns aligned */
.avatar-none {
  background: transparent;
  border: 1px solid transparent;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border: 1px solid #000;
  border-radius: 2px;
  color: #c7d5de;
  background: #1b2838;
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: background .15s ease, color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: #243649;
  color: #ffffff;
}

.btn-primary {
  background: linear-gradient(to bottom, #67c1f5, #1a44c2);
  color: #ffffff;
  text-shadow: none;
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #7dd0ff, #1a44c2);
  color: #ffffff;
}

.btn-share {
  padding: 5px 12px;
}

.btn:disabled,
.btn.disabled {
  opacity: .5;
  cursor: not-allowed;
  background: #3a3a3a;
  color: #8f98a0;
}

/* ---------- Submit bar ---------- */
.submit-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.submit-status {
  color: #8f98a0;
  font-size: 12px;
}

.submit-status.copied {
  color: #66c0f4;
}

/* ============================================================
   Consent banner (politics only)
   ============================================================ */

.consent-banner {
  background: linear-gradient(90deg, #1b2838, #2a475e);
  border: 1px solid #000;
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.consent-banner.hidden {
  display: none;
}

.consent-text {
  color: #c7d5de;
  font-size: 14px;
}

.consent-actions {
  display: flex;
  gap: 8px;
}

/* ============================================================
   Share page
   ============================================================ */

.share-header {
  color: #c7d5de;
  margin-bottom: 16px;
}

/* A .btn-styled link back to the survey */
.share-link-back {
  display: inline-block;
  color: #66c0f4;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 0;
  margin-bottom: 16px;
  transition: color .15s ease;
}

.share-link-back:hover {
  color: #7dd0ff;
}

.percentile-note {
  font-size: 10px;
  color: #8f98a0;
  text-align: center;
  margin-top: 2px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 700px) {
  .page-inner {
    padding: 16px 10px 24px;
  }

  .page-title {
    font-size: 18px;
  }

  .slider-row {
    grid-template-columns: 110px 1fr 110px;
    gap: 8px;
    min-height: 44px;
    padding: 4px 4px;
  }

  .slider-mid {
    min-width: 0;
  }

  .side-label {
    font-size: 12px;
  }

  .avatar {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .avatar-brand img {
    width: 14px;
    height: 14px;
  }

  .nav-link {
    padding: 16px 6px;
    font-size: 11px;
  }

  .consent-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .submit-bar {
    flex-wrap: wrap;
  }
}
