html {
  font-size: 16px !important;
}
@media only screen and (max-width: 640px) {
  html {
    font-size: 16px;
  }
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
#loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 50px;
}
#loading span {
  width: 50px;
  height: 50px;
  border: 8px solid #bfbfbf;
  border-top-color: #e6e6e6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px; 
}
#loading p {
  font-size: 1.2rem;
  font-weight: 700;
  color: #a5a5a5;
  margin: 0;
}
#cardsNote p{
  font-size: 0.9rem;
    margin: 1em;
    color: #999;
}
.expanded-details::-webkit-scrollbar {
  width: 6px; 
}
.expanded-details::-webkit-scrollbar-track {
  background: transparent; 
  border-radius: 10px;
}
.custom-dropdown::-webkit-scrollbar {
  width: 6px;
}
.custom-dropdown::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 10px;
}
.search-input {
  margin-top: 15px;
}
#sorting-options {
  margin-left: 0.5em;
  display: flex;
  gap: 0.5em;
}
#sorting-options label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0 !important;
  color: #333;
}
#sorting-options input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #999;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  margin-right: 0.4em;
  position: relative;
  cursor: pointer;
  outline: none;
  display: inline-block;
  vertical-align: middle;
}
#sorting-options input[type="radio"]:checked {
  border-color: #e90144;
  background-color: #fff;
}
#sorting-options input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #e90144;
}
#sorting-options input[type="radio"]:checked + span {
  color: #e90144;
}
.expanded-details::-webkit-scrollbar-thumb {
  background:var(--theme-ui-colors-secondary); 
  border-radius: 10px;
  margin-left: 0.5em;
}
.expanded-details {
  padding-right: 10px; 
}
.expanded-details::-webkit-scrollbar-thumb:hover {
  background:var(--theme-ui-colors-secondary)!important; 
  width: 6px !important; 
}
.reset-icon img {
  transition: transform 0.3s ease-in-out;
}
.reset-icon {
  background-color: #333;
  color: #fff;
}
.reset-icon:hover {
  background-color: #e90144;
  color: #fff;
}
 .reset-icon:hover img {
  transform: rotate(180deg);
} 
.candidate-detail-value .candidate-term{
  padding-right: 0!important;
}
.candidate-detail-value .candidate-age {
  padding-right: 0!important;
}
.candidate-img {
  width: 110px;
  height: 110px;
  border-radius: 100%;
  background-color: #ebf0f3;
}
.profile-name-wrap {
  justify-content: center;
}
.arrow-icon {
  font-size: 1.2rem;
  padding: 0 0 0 0.5em;
}
.keyword-icon {
  width: 16px; 
  height: 16px;
  margin-right: 5px; 
  vertical-align: middle;
}
.expanded-details {
  overflow-y: auto;
  height: 180px;
}
.candidate-profile {
  font-size: 0.95rem;
}
.candidate-name {
  font-size: 1.2rem;
  font-weight: 800;
}
.candidate-title {
  font-weight: 800!important;
  font-size: 1.2rem!important;
}
.profile-name-wrap p {
  margin-bottom: 0;
}
.candidate-age{
  padding-right: 0!important;
}
.candidate-detail-label {
  font-size: 0.9rem;
  color: #717171;
  line-height: normal;
}
.candidate-detail-value {
  font-weight: 600;
  font-size: 1rem;
}
.social-media-wrap {
  display: flex;
  border-top: 3px solid var(--theme-ui-colors-main);
  flex-wrap: wrap; 
  align-items: center;
  max-width: 100%; 
}
.social-links{
  margin: 0.5em 0!important;
}  
.expanded-details .readmore{
  margin-top: 0.5em!important;
}
.readmore li a {
  padding: 0.4em 0 0;
}
.party-keyword-btn {
  padding: 0.4em 1em 0.3em 1em;
  font-weight: 400 !important;
  margin: 0.3em 0.3em 0.3em 0;
  color:#000!important;
  background: var(--theme-ui-colors-white);
  border-radius: 50px!important;
  border: 1px solid #ccc;
  display: inline-block;
  font-size: 0.9em !important;
}
.party-keyword-btn:hover {
  border: 1px solid #fff;
  color: var(--theme-ui-colors-secondary)!important;
  background: var(--theme-ui-colors-muted);
}
.candidate-keyword-btn {
  border: none;
  color: #000 !important;
  text-align: left !important;
  background-color: #fff !important;
}
.candidate-keyword-btn:hover {
  color: #003866 !important;
  background-color: #003866;
}
#cardsContainer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.candidate-card {
  width: 30% !important;
  border: 1px solid #ddd;
  padding: 5px 5px 15px;
  margin: 10px;
  border-radius: 25px !important;
  height: fit-content;
  background-color: #fff;
  width: 90%;
}
.candidate-title {
  font-size: 1.2rem;
}
/* Accordion */
.accordion-content {
  display: none;
  padding: 1em 0.5em 1.5em 1em;
  height:210px;
  border-top: 1px solid #efefef;
  text-align: left;
}
.accordion-button {
  background-color: #fff;
  color: rgb(3, 2, 2);
  border: none;
  padding: 5px 10px 10px 5px;
  cursor: pointer;
  width: 100%;
  border-radius: 20px !important;
  text-align: left;
  font-size: 14px !important;
}
.accordion-button:focus:not(:focus-visible) {
  outline: none;
}
.profile-btn:focus:not(:focus-visible) {
  outline: none;
}
.accordion-button:after,
.accordion-button.active:after {
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  color: var(--theme-ui-colors-secondary) !important;
  float: right !important;
}
.accordion-button:after {
  content: "+"; 
  position: absolute;
  right: 6%;
  bottom: 2%;
}
.candidate-keyword-btn{
  flex:1;
}
.accordion-button.active:after {
  content: "\00D7";
  bottom: 57%;
}
/* Filter */
.filter-container {
  gap: 10px;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.icon-img {
  width: 15px;
}
.reset-icon {
  border-radius: 50px !important;
  color: #fff;
  background-color: #212121;
  border: none;
  width: 45px;
  /* background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.3s ease-in-out;  */
  /* background-image: url(https://dss0.zbstatic5.com/assets/interactive/2025/singapore-general-election-2025/img/common/icon-reset-white.svg);
  background-image: url(../img/common/icon-reset=white.svg); */
}
.reset-icon:hover {
  /* background-color: #fff; */
  /* background-image: url(https://dss0.zbstatic5.com/assets/interactive/2025/singapore-general-election-2025/img/common/icon-reset.svg); */
  /* background-image: url(../img/common/icon-reset-white.svg); */
}
.reset-icon:focus:not(:focus-visible) {
  outline: none;
}

.filter-dropdown {
  position: relative;
}
.filter-btn {
  background-color: #ffd7d7;
  color: #000;
  transition: all 0.3s ease-in-out; 
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 30px !important;
  font-size: 14px !important;
}
.filter-btn:hover {
  background-color: #e90144;
  color: #fff;
}
.filter-btn:active {
  background-color: #e90144;
  color: #fff;
}
.filter-btn.active-filter {
  background-color: #e90144 !important;
  color: white;
}

.filter-btn:focus:not(:focus-visible) {
  outline: none;
}
.custom-dropdown {
  max-height: 200px;
  overflow-y: auto;
  list-style: none;
  position: absolute;
  top: 100%;
  font-size: 0.9rem;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  padding: 5px 0;
  border-radius: 5px;
  z-index: 10;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
}
.custom-dropdown.active {
  display: block;
}
.custom-dropdown li {
  padding: 8px 10px;
  cursor: pointer;
}
.custom-dropdown li:nth-child(odd) {
  background-color: #f2f2f2;
}
.custom-dropdown li:hover {
  background-color: #ffd7d7;
}
.sticky-div {
  position: sticky;
  top: 5%;
  background-color: #fffffff2;
  padding: 0.2em 0 0 0;
  border-radius: 0 0 10px 10px!important;

  z-index: 100;
}
.filter-wrap{
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1em 0;
}
.age-wrap{
  font-size: 14px;
  align-items: center;
  justify-content: center;
}
.party-icon {
  width: 28px;
  height: 35px;
}
.party-icon-reform {
  width: 50px;
  height: 50px;
}

.candidate-new {
  position: relative;
}

.candidate-new-label {
  position: absolute;
  top: -10px;
  right: -15px;
  width: 0;
  height: 0;
  border-top: 50px solid #e90044;
  border-left: 50px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.candidate-new-text {
  position: absolute;
  top: -44px;
  right: 7px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  transform: rotate(0);
}

.search-input {
  position: relative;
  width: 300px;
  margin-inline: auto;
  margin-top: 20px;
}

.search-input img {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
}
.search-box{
  /* background-image:url(../img/common/icon-search-grey.svg); */
  background-image:url(https://dss0.zbstatic5.com/assets/interactive/2025/singapore-general-election-2025/img/common/icon-search-grey.svg);
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
  font-size:14px !important;
  padding-left: 36px !important;
}
.form-control {
  border-radius: 20px !important;
}
#vertical-line {
  width: 1px;
  background-color: #a6a6a6;
  margin: 0 10px;
}
/* Sorting */

#sorting-list {
  display: none;
  list-style-type: none;
  padding: 0;
}
.no-result {
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  #sorting-list {
    display: block;
  }

  #toggleSorting {
    pointer-events: none;
  }
}

#toggleSorting{
  border: none;
  padding: 0.5em 0.8em 0.2em;
  border-bottom: 1px solid #b1b1b1;
  background-color: #f0f2f5;
}
#sorting-list li {
  cursor: pointer;
  padding: 8px 0 0 0;
  text-align: left;
}
.sorting-item {
  font-weight: 800;
}
.sorting-item:hover {
  color: var(--theme-ui-colors-secondary);
}
.sorting-item:active {
  color: var(--theme-ui-colors-secondary);
}
.sorting-item:target {
  color: var(--theme-ui-colors-secondary);
}
.ageSorting b {
  font-weight: 800;
  color: var(--theme-ui-colors-secondary);
}
#toggleSorting span{
  color: #999;
}
button:focus {
  outline: none;
}
@media (min-width: 576px) {
  #sorting-button {
    position: absolute;
    top: 0;
    right: 5em;
    padding: 0.5em 0.5em 0;
    font-size: 0.9rem;
    border-radius: 10px!important;
    margin: 10px;
    background-color: #efefef;
  }
}
@media (max-width: 575px) {
  #sorting-button {
    margin-top: 20px;
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 1024px) {
  .filter-container {
    width: 80%;
    flex-wrap: wrap;
    justify-content: center;
  }
  /* .candidate-new-label {
    top: -25px;
  } */

  .candidate-card {
    width: 40% !important;
  }
  .filter-btn {
    font-size: 14px;
    padding: 6px 12px;
  }

  .reset-icon {
    width: auto;
  }

#sorting-options label {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}
#sorting-options input[type="radio"] {
  margin-right: 0.2em;
}
  #sorting-button {
    right: 0;
    margin: auto;
    padding: 0;
    position: relative;
  }

}
@media (max-width: 767px) {
  .filter-container {
    flex-wrap: wrap;
    width: 100%;
    gap: 5px;
  }
  .filter-btn {
    width: 100%;
  }
  .reset-icon img {
    height: 15px;
    width: 15px;
  }
  .accordion-button.active:after {
    bottom: 64%;
}
  .custom-dropdown {
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    margin-bottom: 5px;
  }
  .custom-dropdown.right {
    left: 0;
    transform: none;
  }
  .custom-dropdown.left {
    left: -100%;
    transform: none;
  }
  .arrow-icon{
    display: none;
  }
  .search-input {
    width: 80%;
    margin-top: 0.6em;
  }
  #sorting-button {
    width: 100%;
    text-align: center;
    margin-top: 0;
  }
  .candidate-card {
    width: 100% !important;
    margin: 10px 0 0 0;
  }
  .form-control {
    font-size: 14px!important;
  }
  .candidate-name {
    font-size: 1.3rem;
  }
  #toggleSorting {
    font-size: 0.9rem;
  }
  #cardsContainer {
    gap: 0px;
  }
.candidate-img {
  width: 80px;
  height: 80px;
}
/* .accordion-button {
  height: 150px;
} */
.expanded-details {
  overflow-y: auto;
  height: 210px;
}
.accordion-content {
  height: 240px;
}
}
