@charset "utf-8";
/* CSS Document */

.state-dun {
	xbackground: #e5e5e5;
	padding: 50px 0;
	position: relative;
  overflow: hidden;
	
}
.dun-section {
  width: 100%;
  background: #efefef;
  padding: 40px 0;
}

.dun-container {
  margin: auto;
  display: flex;
  gap: 36px;
  height: 760px;
  
}

.sidebar-sticky-top {
	width: 100%
}


.sidebar-sticky-top h2 {
	margin-bottom: 10px;
}

.state-dun-bg {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 0;
}


.state-dun .home-dun-grid {
	display: flex;
  height: 700px;
  align-items: stretch;
  position: relative;
  z-index: 1;
  gap: 0;
}

/* LEFT */

.state-dun-sidebar {
  gap: 24px;
  align-items: start;
height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
 width: 430px;
  padding: 50px 0;
  overflow-y: auto;
}

.dun-title {
  font-size: 38px;
  font-weight: 700;
  color: #444;
  margin-bottom: 22px;
}

.dun-search {
  height: 58px;
  background: white;
  border: 1px solid #d9d9d9;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 22px;
}

.dun-search input {
  border: none;
  width: 100%;
  font-size: 17px;
  background: transparent;
  outline: none;
}



/* =========================
   SCROLLABLE RESULTS
========================= */

.state-dun-sidebar {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 40px;
}

/* SCROLLBAR */
.state-dun-sidebar::-webkit-scrollbar {
  width: 8px;
}

.state-dun-sidebar::-webkit-scrollbar-thumb {
  background: #c2c2c2;
  border-radius: 100px;
}


/* CARD */
.seat-card-state {
  background: #f5f5f5;
  border: 1px solid #d8d8d8;
  padding: 22px 20px;
  margin-bottom: 26px;
}

.seat-card-state__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.seat-title {
  color: #444;
  font-size: 20px;
  font-weight: 700;
}

.seat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.seat-title {
  flex: 1;
}

.pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
}

/* BAR */
.seat-progress {
  width: 100%;
  height: 20px;
  background: #ddd;
  border-radius: 100px;
  overflow: hidden;
  display: flex;
  margin: 15px 0 30px 0;
}

.bar-purple {
  width: 34%;
  background: #9544c8;
}

.bar-blue {
  width: 22%;
  background: #0067b8;
}

.bar-orange {
  width: 25%;
  background: #ff4b1f;
}

.bar-green {
  width: 1%;
  background: #1eb38a;
}

.party-ph {
  background: #9544c8;
}

.party-bn {
  background: #0067b8;
}

.party-pn {
  background: #ff4b1f;
}

.party-green {
  background: #1eb38a;
}

.party-ind {
  background: #939393;
}

.candidate-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.candidate-name {
  font-size: 14px;
  font-weight: 700;
  color: #444;
}

.party-name {
  font-size: 13px;
  color: #666;
}

.dot {
  width: 10px;
  height: 10px;
  background: #f3b13f;
  border-radius: 50%;
  display: inline-block;
  margin-left: 5px;
}


/* DIVIDER */
.seat-divider {
  width: 100%;
  height: 1px;
  background: #d5d5d5;
  margin: 24px 0;
}

.seat-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  color: #555;
}

.share-btn {
  text-align: center;
}

/* RIGHT */
.dun-map-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.state-map-area {
  position: sticky;
  top: 50px;
  z-index: 15;
 display: flex;
  flex-direction: column;
  align-items: center;
	flex: 1;
  min-width: 0;
  padding: 40px 0 0 0;
}


/* EXTEND BG TO SCREEN EDGE */
.state-dun-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: -100vw;
  background: #f3f3f3;
  z-index: -1;
}


.state-map-area::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: -100vw;
  background: #e9e9e9;
  z-index: -1;
}


.state-map-area.is-compact {
  xbox-shadow: 0 10px 22px rgba(0, 0, 0, .14);
}

.map-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.map-tab {
  height: 44px;
  padding: 0 26px;
  border: none;
  border-radius: 100px;
  background: #9c9c9c;
  color: #444;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.map-tab.active {
  background: var(--brand-red);
  color: white;
}

/* MAP */
.map-wrapper {
    width: 100%;
  height: 700px;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  position: relative;
}

.map-inner {
  display: flex;
  justify-content: center;
  align-items: center;

  transform-origin: center center;
  transition: transform 0.15s ease;

  cursor: grab;
}

.map-inner img {
  width: 100%;
  max-width: 950px;
  user-select: none;
  pointer-events: none;
}

/* CANDIDATE */
/* ROW */
.candidate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
	margin-bottom: 20px;
}

/* LEFT */
.candidate-left {
  flex: 1;
  min-width: 0;
}

/* NAME ROW */
.candidate-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* NAME */
.candidate-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

/* META */
.candidate-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* RIGHT */
.candidate-right {
  flex-shrink: 0;
  text-align: right;
}

/* COUNT */
.vote-count {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}

/* PERCENT */
.vote-percent {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}


.candidate-info {
  flex: 1;
  min-width: 0;
}

.candidate-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}

.party-name {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}



/* RESPONSIVE */
@media (max-width: 1100px) {

  .dun-container {
    flex-direction: column;
    height: auto;
  }

  .dun-sidebar {
    width: 100%;
    min-width: 100%;
  }

  .dun-results {
    max-height: 500px;
  }

  .map-wrapper {
    height: 500px;
  }

}


/* MATERIAL FONT */
.pin-btn::after,
.seat-title::after {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;

  line-height: 1;

  display: inline-block;

  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  direction: ltr;

  -webkit-font-smoothing: antialiased;
}

/* =========================
   TITLE
========================= */

.seat-title {
  position: relative;
  color: #444;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* CHEVRON */
.seat-title::after {
  content: "chevron_right";
  font-size: 20px;
}

/* =========================
   PIN BUTTON
========================= */

.pin-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DEFAULT PIN */
.pin-btn::after {
  content: "keep";
  font-size: 24px;
  color: #9a9a9a;
  transition: 0.2s ease;
  transform: rotate(35deg);
}

/* ACTIVE */
.pin-btn.active::after {
  color: #bb0000;
  font-variation-settings:
    'FILL' 1;
  transform: rotate(35deg);
}

/* =========================================
   TABLET
   768px - 1120px
========================================= */

@media (max-width: 1120px) {

  .home-dun-grid {
    height: auto;
    gap: 0;
  }

  /* =========================
     SIDEBAR
  ========================= */

  .state-dun-sidebar {
    width: 360px;
    min-width: 360px;
    padding: 40px 30px 40px 0px;
    max-height: 860px;
  }

  /* =========================
     MAP AREA
  ========================= */

  .state-map-area {
    padding: 32px 24px;
  }

  /* MAP IMAGE */
  .map-inner img {
    max-width: 100%;
    max-height: 620px;
  }

  /* TABS */
  .map-tabs {
    gap: 16px;
    margin-bottom: 24px;
  }

  .map-tab {
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
  }


  /* TITLE */
  .seat-title {
    font-size: 18px;
  }

}


/* =========================================
   MOBILE
   BELOW 768px
========================================= */

@media (max-width: 767px) {

  /* SECTION */
  .state-dun {
    overflow: visible;
  }

	.state-dun .home-dun-grid {
		height: 100%;
		margin: 0;
		width: 100%;
		flex-direction: column;
	}
	
  /* =========================
     MAP FIRST
  ========================= */

  .state-map-area {
    order: 1;
    width: 100%;
    padding: 40px 0 0;
    min-height: auto;
	position: sticky;
    top: 0;
    z-index: 20;
    transition:
      height 0.3s ease,
      padding 0.3s ease,
      box-shadow 0.3s ease;
    height: 340px;
    xpadding: 20px 16px;
    overflow: hidden;
  }

  /* =========================
     SIDEBAR SECOND
  ========================= */

  .state-dun-sidebar {
    order: 2;
    width: 100%;
    min-width: 100%;
    max-height: none;
    overflow: visible;
    padding: 40px 16px 24px;
  }

  /* =========================
     MAP
  ========================= */

  .map-wrapper {
    min-height: auto;
    height: auto;
  }

  .map-inner img {
    width: 100%;
    max-width: 100%;
    max-height: none;
  }

  /* =========================
     TABS
  ========================= */

  .map-tabs {
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
  }

  .map-tab {
    flex: 1;
    max-width: 180px;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* =========================
     CARD
  ========================= */

  /* PROGRESS */
  .seat-progress {
    margin: 18px 0;
  }

  /* CANDIDATE */
  .candidate-row {
    gap: 12px;
    margin-bottom: 18px;
  }

  .candidate-name {
    font-size: 14px;
  }

  .party-name {
    font-size: 12px;
  }

  .vote-count {
    font-size: 15px;
  }

  .vote-percent {
    font-size: 13px;
  }

  /* BUTTON */
  .btn {
    width: 100%;
  }
	
	  /* SHRUNK STATE */
  .state-map-area.is-docked .map-wrapper {
    height: 180px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* MAP WRAPPER */
  .map-wrapper {
    height: 100%;
  }

  /* MAP INNER */
  .map-inner {
    transition: transform 0.3s ease;
  }

  /* SHRINK MAP */
  .state-map-area.is-docked .map-inner {
    transform: scale(0.78);
  }

  /* TABS */
  .map-tabs {
    transition: margin 0.3s ease;
  }

  .state-map-area.is-docked .map-tabs {
    margin-bottom: 8px;
  }

	
 /* STICKY TITLE + SEARCH */
  .sidebar-sticky-top {
    position: sticky;
    top: 272px;
    z-index: 25;
    background: #f3f3f3;
    transition:
      padding 0.3s ease,
      box-shadow 0.3s ease;
  }

	
	/* ONLY WHEN STICKY */
  .sidebar-sticky-top.is-sticky {
    padding-top: 30px;
    padding-bottom: 30px;
  }

/* SEARCH WRAPPER */
.sidebar-sticky-top {
	width: 100%;
}

.sidebar-sticky-top .search-panel {
	margin-top: 15px;
}

.search-field {
  position: relative;
}


/* ICON */
.search-field::before {
  content: "search";

  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9a9a9a;
  pointer-events: none;

  -webkt-font-smoothing: antialiased;
}

/* INPUT */
.field {
  width: 100%;
  height: 48px;
  padding-left: 46px;
  border: 1px solid #cfcfcf;
  background: white;
  font-size: 16px;
  border-radius: 4px;
}

/* PLACEHOLDER */
.field::placeholder {
  color: #8d8d8d;
}