.headtop {
  display: flex;
  align-items: center;
}

#user-location-block {
  display: flex;
  align-items: center;
  position: relative;
}

.dialog-container {
  /* display: none; */
  position: absolute;
  top: 80%;
  left: -10%;
  z-index: 9999;
  min-width: 330px;
  width: 300px;
  box-shadow: 0 0 11px #909090;
  border: solid thin gray;
  padding: 2rem;
  border-radius: 5px;
  background-color: white;
}

#dismissPopup {
  background: transparent;
  color: #000;
  padding-left: 0;
}

#dismissPopup:hover,
#dismissPopup:focus,
#dismissPopup:active {
  text-decoration: underline;
}

.dialog-container button.dialog-close {}

.dialog-container button:not(.dialog-close) {
  border-radius: 5px;
  background: #FFD200;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  color: #2A2723;
  padding: 0.7rem;
}

.dialog-container button:not(.dialog-close):hover,
.dialog-container button:not(.dialog-close):focus,
.dialog-container button:not(.dialog-close):active {
  background-color: #FFA12D !important;
  text-decoration: underline;
}

#locationPopupText span {
  font-weight: 600;
}

#locationPopup #districtList {
  display: flex;
  flex-wrap: wrap;
}

#locationPopup #districtList .district-item {
  flex-basis: 50%;
  box-sizing: border-box;
}

#locationPopup button {
  margin-top: 10px;
}

input[type="radio"]:checked+label {
  color: #003592;
  text-decoration: underline;
}

.district-item label:hover,
.district-item label:focus {
  cursor: pointer;
  color: #003592;
  text-decoration: underline;
}

.dialog-flex {
  display: flex;
  flex-direction: column;
}

@media only screen and (min-width: 1024px) {
  .dialog-flex {
    flex-direction: row;
  }
}

button.link-like.location-change-button.d-none.d-sm-block {
  max-width: 140px;
}

div#locationPopup {
  right: 11rem;
  left: initial;
  top: -6rem;
}

@media only screen and (max-width: 1024px) {
  div#locationPopup {
    right: 11rem;
    left: initial;
    top: -2rem;
  }

  .custom-path-active #locationPopup {
    top: -8rem;
  }

}

@media only screen and (max-width: 768px) {
  .custom-path-active #locationPopup {
    top: -7rem;
  }

  div#locationPopup {
    right: 50%;
    left: 50%;
    top: -1rem;
    transform: translateX(-50%);
  }

}

div#search-dialog-large {
  right: 0;
  left: initial;
  width: auto;
  top: 2.6rem;
}

#districtSelectionForm {
  width: 100vw;
  top: 2rem;
}

#districtSelectionForm {
  width: calc(100vw - 5px);
  top: 9px;
  position: fixed;
  left: 0;
  height: 100vh;
  overflow: auto;
  z-index: 10000000;
}

.mobile-menu-open #districtSelectionForm {
  height: calc(100vh - 7rem);
}

@media only screen and (min-width: 768px) {
  #districtSelectionForm {
    width: 100vw;
    top: -6.25rem;
    position: absolute;
    left: 50%;
    height: auto;
    max-height: 90vh;
    transform: translateX(-50%);
    overflow: auto;
    max-width: 1200px;
  }
}

#districtList {
  margin: 0 -1rem;
  list-style: none;
}

@media only screen and (min-width: 768px) {
  #districtList {
    column-count: 2;
    gap: 20px;
    margin: 0 0 0 -1rem;
  }
}

@media only screen and (min-width: 1024px) {
  #districtList {
    column-count: 4;
  }
}

#districtList .district-item a {
  line-height: 1.5;
  display: inline-block;
  padding: .5rem 0 .5rem 1rem;
  margin: 0;
  color: #2A2723;
  text-decoration: none;
}

#districtList .district-item a:hover {
  cursor: pointer;
  text-decoration: underline;
  color: #003592;
}


#districtList .district-item {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  line-height: 2;
}

#districtList .district-item.active a {
  font-weight: 700;
  color: #003592;
  text-decoration: underline;

}

#districtList .district-item input {
  position: absolute;
  width: 100%;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem 0;
  display: inline-block;
  height: 2rem;
  height: 100%;
  appearance: none;
}

#districtList .district-item input:hover {
  cursor: pointer;
}

.stylized-header {
  border-bottom: solid 2px #ffd200;
  display: inline-block;
  font-size: 1rem;
}

#districtSelectionForm .dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.6rem;
  line-height: 0;
  display: inline;

}

#districtSelectionForm .social-footer-menu a {
  background-color: var(--light-grey);
  margin: 0 1rem 0 0 !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
  padding: .5rem !important;
}

#districtSelectionForm .social-footer-menu a:hover {
  background-color: var(--light-blue);
}

.location-change-button.loading {
  position: relative;
}

.location-change-button.loading::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 6px;
  width: 24px;
  height: 24px;
  margin: -12.5px 0 0 -12px;
  border: 2px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

@media only screen and (min-width: 1024px) {
  .location-change-button.loading::after {
    top: 20px;
  }
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
#location-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.275) !important; /* Dark semi-transparent background */
  z-index: 999; /* Ensure it sits below the dialog */
}