#ach-interactive-map-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--color-border-neutral-quiet);
  border-radius: 8px;
}
#ach-map-sidebar {
  width: 340px;
  background: var(--color-neutral-object);
  border-radius: 12px;
  min-height: 500px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#ach-map-canvas {
  flex: 1;
  min-height: 500px;
}

.ach-sidebar-header {
  border-bottom: 1px solid var(--color-border-neutral-quiet);
  padding: 12px 16px;
}
.ach-sidebar-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-heading);
}
.ach-sidebar-desc {
  color: var(--color-body);
  font-size: 0.98rem;
}
.ach-category-list {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-bottom-left-radius: 8px;
  background-color: var(--color-neutral-foreground);
}
.ach-map-filter-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-body-loud);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  text-align: left;
}
.ach-map-filter-btn i {
  font-size: 1.2em;
  color: #6b7280;
}
.ach-map-filter-btn.active,
.ach-map-filter-btn:focus {
  background-color: var(--color-background-brand-blue);
  color: var(--color-contextual-on-solid);
  border: 1px solid var(--color-contextual-action-quiet);
  border-radius: 8px 8px 0 0;
}
.ach-map-filter-btn.active i,
.ach-map-filter-btn:focus i {
  color: var(--color-contextual-on-solid);
}
.ach-post-list {
  display: flex;
  flex-direction: column;
  background-color: var(--color-neutral-background);
}
.ach-post-item {
  padding: 10px 14px;
  border-radius: 6px;
  background: transparent;
  color: var(--color-body-loud);
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ach-post-item:hover {
  background: var(--color-background-brand-blue);
  color: var(--color-contextual-on-solid);
}

/* Loading states */
.ach-loading-posts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--color-body);
  font-size: 0.9rem;
}

.ach-loading-posts i {
  color: var(--color-contextual-action);
}

.ach-map-filter-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ach-map-filter-btn:disabled:hover {
  background: transparent;
  color: var(--color-body-loud);
}

.gm-style-iw,
.gm-style-iw-chr,
.gm-style .gm-style-iw-d,
.gm-style .gm-style-iw-tc::after {
  background-color: var(--color-neutral-object) !important;
  font-family: Geist;
}

.gm-style-iw {
  padding: 8px !important;
}

.gm-style-iw-d {
  overflow: auto !important;
  max-height: 400px !important;
}

/* Theme-aware scrollbar styling for infoWindow */
.gm-style-iw-d::-webkit-scrollbar {
  width: 8px;
}

.gm-style-iw-d::-webkit-scrollbar-track {
  background: var(
    --color-neutral-object-accent-silent,
    rgba(98, 114, 137, 0.05)
  );
  border-radius: 4px;
}

.gm-style-iw-d::-webkit-scrollbar-thumb {
  background: var(--color-object-accent, rgba(98, 114, 137, 0.15));
  border-radius: 4px;
  border: 1px solid
    var(--color-neutral-object-accent-silent, rgba(98, 114, 137, 0.05));
}

.gm-style-iw-d::-webkit-scrollbar-thumb:hover {
  background: var(--color-object-accent-loud, rgba(98, 114, 137, 0.3));
}

/* Firefox scrollbar styling */
.gm-style-iw-d {
  scrollbar-width: thin;
  scrollbar-color: var(--color-object-accent, rgba(98, 114, 137, 0.15))
    var(--color-neutral-object-accent-silent, rgba(98, 114, 137, 0.05));
}

/* Theme-aware scrollbar styling for sidebar elements */
#ach-map-sidebar::-webkit-scrollbar,
#ach-single-place-sidebar::-webkit-scrollbar,
#ach-route-map-sidebar::-webkit-scrollbar {
  width: 8px;
}

#ach-map-sidebar::-webkit-scrollbar-track,
#ach-single-place-sidebar::-webkit-scrollbar-track,
#ach-route-map-sidebar::-webkit-scrollbar-track {
  background: var(
    --color-neutral-object-accent-silent,
    rgba(98, 114, 137, 0.05)
  );
  border-radius: 4px;
}

#ach-map-sidebar::-webkit-scrollbar-thumb,
#ach-single-place-sidebar::-webkit-scrollbar-thumb,
#ach-route-map-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-object-accent, rgba(98, 114, 137, 0.15));
  border-radius: 4px;
  border: 1px solid
    var(--color-neutral-object-accent-silent, rgba(98, 114, 137, 0.05));
}

#ach-map-sidebar::-webkit-scrollbar-thumb:hover,
#ach-single-place-sidebar::-webkit-scrollbar-thumb:hover,
#ach-route-map-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-object-accent-loud, rgba(98, 114, 137, 0.3));
}

/* Firefox scrollbar styling for sidebars */
#ach-map-sidebar,
#ach-single-place-sidebar,
#ach-route-map-sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-object-accent, rgba(98, 114, 137, 0.15))
    var(--color-neutral-object-accent-silent, rgba(98, 114, 137, 0.05));
}

/* Custom InfoWindow Content Styles */
.ach-infowindow-content {
  min-width: 320px;
  max-width: 450px;
  padding: 16px;
  background-color: var(--color-neutral-object);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: Geist, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
}

.ach-infowindow-image {
  margin: 0 0 16px 0;
}

.ach-infowindow-image img {
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ach-infowindow-title {
  color: var(--color-heading-loud);
  margin: 0 0 12px 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
}

.ach-infowindow-body {
  color: var(--color-body);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.ach-infowindow-section {
  margin: 12px 0;
}

.ach-infowindow-section:first-child {
  margin-top: 0;
}

.ach-infowindow-section:last-child {
  margin-bottom: 0;
}

.ach-infowindow-label {
  font-weight: 600;
  color: var(--color-body-loud);
  display: block;
  margin-bottom: 4px;
}

.ach-infowindow-text {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ach-infowindow-link {
  color: var(--color-contextual-action);
  text-decoration: none;
  word-break: break-all;
}

.ach-infowindow-link:hover {
  text-decoration: underline;
}

/* Navigation buttons styling */
.ach-infowindow-navigation {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid
    var(--color-border-neutral-quiet, rgba(183, 192, 204, 0.3));
}

.ach-infowindow-nav-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-start;
}

/* Navigation buttons now use ach-button shortcode styles */
.ach-infowindow-nav-buttons .ach-button {
  /* Ensure buttons display correctly in infowindow context */
  text-decoration: none;
  margin: 0;
  /* Override any potential conflicting styles */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ach-infowindow-nav-buttons .ach-button i {
  /* Ensure icon sizing is consistent */
  font-size: 1.2rem;
  margin: 0 !important;
}

.ach-infowindow-nav-buttons .ach-button span {
  /* Hide text in icon-only variant */
  display: none !important;
}

/* Theme-aware navigation button borders */
.ach-infowindow-navigation {
  border-top-color: var(--color-border-neutral-quiet, rgba(183, 192, 204, 0.3));
}

/* Dark theme adjustments for navigation buttons */
@media (prefers-color-scheme: dark) {
  .ach-infowindow-navigation {
    border-top-color: var(--color-border-neutral-quiet, rgba(72, 84, 102, 1));
  }
}

[data-theme='dark'] .ach-infowindow-navigation {
  border-top-color: var(
    --color-border-neutral-quiet,
    rgba(72, 84, 102, 1)
  ) !important;
}

/* Permalink button styling */
.ach-infowindow-permalink {
  margin-top: 16px;
}

/* Mobile responsive adjustments */
@media (max-width: 700px) {
  .ach-infowindow-content {
    min-width: 280px;
    max-width: 380px;
    padding: 12px;
  }

  .ach-infowindow-image {
    margin: 0 0 12px 0;
  }

  .ach-infowindow-image img {
    max-height: 150px;
  }

  .ach-infowindow-title {
    font-size: 15px;
  }

  .ach-infowindow-body {
    font-size: 13px;
  }

  /* Mobile navigation button adjustments */
  .ach-infowindow-nav-buttons {
    flex-direction: row;
    gap: 8px;
    justify-content: flex-start;
  }

  /* Mobile navigation button adjustments for ach-button */
  .ach-infowindow-nav-buttons .ach-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .ach-infowindow-nav-buttons .ach-button i {
    font-size: 1.3rem;
  }

  .gm-style-iw-d {
    max-height: 350px !important;
  }

  /* Mobile scrollbar adjustments */
  .gm-style-iw-d::-webkit-scrollbar {
    width: 6px;
  }

  .gm-style-iw-d::-webkit-scrollbar-thumb {
    border-width: 0.5px;
  }

  /* Mobile scrollbar adjustments for sidebars */
  #ach-map-sidebar::-webkit-scrollbar,
  #ach-single-place-sidebar::-webkit-scrollbar,
  #ach-route-map-sidebar::-webkit-scrollbar {
    width: 6px;
  }

  #ach-map-sidebar::-webkit-scrollbar-thumb,
  #ach-single-place-sidebar::-webkit-scrollbar-thumb,
  #ach-route-map-sidebar::-webkit-scrollbar-thumb {
    border-width: 0.5px;
  }
}

/* Mobile styles */
@media (max-width: 700px) {
  #ach-interactive-map-wrapper {
    flex-direction: column;
    gap: 0;
  }
  #ach-map-sidebar {
    display: none !important;
  }
  #ach-map-mobile-dropdown-container {
    display: block !important;
    width: 100%;
    padding: 16px 12px 0 12px;
    background: #fff;
    box-sizing: border-box;
    z-index: 10;
  }
  #ach-map-canvas {
    min-height: 400px;
    width: 100% !important;
    border-radius: 0 0 12px 12px;
  }
}

#ach-map-mobile-dropdown-container {
  display: none;
}

#ach-map-mobile-category-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 1rem;
  background: #f7f7f7;
  color: #222;
  margin-bottom: 8px;
}

/* Single Place Map Styles */
#ach-single-place-map-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--color-border-neutral-quiet);
  border-radius: 8px;
  overflow: hidden;
}

#ach-single-place-sidebar {
  width: 340px;
  background: var(--color-neutral-object);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#ach-single-place-canvas {
  flex: 1;
  min-height: 500px;
}

.ach-single-place-header {
  padding: 20px;
  border-bottom: 1px solid var(--color-border-neutral-quiet);
  background: var(--color-neutral-background);
}

.ach-single-place-header h3 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.3;
}

.ach-single-place-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-body);
  font-size: 0.95rem;
}

.ach-single-place-location i {
  color: var(--color-contextual-action);
  font-size: 1rem;
}

.ach-single-place-content {
  padding: 20px;
  flex: 1;
}

.ach-single-place-meta {
  margin-bottom: 24px;
}

.ach-single-place-meta:last-child {
  margin-bottom: 0;
}

.ach-single-place-meta h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-body-loud);
}

.ach-single-place-meta h4 i {
  color: var(--color-body-loud);
  font-size: 1rem;
  width: 16px;
  text-align: center;
}

.ach-single-place-meta p {
  margin: 0;
  color: var(--color-body-loud);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ach-single-place-meta a {
  color: var(--color-contextual-action);
  text-decoration: none;
  transition: color 0.2s;
}

.ach-single-place-meta a:hover {
  color: var(--color-contextual-action-hover);
  text-decoration: underline;
}

.ach-single-place-info {
  color: var(--color-body);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ach-single-place-info p {
  margin: 0 0 12px 0;
}

.ach-single-place-info p:last-child {
  margin-bottom: 0;
}

/* Mobile styles for single place map */
@media (max-width: 700px) {
  #ach-single-place-map-wrapper.mobile-layout {
    flex-direction: column;
  }

  #ach-single-place-sidebar {
    width: 100%;
    order: 1;
    max-height: 300px;
    border-radius: 8px 8px 0 0;
  }

  #ach-single-place-canvas {
    order: 2;
    min-height: 400px;
    border-radius: 0 0 8px 8px;
  }

  .ach-single-place-header {
    padding: 16px;
  }

  .ach-single-place-header h3 {
    font-size: 1.2rem;
  }

  .ach-single-place-content {
    padding: 16px;
  }

  .ach-single-place-meta {
    margin-bottom: 20px;
  }
}

/* Route Map Styles */
#ach-route-map-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--color-border-neutral-quiet);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 1px 2px 0px rgba(17, 20, 24, 0.08),
    0px 2px 4px -1px rgba(17, 20, 24, 0.05);
}

#ach-route-map-sidebar {
  width: 530px;
  background: var(--color-neutral-foreground);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#ach-route-map-canvas {
  flex: 1;
  min-height: 500px;
}

.ach-route-header {
  padding: 20px;
  border-bottom: 1px solid var(--color-border-neutral-quiet);
  background: var(--color-neutral-background);
}

.ach-route-header h3 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.3;
}

.ach-route-excerpt {
  color: var(--color-body);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ach-route-points {
  padding: 16px 24px;
  flex: 1;
}

.ach-route-points p {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-heading-loud);
  margin-bottom: 16px;
}

.ach-route-points-list {
  display: flex;
  flex-direction: column;
}

.ach-route-point {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-neutral-quiet);
}

.ach-route-point-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-contextual-action);
  color: white;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.ach-route-point:hover .ach-route-point-number {
  background: var(--color-contextual-action-hover);
}

.ach-route-point-content {
  flex: 1;
  min-width: 0;
}

.ach-route-point-content span {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-body-loud);
}

.ach-route-point-desc {
  color: var(--color-body);
  font-size: 0.875rem;
  line-height: 1.4;
}

.ach-route-point:hover .ach-route-point-desc {
  color: var(--color-contextual-on-solid);
}

/* Mobile styles for route map */
@media (max-width: 700px) {
  #ach-route-map-wrapper.mobile-layout {
    flex-direction: column;
  }

  #ach-route-map-sidebar {
    width: 100%;
    order: 1;
    max-height: 300px;
    border-radius: 8px 8px 0 0;
  }

  #ach-route-map-canvas {
    order: 2;
    min-height: 400px;
    border-radius: 0 0 8px 8px;
  }

  .ach-route-header {
    padding: 16px;
  }

  .ach-route-header h3 {
    font-size: 1.2rem;
  }

  .ach-route-points {
    padding: 16px;
  }

  .ach-route-points h4 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .ach-route-point {
    padding: 10px;
    gap: 10px;
  }

  .ach-route-point-number {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .ach-route-point-content h5 {
    font-size: 0.9rem;
  }

  .ach-route-point-desc {
    font-size: 0.8rem;
  }
}
