/* Peta sebaran peserta uji kompetensi (js/sebaran-map.js, 23 Nov 2026). Bagian berlatar gelap. */

.sebaran {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1a1e24;
  --text: #f2f0ea;
  --text-soft: #a3a9b0;
  --border: #262b32;
  --gold-ink: #f5c518;
  background:
    radial-gradient(ellipse 60% 55% at 30% 45%, rgba(245,197,24,.10), transparent 70%),
    radial-gradient(ellipse 40% 50% at 85% 20%, rgba(242,132,30,.08), transparent 70%),
    #0b0d10;
  color: var(--text);
  overflow: hidden;
}

.sebaran-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sebaran-peta {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(20,23,28,.65);
  padding: 18px;
}

.sebaran-peta img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(1.45) contrast(1.1);
  opacity: .95;
}

.sebaran-titik {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  aspect-ratio: 1200 / 459.574;
}

.sebaran-gelembung {
  position: absolute;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,214,77,.85), rgba(245,197,24,.55) 55%, rgba(242,132,30,.35));
  box-shadow: 0 0 0 1.5px rgba(11,13,16,.9), 0 0 18px rgba(245,197,24,.45);
  cursor: pointer;
  animation: sebaran-muncul .7s cubic-bezier(.2,.9,.3,1.3) forwards;
  outline: none;
}

.sebaran-gelembung .inti {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff8d6;
}

.sebaran-gelembung::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1.5px solid rgba(245,197,24,.7);
  animation: sebaran-denyut 3s ease-out infinite;
  animation-delay: inherit;
}

@keyframes sebaran-muncul {
  to { transform: translate(-50%, -50%) scale(1); }
}

@keyframes sebaran-denyut {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.9); opacity: 0; }
}

.sebaran-gelembung:hover,
.sebaran-gelembung:focus-visible {
  z-index: 60 !important;
  box-shadow: 0 0 0 2px #f5c518, 0 0 24px rgba(245,197,24,.7);
}

.sebaran-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #0b0d10;
  border: 1px solid #f5c518;
  border-radius: 8px;
  padding: 8px 12px;
  white-space: nowrap;
  font-size: .76rem;
  color: #aeb3ba;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.sebaran-tip b {
  font-family: var(--font-display);
  font-size: .95rem;
  color: #f5c518;
  letter-spacing: .02em;
}

.sebaran-tip .jml {
  color: #f2f0ea;
  font-weight: 600;
}

.sebaran-gelembung:hover .sebaran-tip,
.sebaran-gelembung:focus-visible .sebaran-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sebaran-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  pointer-events: none;
  z-index: 40;
  text-shadow: 0 1px 3px #000, 0 0 8px #000;
}

.sebaran-label.bawah { transform: translate(-50%, 0); }
.sebaran-label.kanan { transform: translate(0, -50%); align-items: flex-start; }
.sebaran-label.kiri { transform: translate(-100%, -50%); align-items: flex-end; }

.sebaran-label span {
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #c9cdd2;
}

.sebaran-label b {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #f5c518;
}

/* ---- panel kanan */
.sebaran-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(20,23,28,.65);
  padding: 22px 24px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  grid-template-areas: "total h1 h2" "total daftar tahun" "angka daftar tahun";
  grid-template-rows: auto auto 1fr;
  column-gap: 36px;
}
.sebaran-total { grid-area: total; }
.sebaran-angka { grid-area: angka; align-self: start; }
.sebaran-panel h3:nth-of-type(1) { grid-area: h1; }
.sebaran-daftar { grid-area: daftar; }
.sebaran-panel h3:nth-of-type(2) { grid-area: h2; }
.sebaran-tahun { grid-area: tahun; }

.sebaran-total b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  color: #f5c518;
  letter-spacing: .01em;
}

.sebaran-total span {
  display: block;
  margin-top: 6px;
  font-size: .95rem;
  color: var(--text);
}

.sebaran-total small {
  display: inline-block;
  margin-top: 6px;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.sebaran-angka {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 0;
}

.sebaran-angka div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.sebaran-angka b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
}

.sebaran-angka span {
  font-size: .7rem;
  color: var(--text-soft);
}

.sebaran-panel h3 {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 10px;
}

.sebaran-daftar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sebaran-daftar .baris {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .84rem;
  margin-bottom: 4px;
}

.sebaran-daftar .baris b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
}

.sebaran-daftar .bar {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
}

.sebaran-daftar .bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #f2841e, #f5c518);
}

.sebaran-tahun {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 150px;
  padding-top: 18px;
}

.sebaran-tahun .kolom {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.sebaran-tahun .batang {
  position: relative;
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #f5c518, rgba(242,132,30,.55));
  min-height: 3px;
}

.sebaran-tahun .batang em {
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: .62rem;
  color: var(--text);
  background: #0b0d10;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}

.sebaran-tahun .kolom:hover .batang em { opacity: 1; }

.sebaran-tahun small {
  font-size: .62rem;
  color: var(--text-soft);
}

.sebaran-catatan {
  margin: 14px 0 0;
  font-size: .72rem;
  color: var(--text-soft);
  opacity: .8;
}

@media (prefers-reduced-motion: reduce) {
  .sebaran-gelembung { animation: none; transform: translate(-50%, -50%); }
  .sebaran-gelembung::after { animation: none; display: none; }
}

@media (max-width: 960px) {
  .sebaran-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "total" "angka" "h1" "daftar" "h2" "tahun";
    grid-template-rows: none;
  }
  .sebaran-angka { margin-bottom: 20px; }
  .sebaran-daftar { margin-bottom: 20px; }
  .sebaran-tahun { height: 110px; }
}

@media (max-width: 640px) {
  .sebaran-peta { padding: 10px; }
  .sebaran-titik { left: 10px; right: 10px; top: 10px; }
  .sebaran-label span { font-size: .5rem; letter-spacing: .03em; }
  .sebaran-label b { font-size: .7rem; }
  .sebaran-label.kecil-hp { display: none; }
  .sebaran-panel { padding: 18px 16px 14px; }
}

/* versi 2 (alamat peserta): dua kotak angka, keterangan kota terbanyak di daftar provinsi */
.sebaran-angka.dua { grid-template-columns: repeat(2, 1fr); }
.sebaran-daftar small.sub { display: block; margin-top: 3px; font-size: .7rem; color: var(--text-soft); }
.sebaran-tip span:not(.jml) { font-size: .72rem; }
