/* ==============================================================================
 * FILE: spot-card.css
 * CATEGORY: MarlonWalksLA Website - Polaroid Spot Card & Mapbox Popup Styling
 * ============================================================================== */

/* =========================================================
   1. MAPBOX POPUP CONTAINERS & HIDE DEFAULT CLOSE "X"
   ========================================================= */
.mapboxgl-popup {
  z-index: 1050 !important;
}

.mapboxgl-popup-content {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 270px;
}

/* Hide default Mapbox close button to remove the black corner slice */
.mapboxgl-popup-close-button {
  display: none !important;
}

/* =========================================================
   2. POLAROID CAPTION CARD CONTAINER
   ========================================================= */
.polaroid-caption-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  animation: fadeInCaption 0.2s ease-out forwards;
}

@keyframes fadeInCaption {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   3. CARD HEADER (BACK BUTTON LEFT / CATEGORY BADGE RIGHT)
   ========================================================= */
.polaroid-caption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.back-to-filters-btn {
  background: #1a202c;
  border: 1px solid #1a202c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-filters-btn:hover {
  background-color: #3898ec;
  border-color: #3898ec;
}

.polaroid-cat-badge {
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* =========================================================
   4. MEDIA & BODY CONTENT
   ========================================================= */
.polaroid-spot-img-wrap {
  width: 100%;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-bottom: 2px;
}

.polaroid-spot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-caption-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.polaroid-caption-title {
  font-size: 15px;
  font-weight: 800;
  color: #1a202c;
  margin: 0;
  line-height: 1.2;
}

.polaroid-caption-meta {
  font-size: 10px;
  font-weight: 700;
  color: #718096;
}

.polaroid-caption-desc {
  font-size: 11px;
  color: #4a5568;
  line-height: 1.35;
  margin: 2px 0 0 0;
}

.polaroid-marlon-note {
  background-color: #fffbe3;
  border-left: 3px solid #f59e0b;
  color: #78350f;
  font-size: 10px;
  line-height: 1.3;
  padding: 5px 7px;
  margin: 3px 0;
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

/* Permanent Tag Removal */
.polaroid-tags,
.polaroid-caption-tags,
.polaroid-tags-row {
  display: none !important;
}

/* =========================================================
   5. ACTION STRIP & BOOK TOUR CTA
   ========================================================= */
.polaroid-card-action-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
}

.card-pill-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #4a5568;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.card-pill-btn:hover {
  border-color: #3898ec;
  color: #3898ec;
}

.card-pill-btn.toggle-save-btn.is-active {
  background-color: #3898ec !important;
  color: #ffffff !important;
  border-color: #3898ec !important;
}

.card-pill-btn.toggle-visited-btn.is-active {
  background-color: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

.polaroid-caption-footer {
  margin-top: 2px;
  width: 100%;
}

.polaroid-directions-btn.book-tour-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none !important;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 12px;
  background-color: #2563eb;
  color: #ffffff !important;
  text-align: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.polaroid-directions-btn.book-tour-cta:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

/* =========================================================
   6. MOBILE COMPACT OVERRIDES
   ========================================================= */
@media (max-width: 820px) {
  .mapboxgl-popup {
    max-width: 85vw !important;
  }

  .mapboxgl-popup-content {
    width: 78vw !important;
    max-width: 260px !important;
    max-height: 28dvh !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 10px !important;
  }

  .polaroid-caption-card {
    padding: 8px !important;
    gap: 4px !important;
    max-height: 28dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .polaroid-spot-img-wrap {
    height: 75px !important;
    margin-bottom: 2px !important;
  }

  .polaroid-caption-title {
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  .polaroid-caption-desc {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }
}

/* =========================================================
   PRESET ROUTES IMPORT & TOGGLES (Moved from map-filters.css)
   ========================================================= */
.preset-import-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.preset-title { font-size: 11px; font-weight: 800; color: #475569; }
.preset-list { display: flex; flex-direction: column; gap: 6px; }

.preset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
}

.preset-item-name { font-size: 12px; font-weight: 800; color: #1e293b; }
.preset-item-meta { font-size: 10px; color: #64748b; }

.import-preset-btn {
  background: #3898ec;
  border: none;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.import-preset-btn:hover { background: #2b7bc4; }

.clear-itinerary-btn {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-itinerary-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}
