/*
 * Mobile-only styles for the hikes map.
 * Everything here is scoped under the .nb-mobile class, which is added to
 * <html> only when js/naturebreak-map-mobile.js decides the screen is a
 * phone (see the matchMedia check there). Because of that scoping, this
 * file can be freely edited without any risk of affecting the desktop
 * layout in map-style.css.
 */

/* ===== Full-screen shell: map fills the page, list is an overlay ===== */
.nb-mobile .map-page-container {
  display: block;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.nb-mobile .main-map {
  width: 100%;
  height: 100%;
  border: none;
}

/* The existing #hike-list / .hike-list-pane element from the desktop markup
   is not used on mobile (see naturebreak-map-mobile.js) — hide it outright
   so it can't interfere. */
.nb-mobile .hike-list-pane {
  display: none;
}

/* ===== Floating pill buttons ===== */
.nb-m-fab {
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 24px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.nb-m-filter-btn {
  top: 14px;
  left: 14px;
  background: #fff;
  color: #222;
}
.nb-m-filter-btn .nb-m-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d85a30;
  display: none;
}
.nb-m-filter-btn.has-active .nb-m-dot {
  display: inline-block;
}

.nb-m-toggle-btn {
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
}

/* ===== Bottom sheet (filters) ===== */
.nb-m-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nb-m-sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nb-m-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 10px 18px 18px;
  max-height: 82vh;
  overflow-y: auto;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}
.nb-m-sheet.open {
  transform: translateY(0);
}

.nb-m-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  margin: 0 auto 14px;
}

.nb-m-sheet-title {
  font-size: 1.05em;
  font-weight: bold;
  color: #137227;
  margin: 0 0 14px;
}

.nb-m-field {
  margin-bottom: 18px;
}

.nb-m-label {
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  display: block;
  margin-bottom: 6px;
}

.nb-m-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ccc;
  border-radius: 22px;
  padding: 9px 14px;
  background: #fafafa;
}
.nb-m-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.95em;
}
.nb-m-search-icon { color: #999; flex: none; }

.nb-m-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nb-m-toggle {
  border: 1px solid #ccc;
  background: #fff;
  color: #444;
  border-radius: 16px;
  padding: 7px 14px;
  font-size: 0.9em;
}
.nb-m-toggle.active {
  background: #137227;
  border-color: #137227;
  color: #fff;
}

/* Dual-range slider — same visual language as the desktop version but its
   own classes, independent from .dual-range in map-style.css. */
.nb-m-range {
  position: relative;
  height: 40px;
  margin-top: 16px;
}
.nb-m-range-track,
.nb-m-range-fill {
  position: absolute;
  top: 26px;
  height: 5px;
  border-radius: 3px;
}
.nb-m-range-track {
  left: 0;
  right: 0;
  background: #e2e2e2;
}
.nb-m-range-fill {
  background: #2fa8a0;
}
.nb-m-range input[type="range"] {
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.nb-m-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #bbb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.nb-m-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #bbb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.nb-m-range input[type="range"]::-moz-range-track { background: none; }

.nb-m-bubble {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.75em;
  color: #333;
  white-space: nowrap;
  pointer-events: none;
}

.nb-m-sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
}
.nb-m-sheet-actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 22px;
  font-size: 0.95em;
  font-weight: 600;
  border: 1px solid #ccc;
  background: #fff;
}
.m-reset {
  border-color: #c0392b !important;
  color: #c0392b;
}
.m-reset svg { flex: none; }
.nb-m-apply {
  background: #137227 !important;
  border-color: #137227 !important;
  color: #fff;
}

/* ===== Full-screen hike list ===== */
.nb-m-list {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #f7f7f5;
  overflow-y: auto;
  padding: 14px;
  box-sizing: border-box;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.nb-m-list.open {
  transform: translateX(0);
}

.nb-m-list-count {
  font-size: 0.9em;
  color: #137227;
  font-weight: 600;
  margin: 4px 0 14px;
}

.nb-m-card {
  text-decoration: none;
  color: inherit;
  display: block;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.nb-m-card img {
  width: 100%;
  display: block;
  height: 160px;
  object-fit: cover;
}
.nb-m-card-body {
  padding: 10px 12px;
}
.nb-m-card-title {
  font-size: 1.05em;
  font-weight: bold;
  margin: 0 0 6px;
}
.nb-m-card-info {
  font-size: 0.85em;
  color: #444;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nb-m-card-info .material-symbols-outlined {
  font-size: 1.1em;
  vertical-align: -3px;
  margin-right: 2px;
}
