:root {
  --brand-deep: #13315c;
  --brand-mid: #2a6f97;
  --brand-accent: #f4a261;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --ring: rgba(42, 111, 151, 0.35);
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--text-main);
  overflow: hidden;
}

/* Creates subtle atmosphere over the map without reducing readability. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 8% 8%, rgba(244, 162, 97, 0.24), transparent 38%),
    radial-gradient(circle at 92% 90%, rgba(19, 49, 92, 0.18), transparent 34%);
}

.map_canvas {
  width: 100%;
  height: 100vh;
  position: relative;
  z-index: 1;
}

#search-panel {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1200;
  width: min(540px, calc(100vw - 36px));
}

#search {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(42, 111, 151, 0.3);
  background: var(--surface);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 28px rgba(19, 49, 92, 0.16);
  padding: 0 18px;
  font-size: 16px;
  font-family: "Barlow", sans-serif;
  color: var(--text-main);
}

#search::placeholder {
  color: #6b7280;
}

#search:focus-visible {
  outline: 3px solid var(--ring);
  border-color: var(--brand-mid);
}

.custom-button-wrapper {
  position: fixed;
  right: 18px;
  z-index: 1200;
}

.sites-control-wrapper {
  top: 94px;
}

.locate-control-wrapper {
  top: 154px;
}

.custom-map-control-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(42, 111, 151, 0.35);
  background-color: var(--surface-strong);
  box-shadow: 0 10px 20px rgba(19, 49, 92, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.custom-map-control-icon:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 28px rgba(19, 49, 92, 0.28);
  background-color: #ffffff;
}

.custom-locate-icon {
  background-image: url("/pictures/locate.png");
  background-size: 24px;
  background-repeat: no-repeat;
  background-position: center;
}

.custom-sites-icon img.custom-icon {
  width: 24px;
  height: auto;
}

.hover-text {
  position: absolute;
  top: 50%;
  right: 54px;
  transform: translateY(-50%);
  background-color: var(--brand-deep);
  color: #fff;
  border-radius: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 10px;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(19, 49, 92, 0.24);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.custom-map-control-icon:hover .hover-text {
  opacity: 1;
  visibility: visible;
}

.map-legend {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: min(1240px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(42, 111, 151, 0.25);
  box-shadow: 0 14px 28px rgba(19, 49, 92, 0.2);
  font-size: 13px;
  color: var(--text-main);
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(42, 111, 151, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-main);
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

.map-legend-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(19, 49, 92, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

.map-legend-item:focus-visible {
  outline: 3px solid var(--ring);
}

.map-legend-item.is-hidden {
  opacity: 0.52;
  background: rgba(255, 255, 255, 0.45);
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.bg-planned {
  background-color: #6ecbf5;
  border-radius: 6px;
}

.bg-inprogress {
  background-color: #49dcb1;
  border-radius: 6px;
}

.bg-ready {
  background-color: #f7b185;
  border-radius: 6px;
}

.modern-button {
  font-family: "Space Grotesk", sans-serif;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(120deg, var(--brand-deep), var(--brand-mid));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.modern-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(19, 49, 92, 0.28);
}

.modern-button:focus-visible {
  outline: 3px solid var(--ring);
}

#polygon-list {
  position: fixed;
  top: 94px;
  right: 74px;
  z-index: 1300;
  width: min(320px, calc(100vw - 110px));
  max-height: min(62vh, 430px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(42, 111, 151, 0.2);
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(19, 49, 92, 0.24);
  backdrop-filter: blur(9px);
  padding: 12px;
  font-size: 14px;
}

.polygon-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background-color: rgba(255, 255, 255, 0.66);
}

.polygon-list-item:last-child {
  margin-bottom: 0;
}

.polygon-list-item:hover {
  background-color: rgba(255, 255, 255, 0.92);
}

.polygon-list-item input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--brand-mid);
}

.polygon-list-item label {
  cursor: pointer;
  flex-grow: 1;
  color: var(--text-main);
}

.gm-style-iw {
  z-index: 2000 !important;
}

.gm-style .gm-style-iw-c {
  border-radius: 14px !important;
  border: 1px solid rgba(66, 153, 225, 0.7) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow:
    0 0 0 2px rgba(95, 195, 255, 0.45),
    0 0 34px rgba(64, 170, 255, 0.7),
    0 0 60px rgba(64, 170, 255, 0.4),
    0 16px 34px rgba(19, 49, 92, 0.25) !important;
}

.popup-card {
  text-align: center;
  font-family: "Barlow", sans-serif;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(66, 153, 225, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 0 18px rgba(95, 195, 255, 0.38),
    0 10px 24px rgba(19, 49, 92, 0.2);
}

.popup-message {
  margin: 10px 0 20px;
  font-size: 14px;
  color: #1f2937;
}

.popup-address {
  margin: 10px 0 0;
  font-size: 12px;
  color: #4b5563;
}

@media (max-width: 768px) {
  #search-panel {
    top: 12px;
    left: 10px;
    width: calc(100vw - 20px);
  }

  #search {
    height: 46px;
    font-size: 15px;
    border-radius: 12px;
  }

  .custom-button-wrapper {
    right: 10px;
  }

  .sites-control-wrapper {
    top: 78px;
  }

  .locate-control-wrapper {
    top: 132px;
  }

  .custom-map-control-icon {
    width: 40px;
    height: 40px;
  }

  .hover-text {
    display: none;
  }

  .map-legend {
    left: 10px;
    right: 58px;
    width: auto;
    bottom: 10px;
    padding: 10px;
    font-size: 12px;
  }

  #polygon-list {
    top: 78px;
    right: 58px;
    width: min(280px, calc(100vw - 74px));
  }
}

/* Customize the form container */
/* Center the signup form */
#splynx-signup-widget-frame {
  display: block;
  margin: 0 auto; /* Center horizontally */
  max-width: 800px; /* Optional: Limit the maximum width */
  min-height: 800px; /* Set a minimum height */
  border: 2px solid #004080; /* Optional: Add a border for styling */
  border-radius: 10px; /* Optional: Add rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional: Add a shadow */
}

/* Customize the form fields */
iframe[data-widget-type="embedded"] {
  background-color: #f9f9f9; /* Light background */
  padding: 10px; /* Add padding inside the form */
}

/* Customize the buttons */
iframe[data-widget-type="embedded"] button {
  background-color: #004080; /* Change button color */
  color: #fff; /* White text */
  border: none; /* Remove border */
  border-radius: 5px; /* Rounded corners */
  padding: 10px 10px; /* Add padding */
  font-size: 16px; /* Increase font size */
  cursor: pointer; /* Pointer cursor */
}

iframe[data-widget-type="embedded"] button:hover {
  background-color: #003060; /* Darker blue on hover */
}

/* Customize the form title */
iframe[data-widget-type="embedded"] h1,
iframe[data-widget-type="embedded"] h2 {
  color: #004080; /* Change title color */
  font-family: 'Arial', sans-serif; /* Change font */
  text-align: center; /* Center align */
}

/* Customize input fields */
iframe[data-widget-type="embedded"] input[type="text"],
iframe[data-widget-type="embedded"] input[type="email"],
iframe[data-widget-type="embedded"] input[type="tel"] {
  border: 1px solid #ccc; /* Add a border */
  border-radius: 5px; /* Rounded corners */
  padding: 10px; /* Add padding */
  width: 100%; /* Full width */
  margin-bottom: 15px; /* Add spacing */
}

/* Customize labels */
iframe[data-widget-type="embedded"] label {
  font-weight: bold; /* Bold text */
  color: #333; /* Darker text color */
  display: block; /* Ensure labels are above inputs */
}

/* Form container layout */
.form-container {
  display: flex;
  align-items: stretch; /* Ensure both the image and form stretch to the same height */
  justify-content: center;
  max-width: 1400px; /* Increase the container width */
  margin: 50px auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  height: 800px; /* Make the container take up the full viewport height */
}


/* Right side form */
.form-content {
  flex: 1.5; /* Make the form section larger */
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center the form vertically */
  overflow: hidden; /* Remove the scrollbar */
  height: 800px; /* Make the container take up the full viewport height */

}

/* ─── Coverage Popup: FNO Tabs ──────────────────── */
.fno-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.fno-tab-btn {
  border: none;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.fno-tab-btn:not(.active) {
  background: #f1f5f9 !important;
  color: #374151 !important;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

/* ─── Coverage Popup: Plan Cards ─────────────────── */
.fno-tab-content {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  padding: 2px 0 4px;
}
.popup-plan-card {
  width: calc(50% - 3px);
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.popup-plan-card:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}
.popup-plan-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.popup-plan-speed {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.2;
}
.popup-plan-type {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 3px;
}
.popup-plan-price {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 3px 0 1px;
}
.popup-plan-price span {
  font-size: 10px;
  font-weight: 400;
  color: #64748b;
}
.popup-plan-billing {
  font-size: 10px;
  color: #94a3b8;
  text-transform: capitalize;
}

/* Splynx iframe */
#splynx-signup-widget-frame {
  display: block;
  width: 100%;
  border: none;
}