/* Base */
.pp-body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0b1020, #1d1035 40%, #0c222c 80%);
  color: #f8f9ff;
}

/* Header */
.pp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.pp-logo h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb347;
}

.pp-tagline {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.85;
}

.pp-button,
.pp-button-primary {
  border-radius: 999px;
  border: 1px solid #ff9f1c;
  background: transparent;
  color: #ffeef0;
  padding: 6px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.pp-button-primary {
  border-color: #ff4f84;
  background: radial-gradient(circle at top left, #ff4f84, #ff9f1c);
  color: #fff;
}

.pp-button:hover,
.pp-button-primary:hover {
  box-shadow: 0 0 10px rgba(255, 159, 28, 0.6);
}

/* Search bar */
.pp-search-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  background: rgba(0, 0, 0, 0.25);
}

.pp-search-row {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.pp-input {
  flex: 1;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 10, 20, 0.75);
  color: #f8f9ff;
  font-size: 13px;
}

/* Mobile toggle */
.pp-mobile-toggle {
  display: none;
  padding: 6px 16px;
  gap: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  background: rgba(0, 0, 0, 0.35);
}

.pp-toggle-button {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  cursor: pointer;
}

.pp-toggle-active {
  background: linear-gradient(135deg, #ff9f1c, #ff4f84);
  border-color: transparent;
}

/* Main layout */
.pp-main {
  display: flex;
  height: calc(100vh - 112px); /* header + search + maybe toggle */
}

/* Map & list */
#map {
  flex: 2;
  min-height: 100%;
}

#pin-list {
  flex: 1;
  overflow-y: auto;
  background: rgba(7, 9, 20, 0.95);
  border-left: 1px solid rgba(255,255,255,0.08);
}

/* Pin cards */
.pp-pin-card {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pp-pin-title {
  margin: 0 0 4px;
  font-size: 14px;
}

.pp-pin-meta {
  font-size: 11px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.pp-pin-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}
/* Larger thumbnails on desktop */
@media (min-width: 900px) {
  .pp-pin-thumb {
    width: 72px;
    height: 72px;
  }
}


/* Popup image */
.pp-popup-image {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

/* Bigger popup image on desktop */
@media (min-width: 900px) {
  .pp-popup-image {
    max-height: 230px;
  }
}

/* Media embeds (popup + list) */
.pp-embed-block {
  margin-top: 6px;
  margin-bottom: 6px;
}

.pp-embed-frame-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: #000;
  margin-bottom: 4px;
}

.pp-embed-frame-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Desktop: slightly taller */
@media (min-width: 900px) {
  .pp-embed-frame-wrapper {
    padding-bottom: 60%;
  }
}

.pp-embed-link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  opacity: 0.95;
}

.pp-embed-link-thumb {
  width: 60px;
  height: 34px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}


/* Badges */
.pp-pin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.pp-badge {
  font-size: 10px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 1px 6px;
  border: 1px solid rgba(255,255,255,0.4);
}

.pp-badge-featured {
  border-color: #ff4f84;
  color: #ff9fba;
}

.pp-badge-new {
  border-color: #3ddcff;
  color: #9cf4ff;
}

.pp-badge-ends {
  border-color: #ffd166;
  color: #ffe8a8;
}
.pp-badge-video {
  border-color: #3b82f6;
  color: #bfdbfe;
}
/* Actions */
.pp-pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.pp-link-button {
  font-size: 11px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .pp-main {
    flex-direction: column;
    height: calc(100vh - 150px);
  }

  #map,
  #pin-list {
    flex: none;
    height: 100%;
  }

  #pin-list {
    display: none; /* default to map view on mobile */
  }

  .pp-mobile-toggle {
    display: flex;
  }
}
/* Modal */
.pp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.pp-modal {
  width: 100%;
  max-width: 420px;
  background: #0f1323;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 14px 12px;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.pp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pp-modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.pp-modal-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.pp-modal-body {
  margin-top: 8px;
  font-size: 13px;
}

.pp-modal-note {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.pp-modal-field {
  margin-bottom: 8px;
}

.pp-modal-field label {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
  opacity: 0.9;
}

.pp-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pp-location-label {
  font-size: 12px;
  opacity: 0.9;
}

.pp-modal-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}


/* Generic helper for any modal that uses .pp-modal.hidden */
.pp-modal.hidden {
  display: none;
}

/* SAVE SEARCH MODAL
   Scoped to #pp-save-search-modal so we don't break the add-pin modal
-------------------------------------------------------------- */

#pp-save-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1500; /* above map + clusters */
}

/* Dark overlay behind the panel */
#pp-save-search-modal .pp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

/* The card on top */
#pp-save-search-modal .pp-modal-panel {
  position: relative;
  z-index: 1;
  max-width: 400px;
  margin: 80px auto;
  background: rgba(8, 12, 32, 0.98);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
  padding: 14px 16px 16px;
}

.pp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pp-modal-title {
  font-size: 16px;
  font-weight: 600;
}

.pp-modal-close {
  background: transparent;
  border: none;
  color: #f8f8ff;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}

.pp-modal-body {
  font-size: 13px;
}

.pp-modal-text {
  margin: 0 0 8px;
  opacity: 0.85;
}

.pp-modal-label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  opacity: 0.9;
}

.pp-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}
/* Directions dropdown */
.pp-directions-group {
  position: relative;
  display: inline-block;
}

.pp-directions-button {
  background: #111827;
  color: #f9fafb;
  border-radius: 9999px;
  border: 1px solid #4b5563;
  padding: 4px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pp-directions-button:hover {
  background: #1f2937;
  border-color: #9ca3af;
}

.pp-directions-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1f2937;
  min-width: 160px;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.pp-directions-menu a {
  color: #e5e7eb;
  text-decoration: none;
  display: block;
  padding: 6px 10px;
  font-size: 11px;
}

.pp-directions-menu a:hover {
  background: #111827;
}

.pp-directions-menu.hidden {
  display: none;
}

/* Reuse .pp-button-primary / .pp-button-secondary / .pp-input as you already have them */
