/* ================================================
   Base & Map Container
   ================================================ */
body, html {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen;
  background: #f0f0f5;
  position: relative;
}

#map {
  height: 100%;
  width: 100%;
}


/* ================================================
   Dark Mode Overrides
   ================================================ */
body.dark-mode {
  background: #20232a;
}

body.dark-mode #controls {
  background: #2c2f36;
  color: #ddd;
}


/* ================================================
   Centered Controls Panel (#controls styled as panel)
   ================================================ */
#controls {
  position: absolute;
  top: 12px;                   /* near the top edge */
  left: 50%;
  transform: translateX(-50%); /* center horizontally */
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  max-width: 320px;
  width: 90%;
  transition: box-shadow 0.3s ease;
  z-index: 5;                  /* above map but below Google UI */
}

#controls:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#controls.hidden .control-content {
  display: none;
}


/* ================================================
   Toggle Button (hamburger) inside the panel
   ================================================ */
#sidebarToggle {
  background: #007aff;         /* iOS-style blue */
  color: white;
  border: none;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: block;
  margin: 0 auto 12px;         /* center and give space below */
  transition: background 0.2s ease;
  z-index: 6;
}

#sidebarToggle:hover {
  background: #005fdd;
}


/* ================================================
   Control Content Layout
   ================================================ */
.control-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-content h3 {
  margin-top: 0;
}


/* ================================================
   Control Groups (shared)
   ================================================ */
.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.control-group label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.control-group input[type="checkbox"] {
  margin-right: 4px;
  transform: scale(1.1);
}

.control-group button {
  background: #007aff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.control-group button:hover {
  background: #005fdd;
}

#controls input[type="number"] {
  width: 60px;
}


/* ================================================
   Date Range Picker Styling
   ================================================ */
#dateRange {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

#dateRange:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 3px rgba(0, 122, 255, 0.5);
}


/* ================================================
   Summary Area
   ================================================ */
.control-summary {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  border-top: 1px solid #ddd;
  padding-top: 8px;
  margin-top: 8px;
}


/* ================================================
   Ensure Google’s Default UI Renders Above the Panel
   ================================================ */
.gm-fullscreen-control,
.gm-top-left .gmnoprint,
.gm-top-right .gmnoprint {
  z-index: 6 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Styles for the new demographics + form popup
   ───────────────────────────────────────────────────────────────────────────── */

/* ================================================
   Responsive & Modern Popup Menu Styles
   ================================================ */

/* 1) Container for the entire popup (demographics + form) */
/* ------------------------------------------------
   Compact Styles for the InfoWindow Content
   ------------------------------------------------ */

.demographics-popup {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px;        /* shrink maximum width */
  padding: 12px;           /* reduce padding */
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen;
  font-size: 14px;         /* smaller base font */
  color: #222;
  background: #fff;
  border-radius: 6px;
}

.demographics-popup h4 {
  font-size: 16px;
  margin: 0 0 8px;         /* tighter margins */
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 4px;
}

.demo-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.demo-row span:first-child {
  font-weight: 500;
  color: #555;
  font-size: 13px;
}

.demo-row span:last-child {
  font-weight: 600;
  color: #000;
  font-size: 13px;
}

.button-row {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}

.popup-btn {
  background-color: #007aff;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  transition: background-color 0.2s ease;
}

.popup-btn:hover,
.popup-btn:focus {
  background-color: #005fdd;
  outline: none;
}

.hidden {
  display: none !important;
}

/* Marker form container */
#addMarkerForm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#addMarkerForm label {
  font-size: 13px;
  color: #333;
  margin-bottom: 2px;
}

/* Two‐column layout for text inputs where possible */
#addMarkerForm .two-col {
  display: flex;
  gap: 6px;
}

#addMarkerForm select,
#addMarkerForm input[type="text"],
#addMarkerForm input[type="tel"],
#addMarkerForm input[type="email"],
#addMarkerForm input[type="datetime-local"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

#addMarkerForm select:focus,
#addMarkerForm input:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 2px rgba(0, 122, 255, 0.5);
}

/* Contact‐only details section */
#contactDetails {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 360px) {
  .demographics-popup {
    max-width: 260px;
    padding: 10px;
    font-size: 13px;
  }
  .popup-btn {
    padding: 6px;
    font-size: 13px;
  }
  #addMarkerForm select,
  #addMarkerForm input {
    font-size: 13px;
    padding: 6px 8px;
  }
}

/* Ensure no extra transitions (instant toggle) */
.demographics-popup,
#demographicsSection,
#addMarkerForm,
#contactDetails {
  transition: none !important;
}
/* -------------------------------------------
   Base class for any custom marker‐icon
   ------------------------------------------- */
.marker-icon {
  width:        32px;        /* display size (adjust as needed) */
  height:       32px;
  background:   no-repeat center/contain;
  display:      block;
  transform:    translate(-50%, -50%); /* center on the point */
  cursor:       pointer;
}

/* -------------------------------------------
   Per‐type backgrounds (use the sandbox URL)
   ------------------------------------------- */
.marker-icon.not_home {
  background-image: url('icon_not_home.png');
}

.marker-icon.do_not_knock {
  background-image: url('icon_do_not_knock.png');
}

.marker-icon.new_roof {
  background-image: url('icon_new_roof.png');
}

.marker-icon.contact {
  background-image: url('icon_contact.png');
}
/* ─────────────────────────────────────────────────────── */
/*  Collapsible Date-Sidebar Styles                       */
/* ─────────────────────────────────────────────────────── */
#dateSidebar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 260px;
  max-width: 80%;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  z-index: 998;
  transform: translateX(-100%);
  transition: transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen;
}

#dateSidebar.expanded {
  transform: translateX(0);
}

#dateSidebarHeader {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #ddd;
  background: #f7f7f7;
}

#dateTabs {
  display: flex;
  border-bottom: 1px solid #ddd;
}
#dateTabs .dateTab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  border: none;
  background: #f1f1f1;
  cursor: pointer;
  font-size: 14px;
}
#dateTabs .dateTab.active {
  background: #ffffff;
  font-weight: bold;
  border-bottom: 2px solid #007aff;
}

#dateLists {
  flex: 1;
  overflow-y: auto;
}

.dateList {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
}
.dateList.hidden {
  display: none;
}
.dateList li {
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}
.dateList li:hover {
  background: #f0f8ff;
}
.dateList li.selected {
  background: #007aff;
  color: #fff;
}

/* If you want a bit more spacing between header and lists: */
#dateLists {
  margin-top: 8px;
}

/* Optional scrollbar styling */
#dateLists::-webkit-scrollbar {
  width: 6px;
}
#dateLists::-webkit-scrollbar-track {
  background: #f1f1f1;
}
#dateLists::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}



