/* Toilet Map (Australia) - tool-specific styles. Base layout (.tool-header,
   .tool-container, .tool-sidebar, .tool-section, #map) comes from
   global.css - this file only covers what's unique to this tool. */

.suburb-search-wrap {
  position: relative;
}

.suggestion-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: none;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
}

.suggestion-item:hover {
  background: var(--hover-bg);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}

.filter-checkbox input {
  width: auto;
  margin: 0;
}

.origin-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
}

.origin-postcode {
  font-weight: 600;
  color: var(--text);
}

.results-list {
  max-height: 420px;
  overflow-y: auto;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.result-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  margin-bottom: 6px;
}

.result-name {
  font-weight: 600;
  color: var(--text);
}

.result-distance {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.result-facilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.tag.mlak { background: #fff3e0; color: #b45309; }
.tag.changing-places { background: #fce4ec; color: #c2185b; }
.tag.accessible { background: #e3f2fd; color: #1d4ed8; }
.tag.baby { background: #fce4ec; color: #c2185b; }
.tag.open-24 { background: #e8f5e9; color: #2e7d32; }

html[data-theme="dark"] .tag.mlak { background: rgba(180, 83, 9, 0.25); color: #fbbf24; }
html[data-theme="dark"] .tag.changing-places { background: rgba(194, 24, 91, 0.25); color: #f9a8d4; }
html[data-theme="dark"] .tag.accessible { background: rgba(29, 78, 216, 0.25); color: #93c5fd; }
html[data-theme="dark"] .tag.baby { background: rgba(194, 24, 91, 0.25); color: #f9a8d4; }
html[data-theme="dark"] .tag.open-24 { background: rgba(46, 125, 50, 0.25); color: #86efac; }

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
}

.result-actions {
  margin-top: 10px;
}

.btn-directions {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
}

.loading-indicator {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Map markers */
.custom-marker { background: transparent !important; border: none !important; }

.user-marker {
  font-size: 32px;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.toilet-marker {
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--primary);
}

.toilet-marker.mlak { border-color: #b45309; }
.toilet-marker.changing-places { border-color: #c2185b; }

.leaflet-popup-content { margin: 12px; min-width: 190px; }
.popup-title { font-weight: 600; font-size: 1rem; margin-bottom: 6px; color: #1f2937; }
.popup-meta { font-size: 0.85rem; color: #4b5563; margin-bottom: 6px; }
.popup-facilities { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.popup-hours { font-size: 0.8rem; color: #4b5563; margin-bottom: 6px; }
.popup-directions {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 12px;
  background: var(--primary);
  color: white !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hidden { display: none !important; }

@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr; }
}
