/* ── Installer Search Section ── */
.installer-search {
  display: flex;
  justify-content: center;
  padding: 80px 20px 40px;
}

.installer-search .installer-search_inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 600px;
}

.installer-search .installer-search_inner h2 {
  font-family: metropolis, sans-serif;
  font-weight: 600;
  font-size: 32px;
  color: #002140;
  text-align: center;
  margin: 0;
}

.installer-search .installerSearch {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
}

.installer-search .installer-input {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.installer-search .input-icon {
  position: absolute;
  left: 16px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23002140' d='M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
  z-index: 1;
}

.installer-search input#postcode {
  width: 100%;
  height: 56px;
  padding: 0 16px 0 44px;
  font-family: metropolis, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #002140;
  border: 2px solid #002140;
  border-right: none;
  border-radius: 0;
  outline: none;
  background: #fff;
  box-shadow: none;
}

.installer-search input#postcode::placeholder {
  color: #999;
}

.installer-search input#postcode:focus {
  border-color: #be863c;
}

.installer-search button.btn-primary {
  height: 56px;
  padding: 0 32px;
  font-family: metropolis, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #fff;
  background-color: #0f4721;
  border: 2px solid #0f4721;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.installer-search button.btn-primary:hover {
  background-color: #002140;
  border-color: #002140;
}

.installer-search #loading {
  position: absolute;
  right: 140px;
  top: 50%;
  transform: translateY(-50%);
}

.installer-search #loading img {
  width: 20px;
  height: 20px;
}

/* ── Locations Section (list + map) ── */
.installer-locations {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  background-color: #f5f5f5;
}

.installer-locations .installers {
  position: relative;
  overflow: hidden;
}

.installer-locations .container-half.acf-map {
  min-height: 400px;
  padding: 0;
}

/* ── Location List ── */
.location-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.location-items::-webkit-scrollbar {
  width: 4px;
}

.location-items::-webkit-scrollbar-thumb {
  background: #be863c;
  border-radius: 2px;
}

.location-items::-webkit-scrollbar-track {
  background: #e8e8e8;
}

.location-items.scrollable {
  overflow-y: auto;
}

/* ── Location Item ── */
.location {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.location:hover {
  background-color: rgba(190, 134, 60, 0.05);
}

.location:hover h5 {
  color: #be863c;
  transition: color 0.2s ease;
}

.location h5 {
  font-family: metropolis, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #002140;
  margin: 0;
}

.location p {
  font-family: metropolis, sans-serif;
  font-size: 14px;
  color: #666;
  margin: 0;
}

.location .retailer-aside {
  display: none;
}

/* ── Side Info Panel ── */
.location-info,
.installer-aside {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  z-index: 999;
  transform: translateX(-110%);
  transition: transform 0.35s ease;
}

.location-info.visible,
.installer-aside.visible {
  transform: translateX(0);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  overflow-y: auto;
}

.exit-info-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: metropolis, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #002140;
}

.exit-info-panel:before {
  content: '←';
  font-size: 14px;
}

.exit-info-panel p {
  margin: 0;
  display: inline;
}

/* ── Info Panel Inner ── */
.location-info_inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location-info_inner .installer h4 {
  font-family: metropolis, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #002140;
  margin: 0;
}

.location-info_inner .installer p {
  font-size: 14px;
  color: #666;
}

.location-info_inner .retailer-address {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-info_inner .retailer-address p,
.location-info_inner .retailer-address a {
  font-family: metropolis, sans-serif;
  font-size: 14px;
  color: #444;
  margin: 0;
  line-height: 1.6;
  word-break: break-word;
}

.location-info_inner .retailer-address a {
  color: #be863c;
  text-decoration: none;
}

.location-info_inner .retailer-address a:hover {
  text-decoration: underline;
}

.location-info_inner .social-links {
  display: flex;
  gap: 16px;
}

.location-info_inner .social-links a {
  font-family: metropolis, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #002140;
  text-decoration: none;
  border-bottom: 1px solid #002140;
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.location-info_inner .social-links a:hover {
  color: #be863c;
  border-color: #be863c;
}

/* ── Callout Links ── */
.callouts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.callouts a {
  display: inline-flex;
  align-items: center;
  font-family: metropolis, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #0f4721;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid #0f4721;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.callouts a:hover {
  color: #be863c;
  border-color: #be863c;
}

/* ── Google Maps overrides ── */
.acf-map {
  border: none;
}

.acf-map img {
  max-width: inherit !important;
}

.gmnoprint button:after {
  display: block;
}

.gmnoprint span,
.gmnoprint a,
.gm-style-cc a {
  line-height: 14px;
}

/* ── Desktop ── */
@media (min-width: 968px) {
  .installer-search {
    padding: 93px 20px 50px;
  }

  .installer-search .installer-search_inner h2 {
    font-size: 40px;
  }

  .installer-locations {
    flex-direction: row;
    height: 80vh;
  }

  .installer-locations .installers {
    width: 40%;
    height: 100%;
    overflow: hidden;
  }

  .installer-locations .container-half.acf-map {
    width: 60%;
    height: 100%;
    min-height: unset;
  }

  .location-items {
    max-height: 100%;
    padding: 32px 40px;
  }

  .location-info.visible,
  .installer-aside.visible {
    padding: 40px;
  }

  .exit-info-panel {
    margin-bottom: 16px;
  }

  .callouts {
    flex-direction: row;
    gap: 32px;
  }
}

/* ── Mobile ── */
@media (max-width: 967px) {
  .installer-search .installerSearch {
    flex-direction: column;
    gap: 12px;
  }

  .installer-search button.btn-primary {
    width: 100%;
    height: 50px;
  }

  .installer-search input#postcode {
    border-right: 2px solid #002140;
  }
}
