/* ============================================
   Hawaii Interactive Map - Full Width
   Attractions, Hotels & Tours
   ============================================ */

/* Map wrapper fills viewport below header */
#attractions-map-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  min-height: 500px;
  overflow: hidden;
}

#attractions-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Fix Leaflet z-index conflicts with site header */
.leaflet-pane { z-index: 1; }
.leaflet-top, .leaflet-bottom { z-index: 10; }

/* ---- Layer Toggle Bar ---- */
#layer-toggles {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 5px 8px;
  border-radius: 50px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.layer-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 50px;
  background: #f0f0f0;
  color: #666;
  font-family: 'Proxima', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  line-height: 1;
}

.layer-btn:hover {
  background: #e0e0e0;
}

.layer-btn.active {
  background: #fff;
  color: #1C4D8E;
  border-color: #1C4D8E;
  box-shadow: 0 1px 6px rgba(28,77,142,0.2);
}

.layer-btn[data-layer="hotels"].active {
  border-color: #6C5CE7;
  color: #6C5CE7;
  box-shadow: 0 1px 6px rgba(108,92,231,0.25);
}

.layer-btn[data-layer="tours"].active {
  border-color: #e17055;
  color: #e17055;
  box-shadow: 0 1px 6px rgba(225,112,85,0.25);
}

.layer-icon {
  font-size: 14px;
  line-height: 1;
}

/* ---- Island Filter Buttons ---- */
#island-filters {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 50px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 95vw;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#island-filters::-webkit-scrollbar { display: none; }

.island-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 50px;
  background: #f0f0f0;
  color: #444;
  font-family: 'Proxima', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  line-height: 1;
}

.island-btn:hover {
  background: #e0e0e0;
}

.island-btn.active {
  background: #fff;
  border-color: #1C4D8E;
  color: #1C4D8E;
  box-shadow: 0 1px 6px rgba(28,77,142,0.2);
}

.btn-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Category Legend ---- */
#category-legend {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  z-index: 20;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #555;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 6px 14px;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}

.legend-item.active {
  border-color: #1C4D8E;
  background: rgba(28,77,142,0.08);
}

.legend-item:not(.active) {
  opacity: 0.4;
}

.legend-item:hover {
  background: rgba(28,77,142,0.12);
}

.legend-icon {
  font-size: 15px;
}

.legend-divider {
  width: 1px;
  height: 24px;
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
  align-self: center;
}

#map-top-toggle.active {
  border-color: #d4a017;
  background: rgba(212,160,23,0.1);
}

#map-top-toggle:not(.active) {
  opacity: 1;
  border-color: transparent;
  background: none;
}

/* ---- Map Toolbar (Views, Saved, Share) ---- */
#map-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 21;
}

#map-toolbar-items {
  display: flex;
  gap: 6px;
  align-items: center;
}

#map-toolbar-items > button,
#map-toolbar-items > div > button:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  font-family: 'Proxima', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1C4D8E;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

#map-toolbar-items > button:hover,
#map-toolbar-items > div > button:first-child:hover {
  background: #fff;
  box-shadow: 0 3px 16px rgba(0,0,0,0.18);
}

/* Mobile overflow toggle — hidden on desktop */
#map-toolbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  font-size: 16px;
  color: #1C4D8E;
  transition: background 0.2s;
}

#map-toolbar-toggle:hover {
  background: #fff;
}

/* Mobile overflow dropdown — hidden by default */
#map-toolbar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
  flex-direction: column;
  z-index: 30;
}

#map-toolbar-dropdown.open {
  display: flex;
}

.toolbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-family: 'Proxima', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.toolbar-dropdown-item:last-child {
  border-bottom: none;
}

.toolbar-dropdown-item:hover {
  background: #f5f8fc;
  color: #1C4D8E;
  text-decoration: none;
}

.toolbar-dropdown-item i {
  width: 18px;
  text-align: center;
  color: #1C4D8E;
}

/* Share Button specifics */
#map-share-btn.toast-active {
  background: #27ae60;
  color: #fff;
}

.share-icon {
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* ---- Printable Maps Link ---- */
#map-printable-link {
  position: absolute;
  bottom: 96px;
  left: 12px;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  font-family: 'Proxima', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1C4D8E;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

#map-printable-link:hover {
  background: #fff;
  box-shadow: 0 3px 16px rgba(0,0,0,0.18);
  color: #1C4D8E;
  text-decoration: none;
}

.printable-icon {
  font-size: 14px;
  line-height: 1;
}

/* ---- Saved / My Trip Button ---- */

#map-saved-btn.active {
  background: #2e86de;
  color: #fff;
  box-shadow: 0 3px 16px rgba(46,134,222,0.4);
}

#map-saved-btn.active:hover {
  background: #1a6fbe;
}

.saved-icon {
  font-size: 13px;
  line-height: 1;
}

.saved-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  text-align: center;
  line-height: 22px;
  margin-left: 2px;
}

#map-saved-btn.active .saved-badge {
  background: rgba(255,255,255,0.3);
}

/* ---- Map Views (Snapshots) ---- */
#map-views-container {
  position: relative;
}

.views-icon {
  font-size: 13px;
  line-height: 1;
}

.views-badge {
  display: inline-block;
  background: #2e86de;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  text-align: center;
  line-height: 22px;
  margin-left: 2px;
}

/* Views Dropdown */
#views-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
  flex-direction: column;
}

#views-dropdown.open {
  display: flex;
}

.views-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #eee;
}

.views-dropdown-title {
  font-family: 'Proxima', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.views-save-action {
  border: none;
  background: #2e86de;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Proxima', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.views-save-action:hover {
  background: #1a6fbe;
}

#views-list {
  overflow-y: auto;
  flex: 1;
  max-height: 330px;
}

.views-empty {
  padding: 24px 20px;
  text-align: center;
  color: #999;
  font-size: 12px;
  line-height: 1.5;
}

.views-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.views-item:last-child {
  border-bottom: none;
}

.views-item:hover {
  background: #f5f8fc;
}

.views-item-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.views-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.views-item-label {
  font-size: 11px;
  color: #888;
}

.views-item-delete {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #ccc;
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.views-item-delete:hover {
  background: #fee;
  color: #e74c3c;
}

/* ---- Panel Actions ---- */
.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border: 2px solid #1C4D8E;
  border-radius: 50px;
  background: transparent;
  color: #1C4D8E;
  font-family: 'Proxima', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.panel-save:hover {
  background: rgba(28,77,142,0.08);
}

.panel-save .save-icon {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.panel-save.is-saved {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

.panel-save.is-saved:hover {
  background: #c0392b;
  border-color: #c0392b;
}

/* ---- Custom Map Markers ---- */
.marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -18px 0 0 -18px;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.marker-pin:hover {
  transform: rotate(-45deg) scale(1.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

.marker-pin .marker-icon {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  font-size: 20px;
  color: #fff;
  line-height: 1;
}

.marker-pin.marker-active {
  transform: rotate(-45deg) scale(1.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  z-index: 1000 !important;
}

/* Hotel marker — square with rounded corners */
.marker-hotel {
  border-radius: 8px 8px 8px 0;
}

/* Tour marker — circle */
.marker-tour {
  border-radius: 50%;
}

/* ---- Detail Panel ---- */
#attraction-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 45vh;
  overflow: hidden;
}

#attraction-panel.panel-visible {
  transform: translateY(0);
}

#attraction-panel.panel-hidden {
  transform: translateY(100%);
}

#panel-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 30;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}

#panel-close:hover {
  background: rgba(0,0,0,0.7);
}

#panel-content {
  display: flex;
  flex-direction: row;
  height: 100%;
}

#panel-image-wrap {
  width: 40%;
  min-width: 200px;
  max-width: 360px;
  flex-shrink: 0;
  overflow: hidden;
}

#panel-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
}

#panel-info {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#panel-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: #1C4D8E;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  align-self: flex-start;
}

#panel-name {
  font-family: 'brother-1816-printed', 'Proxima', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #222;
  margin: 0 0 6px;
  line-height: 1.2;
}

.panel-meta {
  font-size: 13px;
  color: #888;
  margin: 0 0 8px;
  line-height: 1.4;
}

#panel-description {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 14px;
}

.panel-cta {
  display: inline-block;
  padding: 10px 22px;
  background: #1C4D8E;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
  align-self: flex-start;
}

.panel-cta:hover {
  background: #0E3B7E;
}

/* ---- Sidebar List ---- */
#attraction-list {
  position: absolute;
  top: 175px;
  right: 12px;
  z-index: 20;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  width: 400px;
  max-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

#attraction-list.list-collapsed {
  width: auto;
}

#attraction-list.list-collapsed #list-content {
  display: none;
}

#list-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Proxima', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1C4D8E;
  width: 100%;
  text-align: left;
}

#list-toggle:hover {
  background: rgba(28,77,142,0.05);
}

#list-toggle-icon {
  font-size: 15px;
}

#list-content {
  overflow-y: auto;
  flex: 1;
}

#list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
  border-bottom: 1px solid #eee;
}

#list-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

#list-count {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
}

#list-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

#list-items li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

#list-items li:hover {
  background: #f5f8fc;
}

#list-items li.list-item-active {
  background: #e8f0fe;
}

.list-item-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.list-item-info {
  flex: 1;
  min-width: 0;
}

.list-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.list-item-island {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.list-item-category {
  font-size: 12px;
  color: #777;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.list-item-hotel {
  background: #f0eaff;
  color: #6C5CE7;
}

.list-item-tour {
  background: #fde8e4;
  color: #e17055;
}

/* ---- Map Controls Customization ---- */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  width: 46px !important;
  height: 46px !important;
  line-height: 46px !important;
  font-size: 26px !important;
  color: #333 !important;
  background: rgba(255,255,255,0.95) !important;
  border-bottom: 1px solid #eee !important;
}

.leaflet-control-zoom a:hover {
  background: #f0f0f0 !important;
}

/* Custom Reset Button */
.map-reset-btn {
  background: rgba(255,255,255,0.95);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1C4D8E;
  font-family: 'Proxima', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.map-reset-btn:hover {
  background: #f0f0f0;
}

/* ---- Map Search (desktop only, bottom-left next to Printable Maps) ---- */
#map-search {
  position: absolute;
  bottom: 96px;
  left: 170px;
  z-index: 22;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  padding: 0 16px;
  height: 46px;
  width: 300px;
  transition: border-radius 0.2s, box-shadow 0.2s;
}

#map-search.has-results {
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.map-search-icon {
  font-size: 12px;
  color: #888;
  margin-right: 8px;
  flex-shrink: 0;
}

#map-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: #333;
  width: 100%;
  padding: 8px 0;
  font-family: inherit;
}

#map-search-input::placeholder {
  color: #aaa;
  font-size: 12px;
}

#map-search-clear {
  border: none;
  background: #ddd;
  color: #666;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

#map-search-clear:hover {
  background: #ccc;
  color: #333;
}

#map-search-results {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#map-search-results.visible {
  display: block;
}

#map-search-results li {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #333;
  transition: background 0.15s;
}

#map-search-results li:hover,
#map-search-results li.highlighted {
  background: #f0f4ff;
}

#map-search-results li .search-result-icon {
  font-size: 13px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

#map-search-results li .search-result-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#map-search-results li .search-result-meta {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
}

#map-search-results .search-no-results {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 12px;
  cursor: default;
}

/* ---- Responsive ---- */

/* Tablet: left-align filter bars, hide search */
@media (max-width: 1024px) {
  #layer-toggles {
    left: 12px;
    transform: none;
  }

  #island-filters {
    left: 12px;
    transform: none;
  }

  #map-search {
    display: none;
  }

  .leaflet-top.leaflet-left {
    top: 120px !important;
  }
}

/* Tablet/small screens: compact everything */
@media (max-width: 768px) {
  #attractions-map-wrapper {
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
  }

  /* Toolbar: hide text labels, icon-only */
  .toolbar-label {
    display: none;
  }

  #map-toolbar-items > button,
  #map-toolbar-items > div > button:first-child {
    padding: 10px;
    font-size: 12px;
  }

  #views-dropdown {
    width: 320px;
  }

  #layer-toggles {
    top: 12px;
    padding: 4px 6px;
    gap: 4px;
  }

  .layer-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  #island-filters {
    top: 60px;
    padding: 5px 8px;
    gap: 4px;
  }

  .island-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .leaflet-top.leaflet-left {
    top: 112px !important;
  }

  #attraction-list {
    display: none;
  }

  #panel-content {
    flex-direction: column;
  }

  #panel-image-wrap {
    width: 100%;
    max-width: none;
    height: 160px;
  }

  #panel-info {
    padding: 14px 18px;
  }

  #panel-name {
    font-size: 18px;
  }

  #map-printable-link {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  #category-legend {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    font-size: 12px;
    gap: 8px;
    padding: 8px 12px;
  }

  #category-legend .legend-item {
    padding: 4px 10px;
  }

  #attraction-panel {
    max-height: 55vh;
  }
}

/* Mobile: collapse toolbar to overflow menu, icon-only layer toggles */
@media (max-width: 480px) {
  /* Hide the individual toolbar buttons, show the overflow toggle */
  #map-toolbar-items {
    display: none;
  }

  #map-toolbar-toggle {
    display: flex;
  }

  #layer-toggles {
    top: 8px;
    gap: 3px;
  }

  .layer-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 3px;
  }

  .layer-label {
    display: none;
  }

  #island-filters {
    top: 56px;
  }

  .island-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .leaflet-top.leaflet-left {
    top: 102px !important;
  }

  #attractions-map-wrapper {
    height: calc(100dvh - 50px);
  }

  /* Hide desktop printable maps link — it's in the overflow menu */
  #map-printable-link {
    display: none;
  }

  .printable-label {
    display: none;
  }

  /* Category legend: horizontal scroll, compact */
  #category-legend {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 6px;
    right: 6px;
    font-size: 11px;
    gap: 5px;
    padding: 6px 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  #category-legend::-webkit-scrollbar {
    display: none;
  }

  #category-legend .legend-item {
    padding: 4px 8px;
    border-width: 1.5px;
  }

  /* Views dropdown: full width on mobile */
  #views-dropdown {
    right: 0;
    width: calc(100vw - 24px);
    max-width: 320px;
  }
}

/* ---- Tile layer styling ---- */
.leaflet-tile-pane {
  filter: saturate(0.85) brightness(1.02);
}

/* Hide scroll-down arrow on map page */
.attractions-map-page .scroll-indicator {
  display: none !important;
}

/* Better header over blue ocean */
.attractions-map-page .goUS-header:not(.is-sticky) {
  background: #1C4D8E;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 0;
}

.attractions-map-page .goUS-header:not(.is-sticky) .logo img {
  content: url('https://cdn.hawaiiguide.io/files/images/branding/logo-hawaii-guide-white-v3.png');
  max-height: 55px;
  width: auto;
}

.attractions-map-page .goUS-header:not(.is-sticky) .nav-inline-block span {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.attractions-map-page .goUS-header:not(.is-sticky) .nav-inline-block:hover span {
  color: #e0e0e0 !important;
  border-bottom-color: rgba(255,255,255,0.5) !important;
}

.attractions-map-page .goUS-header:not(.is-sticky) .search-icon span,
.attractions-map-page .goUS-header:not(.is-sticky) .menu-icon span {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Fix for site header overlap */
.attractions-map-page .cd-main-content > section.content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

.attractions-map-page section.content {
  padding: 0 !important;
  margin: 0 !important;
}

.attractions-map-page .main-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide footer, social bar, and everything below the map — full-bleed map page */
.attractions-map-page .social-bar,
.attractions-map-page footer,
.attractions-map-page .footer,
.attractions-map-page .site-footer,
.attractions-map-page .goUS-footer {
  display: none !important;
}

/* Tooltip styling */
.attraction-tooltip {
  font-family: 'Proxima', -apple-system, sans-serif;
}

.attraction-tooltip .popup-name {
  font-weight: 700;
  font-size: 16px;
  color: #222;
  margin: 0 0 3px;
}

.attraction-tooltip .popup-category {
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
  padding: 0 !important;
  font-size: 16px !important;
}

.leaflet-popup-content {
  margin: 14px 18px !important;
  line-height: 1.4 !important;
  font-size: 15px !important;
}

/* Override Leaflet default rem-based sizes — site html{font-size:62.5%} shrinks rem values */
.leaflet-control-zoom a {
  font-size: 22px !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
}

.leaflet-control-attribution {
  font-size: 12px !important;
}

.leaflet-popup-close-button {
  font-size: 22px !important;
  width: 28px !important;
  height: 28px !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
}

/* Loading state */
#attractions-map-wrapper.loading::after {
  content: 'Loading map...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Proxima', sans-serif;
  font-size: 13px;
  color: #888;
  z-index: 5;
}
