@charset "UTF-8";

body {
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}
.noto-sans-normal {
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

/* ---------- General ---------- */
.container { padding-top: 1rem; padding-bottom: 1rem; }
h1 { font-size: 1.6rem; font-weight: 500; line-height: 1.25; margin-bottom: .75rem; }
h3 { font-size: 1.15rem; font-weight: 500; margin-top: 1.25rem; }
h4 { font-size: 1.05rem; font-weight: 500; }
.intro { color: #555; }
@media (min-width: 768px) {
  h1 { font-size: 2rem; }
}

/* ---------- Vote page ---------- */
.vote-toolbar {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  padding: .5rem 0;
}
.vote-toolbar .form-control { flex: 1 1 auto; min-width: 0; }
.vote-toolbar .btn { flex: 0 0 auto; }

.vote-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: .375rem;
}
@media (min-width: 576px) { .vote-items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .vote-items { grid-template-columns: repeat(3, 1fr); } }

.vote-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: .6rem .75rem;           /* comfortable tap target (~44px high) */
  border: 1px solid #dee2e6;
  border-radius: .375rem;
  cursor: pointer;
  line-height: 1.3;
  transition: background-color .1s, border-color .1s;
}
.vote-item:hover { background: #f5f8ff; }
.vote-item input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0; }
.vote-item .vote-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.vote-item.is-checked,
.vote-item:has(input:checked) { background: #e7f0ff; border-color: #007bff; font-weight: 500; }
.vote-item[hidden] { display: none; }

.badge-new {
  flex: 0 0 auto;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  background: #e8344e;
  border-radius: .25rem;
  padding: .1rem .35rem;
}

.vote-submit {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
  background: #f8f9fa;
  scroll-margin-top: 1rem;
}
.vote-submit { margin-bottom: 3rem; }      /* breathing room under the vote button */
@media (max-width: 767.98px) {
  .vote-submit { margin-bottom: 5rem; }    /* extra on phones, so the button can be scrolled well clear of bottom banners */
  .vote-submit .btn { padding: .6rem 1.1rem; font-size: 1.05rem; }  /* larger tap targets */
}
.vote-submit .g-recaptcha { margin-bottom: .75rem; }
.vote-submit .btn { margin: 0 .25rem .25rem 0; }

/* Sticky bar on small screens showing the current pick */
.vote-selected {
  position: fixed;
  left: 0; right: 0; bottom: var(--bottom-overlay, 0px);  /* sits above a cookie/consent banner */
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}
.vote-selected[hidden] { display: none; }
.vote-selected span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Room for a bottom cookie/consent banner (measured in footer.php) and the sticky vote bar */
body { padding-bottom: var(--bottom-overlay, 0px); }
body.has-selection { padding-bottom: calc(4rem + var(--bottom-overlay, 0px)); }

/* ---------- Results page ---------- */
.period-nav h3 { margin-top: 0; }
.period-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-bottom: 1rem;
}
.period-pills a {
  display: inline-block;
  padding: .3rem .7rem;
  border: 1px solid #dee2e6;
  border-radius: 1rem;
  font-size: .875rem;
  white-space: nowrap;
}
.period-pills a:hover { text-decoration: none; background: #f5f8ff; }
.period-pills a.active { background: #007bff; border-color: #007bff; color: #fff; }
@media (min-width: 992px) {
  .period-nav { border-left: 1px solid #dee2e6; padding-left: 1.5rem; }
}

.total-votes { color: #555; }

.results-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.results-table td { padding: .5rem .25rem; border-bottom: 1px solid #eee; vertical-align: top; }
.results-table td.pos { width: 2.5rem; color: #777; text-align: right; padding-right: .5rem; }
.results-table td.count { text-align: right; white-space: nowrap; width: 1%; }
.results-table td.count small { display: block; color: #777; }
.results-table .bar-track { height: .4rem; margin-top: .3rem; background: #eef1f4; border-radius: .2rem; overflow: hidden; }
.results-table .bar { height: 100%; background: #00aa00; border-radius: .2rem; }
.results-table tr.top3 td.name { font-weight: 500; }

.country-table { width: 100%; max-width: 28rem; }
.country-table td { padding: .3rem .25rem; border-bottom: 1px solid #eee; }
.country-table td.pos { width: 2.5rem; color: #777; text-align: right; padding-right: .5rem; }
.country-table td.count { text-align: right; }

/* ---------- Vote confirmation / errors ---------- */
.vote-thanks {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  border-width: 2px;
  animation: vote-pop .35s ease-out;
}
.vote-thanks h2 { font-size: 1.3rem; font-weight: 600; margin: .1rem 0 .35rem; }
.vote-thanks p { margin-bottom: .75rem; }
.vote-thanks .btn { margin: 0 .25rem .25rem 0; }
.vote-thanks-icon {
  flex: 0 0 auto;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  font-size: 1.4rem;
  line-height: 2.5rem;
  text-align: center;
}
@keyframes vote-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vote-thanks { animation: none; } }
.vote-alert { margin-bottom: 1rem; }

.results-table tr.your-pick td { background: #e6f6ea; }
.results-table tr.your-pick td.name::after {
  content: "Your pick";
  display: inline-block;
  margin-left: .4rem;
  padding: .05rem .4rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  background: #28a745;
  border-radius: .25rem;
  vertical-align: middle;
}
.results-table tr.your-pick { scroll-margin-top: 4rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #dee2e6; font-size: .875rem; color: #666; }

/* Month list sits below the results on mobile */
.mobile-periods-link { margin-top: -.25rem; font-size: .9rem; }
@media (max-width: 991.98px) {
  .period-nav { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #dee2e6; }
}
#periods { scroll-margin-top: 1rem; }
