/* ==============================================================================
 * FILE: nav-explore-mytrip.css
 * CATEGORY: MarlonWalksLA - Fully Standardized Responsive Architecture
 * ============================================================================== */

/* ------------------------------------------------------------------------------
 * 1. TOP MODE SWITCHER
 * ------------------------------------------------------------------------------ */
.mode-navigation {
  display: flex;
  gap: 8px;
  background-color: #f0f4f8;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.mode-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #556080;
  background-color: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: center;
}

.mode-btn.is-active {
  background-color: #ffffff;
  color: #2b6cb0;
  border-color: #2b6cb0;
  box-shadow: 0 2px 8px rgba(43, 108, 176, 0.12);
}

/* ------------------------------------------------------------------------------
 * 2. SEARCH BAR & FILTERS
 * ------------------------------------------------------------------------------ */
.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.search-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.search-input-wrap {
  position: relative;
  flex: 1;
}

#search-input {
  width: 100%;
  padding: 7px 28px 7px 10px;
  font-size: 0.82rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  box-sizing: border-box;
}

#search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 0.8rem;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
}

#reset-all-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.dropdown-row select {
  flex: 1;
  min-width: 0;
  padding: 5px 16px 5px 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 6px top 50%;
  background-size: 8px auto;
}

/* ------------------------------------------------------------------------------
 * 3. SUB-NAVIGATION PILLS
 * ------------------------------------------------------------------------------ */
.sub-navigation {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.sub-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
}

.sub-btn.is-active {
  background-color: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

/* ------------------------------------------------------------------------------
 * 4. ITEM COMPONENT BASE STYLES
 * ------------------------------------------------------------------------------ */
.spot-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spot-card-info {
  flex: 1;
  overflow: hidden;
  margin-right: 6px;
}

.spot-card h4 {
  margin: 0 0 2px 0;
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-card p {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
}

.spot-card-actions {
  display: flex;
  gap: 4px;
}

.card-action-btn, .btn-mytrip-action {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 3px 6px;
  cursor: pointer;
  opacity: 0.6;
}

.card-action-btn.is-active, .btn-mytrip-action.is-active {
  opacity: 1;
  background: #dbeafe;
  border-color: #3b82f6;
}

/* ------------------------------------------------------------------------------
 * 5. TOUR CARD STYLES
 * ------------------------------------------------------------------------------ */
.hero-tour {
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tour-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tour-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e40af;
  background-color: #dbeafe;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Hide the 3rd badge on all tour cards automatically */
.tour-badges .tour-badge:nth-child(3) {
  display: none !important;
}

.hero-tour h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.hero-tour p {
  margin: 0;
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.35;
}

.tour-meetup-note {
  font-size: 0.72rem;
  color: #1e293b;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  padding: 4px 8px;
  border-radius: 4px;
}

.tour-btn-group {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.tour-booking-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  display: inline-block;
  box-sizing: border-box;
}

.btn-eng { background-color: #2563eb; color: #ffffff !important; }
.btn-esp { background-color: #059669; color: #ffffff !important; }

/* ------------------------------------------------------------------------------
 * 6. MAP CANVAS CONTAINER STYLING
 * ------------------------------------------------------------------------------ */
#map, .map-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 70vh !important;
}

.mapboxgl-map, .mapboxgl-canvas-container, .mapboxgl-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ------------------------------------------------------------------------------
 * 7. DESKTOP STRETCH LAYOUT (MIN-WIDTH: 821px)
 * ------------------------------------------------------------------------------ */
@media (min-width: 821px) {
  .tab-panel {
    height: 70vh;
    box-sizing: border-box;
  }

  .tab-panel:not([style*="display: none"]) {
    display: flex;
    flex-direction: column;
  }

  #view-places:not([style*="display: none"]),
  #view-days:not([style*="display: none"]) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  #spot-cards-list,
  .trip-grouped-list,
  #view-tours,
  #view-passport,
  #view-logistics {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
  }
}

/* ------------------------------------------------------------------------------
 * 8. STANDARDIZED MOBILE SCROLL OVERRIDES (MAX-WIDTH: 820px)
 * ------------------------------------------------------------------------------ */
@media (max-width: 820px) {
  #map, .map-container {
    min-height: 36vh !important;
  }

  .mode-navigation {
    margin-top: 4px !important;
    margin-bottom: 6px !important;
    padding: 3px !important;
  }

  .mode-btn {
    padding: 6px 8px !important;
    font-size: 0.82rem !important;
  }

  .tab-panel {
    min-height: auto;
    height: auto;
  }

  #spot-cards-list,
  .trip-grouped-list,
  #view-tours,
  #view-passport,
  #view-logistics {
    max-height: 35vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 40px !important;
  }

  /* Compact Mapbox Popup Card for Mobile screens */
  .mapboxgl-popup {
    max-width: 86vw !important;
  }

  .mapboxgl-popup-content {
    padding: 8px 10px !important;
    border-radius: 12px !important;
  }

  .spot-popup-card {
    gap: 4px !important;
    padding: 2px !important;
  }

  .spot-popup-card h3 {
    font-size: 0.82rem !important;
    margin-bottom: 2px !important;
    line-height: 1.15 !important;
  }

  .spot-popup-card p {
    font-size: 0.7rem !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 4px !important;
  }

  .spot-popup-card .action-btn,
  .spot-popup-card .book-tour-btn,
  .spot-popup-card button {
    padding: 4px 6px !important;
    font-size: 0.72rem !important;
  }
}

/* ------------------------------------------------------------------------------
 * 9. MAP PIN HIGHLIGHT RINGS
 * ------------------------------------------------------------------------------ */
.marker-wrapper.is-pinned-ring .custom-emoji-marker {
  box-shadow: 0 0 0 4px #2563eb, 0 2px 10px rgba(37, 99, 235, 0.5) !important;
  border: 2px solid #ffffff !important;
}

.marker-wrapper.is-visited-pin .custom-emoji-marker {
  box-shadow: 0 0 0 4px #10b981, 0 2px 10px rgba(16, 185, 129, 0.5) !important;
  border: 2px solid #ffffff !important;
}
