body {
  margin: 0;
  min-height: 100%;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #000e33;
  color: #ffffff;
  overflow-x: hidden;
}

/* ───── NAVBAR ───── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  height: 80px;
  padding-bottom: 20px !important;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(0, 14, 51, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
  grid-column: 2;
}

.nav-logo {
  width: 225px;
  height: auto;
  grid-column: 1;
  justify-self: start;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  grid-column: 3;
  justify-self: end;
}

.nav-item {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  position: relative;
}

.nav-item i {
  font-size: 0.65rem;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0066ff, #c27aff);
  opacity: 0;
  transform: translateY(4px);
  transition: 0.2s ease;
}

.nav-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #ffffff;
}

.create-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.menu-toggle {
  display: none;
}

.hamburger {
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: none;
}
a {
  text-decoration: none;
  color: white;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(0, 14, 51, 0.96);
  padding: 20px 24px;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-sizing: border-box;
}

.menu-toggle:checked ~ .mobile-menu {
  display: flex;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #000e33;
  border-radius: 12px;
  padding: 10px 0;
  min-width: 200px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1100;
}

.nav-item:hover .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown a:hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
}

@media (max-width: 1100px) {
  .navbar {
    padding: 0 32px;
  }
}

@media (max-width: 900px) {
  .navbar {
    padding: 0 20px;
  }
  .nav-logo {
    width: 180px;
  }
  .nav-left {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
  }
  .nav-logo {
    width: 170px;
  }
  .nav-left {
    display: none;
  }
  .guest-nav-left,
  body:not(.authenticated) .guest-nav-left {
    display: none !important;
  }
  .guest-nav-actions,
  body:not(.authenticated) .guest-nav-actions {
    display: none !important;
  }
  .nav-right {
    gap: 10px;
  }
  .nav-right .create-btn {
    display: none;
  }
  .hamburger {
    display: block;
  }
}

a {
  text-decoration: none;
}

.avatar:hover,
.create-btn:hover,
.header-btn.primary:hover,
.notification-bell:hover,
.rec-create-btn:hover,
.explore-btn:hover,
.circles-create-btn:hover,
.attach-link-small:hover,
.rec-detail-save-btn:hover,
.rec-detail-action-btn.primary:hover,
.panel-toggle:hover,
.rec-detail-save-header-btn:hover  {
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6), 0 0 6px rgba(0, 102, 255, 0.6);
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

/* ───── NOTIFICATIONS ───── */

.notification-container {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 2000001 !important;
}

.notification-bell {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  display: none;
  box-shadow: 0 0 0 2px #000e33;
}

.notification-modal {
  position: absolute;
  top: 52px;
  right: 0;
  width: 320px;
  max-height: 420px;
  background: rgba(2, 8, 32, 0.98);
  border-radius: 16px;
  padding: 12px 0;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 45px rgba(0,0,0,0.5);
  overflow-y: auto;
  z-index: 2000001 !important;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.notification-header h4 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.notif-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  z-index: 2000001 !important;
}

.notification-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 2000001 !important;
}

.notification-entry.unread {
  background: rgba(0, 102, 255, 0.08);
}

.notification-empty {
  padding: 12px 16px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.notification-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.notification-avatar.monogram {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  padding: 2px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-avatar.monogram::after {
  content: attr(data-initials);
  background: #000e33;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-monogram {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #000e33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
}

.notification-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.notif-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.notif-name {
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.notif-name:hover {
  text-decoration: underline;
}

.trip-link {
  color: #c27aff;
  text-decoration: none;
}

.trip-link:hover {
  text-decoration: underline;
}

.comment-timestamp {
  font-size: 0.75rem;
  opacity: 0.65;
}

.invite-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.invite-actions button {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.invite-actions button:first-child {
  background: #4b5bd5;
  color: #ffffff;
}

.invite-actions button:last-child {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.35);
}

.invite-status {
  margin-top: 4px;
  font-size: 0.78rem;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .notification-modal {
    right: 50%;
    transform: translateX(50%);
    width: min(360px, calc(100vw - 32px));
    z-index: 2000001 !important;
  }
}

.gradient-avatar {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ───── FOOTER ───── */

.rr-footer {
  background: #000e33;
  color: #ffffff;
  padding: 30px 0 0px;
  display: none !important; /* full-screen map layout — no footer */
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-brand img {
  width: auto;
  height: 70%;
}

.footer-columns {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-col h4 {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #cbd5e1;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-divider {
  margin: 40px 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.footer-badges img {
  width: 130px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal {
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: 500px;
}

.footer-links a {
  color: #cbd5e1;
  margin-left: 16px;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-socials a {
  margin-left: 12px;
  font-size: 1.2rem;
  color: #ffffff;
}

.footer-socials a:hover {
  opacity: 0.8;
}

.footer-logo-wrapper {
  text-align: left;
}

.footer-logo {
  height: 150px;
  width: auto;
}

/* ═══════════════════════════════════════════════════════════
   COLLECTION BUILDER - FLEXBOX LAYOUT
   ═══════════════════════════════════════════════════════════ */

.builder-container{
  display: flex;
  flex-direction: column;
  height: calc(100vh - 100px); /* 80px navbar + 20px padding */
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

/* ───────────────────────────────────────────────────────────
   PANELS
   ─────────────────────────────────────────────────────────── */

.builder-panel {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 100;
}

/* Header lives inside panel-left, scrolls with content */
.panel-left .builder-top-header {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  position: relative;
  background: #ffffff;
  padding: 16px 14px 12px;
}

/* Override global title styles that are too large for the panel */
.panel-left .builder-title-input {
  width: 100% !important;
  font-size: 22px !important;
}

.panel-left .builder-title-wrap {
  max-width: 100%;
}

.panel-left .builder-top-header .builder-top-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

/* Actions sit below the title block, right-aligned row */
.panel-left .builder-top-header .builder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* Both action buttons same height/padding/font */
.panel-left .builder-top-header .header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  height: 34px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Stat pills scaled down to match */
.panel-left .builder-top-header .collection-stat-pill {
  padding: 5px 10px;
  font-size: 0.78rem;
  height: 28px;
  box-sizing: border-box;
}

/* Meta row sits comfortably inside the narrow panel */
.panel-left .builder-top-header .collection-meta-row {
  flex-wrap: wrap;
  max-width: 100%;
  margin-top: 8px;
}

/* Panels wrapper — map fills it; side panel floats over it */
.builder-panels{
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}


.builder-panel:last-child {
  border-right: none;
}
.map-view {
  width: 100%;
  height: 100%;
  background: #1a2332;
  border-radius: 12px;
  overflow: hidden;
}



/* Left panel floats over the map */
.panel-left {
  left: 0;
  width: 640px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, width 0.3s ease;
}

/* Map occupies the space to the right of the left panel */
.panel-center {
  position: absolute;
  left: 640px; /* matches .panel-left width */
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  background: #1a2332;
  transition: left 0.3s ease;
  display: block !important; /* override .builder-panel{display:flex} so height:100% on #map resolves cleanly */
}

/* Expand map to full width when left panel is collapsed */
.panel-left.collapsed ~ .panel-center {
  left: 48px;
}

/* Map fills the entire panel-center */
#map {
  width: 100%;
  height: 100% !important;
  min-height: 300px;
}
/* Full Map toggle button — floats over the map */
.panel-center .map-view-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

/* Section color legend — floats over the map, top-left */
.map-section-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  background: rgba(0, 14, 51, 0.88);
  border: 1px solid rgba(194, 122, 255, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  backdrop-filter: blur(8px);
  max-width: 210px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.map-legend-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  margin-bottom: 8px;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}

.map-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.map-legend-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}


/* Collapsed State - show narrow strip with visible expand button */
.builder-panel.collapsed {
  flex: 0 0 48px !important;
  min-width: 48px;
  max-width: 48px;
}

.builder-panel.collapsed .panel-header {
  padding: 20px 6px;
  justify-content: center;
  border-bottom: none;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}

.builder-panel.collapsed .panel-header h2 {
  display: none;
}

.builder-panel.collapsed .panel-toggle {
  display: none;
}

.builder-panel.collapsed .panel-content {
  display: none;
}

/* Hide header info in collapsed state so only the expand arrow shows */
.panel-left.collapsed .builder-top-header {
  display: none;
}

/* Explicit width so the CSS transition animates smoothly on collapse */
.panel-left.collapsed {
  width: 48px;
}

/* Panel Header */
.panel-header {
  padding: 20px 24px;
  border-bottom: 2px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #ffffff;
  z-index: 10;
}

/* Sticky view-toggle bar — sticks at the top as the left panel scrolls */
.panel-left .panel-header {
  position: sticky;
  top: 0;
  z-index: 15;
}

.panel-center .panel-header {
  padding: 16px 24px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* Left panel scrolls as one unit — content takes natural height, panel-left scrolls */
.panel-left .panel-content {
  flex: none;
  overflow-y: visible;
}

.panel-center .panel-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: auto;
}

/* ───────────────────────────────────────────────────────────
   CENTER PANEL: MAP & SEARCH
   ─────────────────────────────────────────────────────────── */

.panel-center .panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

/* When collapsed, hide the search bar */
.panel-center.collapsed .search-bar {
  display: none;
}


.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.2s ease;
  max-width: 500px; /* 👈 ADD MAX WIDTH */
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(194, 122, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(194, 122, 255, 0.15);
}

.search-bar i {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  flex-shrink: 0; /* 👈 PREVENT ICON FROM SHRINKING */
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: white;
  font-size: 0.95rem;
  min-width: 0; /* 👈 ALLOW INPUT TO SHRINK */
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}


.map-view{
  flex: 1;
  min-height: 260px;      /* safety so it never collapses */
  height: auto;           /* don’t rely on 100% */
}
.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
}
.map-placeholder i {
  font-size: 4rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.map-placeholder p {
  font-size: 1.1rem;
  opacity: 0.7;
}

/* ───────────────────────────────────────────────────────────
   ITINERARY SECTION (LEFT PANEL)
   ─────────────────────────────────────────────────────────── */

.add-section-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(194, 122, 255, 0.3);
}

.add-section-btn:hover {
  box-shadow: 0 6px 16px rgba(194, 122, 255, 0.4);
}

#sectionsContainer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}




.section-collapse {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.section-title-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  outline: none;
  padding: 4px 8px;
  border-radius: 4px;
}

.section-title-input:focus {
  background: #f3f4f6;
}

.section-title-input::placeholder {
  color: #9ca3af;
}

.section-menu {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.section-menu:hover {
  background: #fee2e2;
  color: #dc2626;
}

.section-content.collapsed {
  display: none;
}

.section-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.add-subsection-btn,
.add-note-btn {
  flex: 1;
  padding: 10px;
  background: #ffffff;
  border: 1.5px dashed #d1d5db;
  border-radius: 8px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.add-subsection-btn:hover,
.add-note-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.subsection {
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
}

.subsection-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsection-title-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  outline: none;
  padding: 4px 6px;
  border-radius: 4px;
}

.subsection-title-input:focus {
  background: #f3f4f6;
}

.subsection-title-input::placeholder {
  color: #9ca3af;
}

.subsection-delete {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.subsection-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.note {
  background: rgba(0, 102, 255, 0.04);
  border-radius: 8px;
  border: #000e33;
  padding: 10px 12px;
  position: relative;
}

.note-content {
  width: 100%;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: #000e33;
  line-height: 1.5;
  outline: none;
  resize: none;
  min-height: 40px;
  font-family: inherit;
  overflow: hidden;
}

.note-content::placeholder {
  color: #374151;
  opacity: 0.6;
}

.note-content:focus {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.note-delete {
  position: absolute;
  top: 8px;
  right: 8px;
    color: #9ca3af;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0;
}

.note:hover .note-delete {
  opacity: 1;
}

.note-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ───────────────────────────────────────────────────────────
   RIGHT PANEL: SAVED RECS
   ─────────────────────────────────────────────────────────── */

.rec-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-tab {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  background: #f9fafb;
  border-color: #4b5bd5;
  color: #4b5bd5;
}

.filter-tab.active {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(194, 122, 255, 0.3);
}



.rec-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rec-name {
  font-weight: 600;
  font-size: 0.95rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  color: white;
}

.rec-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.rec-add-btn:hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6);
}

.rec-count {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  color: white;
}

/* ───────────────────────────────────────────────────────────
   SCROLLBARS
   ─────────────────────────────────────────────────────────── */

.panel-content::-webkit-scrollbar,
.rec-filters::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.panel-content::-webkit-scrollbar-track,
.rec-filters::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}

.panel-content::-webkit-scrollbar-thumb,
.rec-filters::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.rec-filters::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ───────────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
   ─────────────────────────────────────────────────────────── */

/* Large tablets and smaller desktops (1200px) */
@media (max-width: 1200px) {
  .panel-left,
  .panel-center,
  .panel-right {
    flex: 1 1 33.333%; /* Equal width */
    min-width: 280px;
  }

  .saved-recs-grid {
    grid-template-columns: 1fr; /* Single column */
  }
}

/* Tablets (992px) - Stack panels vertically */
@media (max-width: 992px) {
  .builder-panels {
    flex-direction: column; /* Stack panels */
    height: auto;
    min-height: calc(100vh - 140px);
  }

  .panel-left,
  .panel-center,
  .panel-right {
    flex: 0 0 auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-right: none;
    border-left: none;
    border-bottom: 2px solid #e5e7eb;
  }

  .panel-left {
    order: 1;
  }

  .panel-center {
    order: 2;
    min-height: 400px; /* Minimum height for map */
  }

  .panel-right {
    order: 3;
    border-bottom: none;
  }

  /* Make collapsed panels take less space when stacked */
  .builder-panel.collapsed {
    flex: 0 0 60px !important;
    min-height: 60px;
    max-width: 100%;
  }

  .builder-panel.collapsed .panel-header {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 16px 20px;
    flex-direction: row;
    justify-content: space-between;
  }

  .builder-panel.collapsed .panel-header h2 {
    display: block;
    font-size: 1.2rem;
  }

  .builder-panel.collapsed .panel-toggle {
    display: flex;
  }

  /* Expand arrow positioning for stacked layout */
  .builder-panel.collapsed .panel-expand-arrow {
    position: static;
    transform: none;
    margin-left: auto;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .builder-container {
    height: auto;
    min-height: 100vh;
  }

  .builder-top-header {
    padding: 16px;
  }

  .builder-title-input {
    font-size: 24px;
  }

  .builder-actions {
    flex-wrap: wrap;
  }

  .header-btn {
    font-size: 13px;
    padding: 8px 12px;
  }

  .panel-header {
    padding: 16px;
  }

  .panel-header h2 {
    font-size: 1.2rem;
  }

  .panel-content {
    padding: 12px;
  }

  .panel-center {
    min-height: 300px;
  }

  .search-bar {
    max-width: 100%;
  }

  /* Make sections easier to interact with on mobile */
  .section-header {
    padding: 16px 12px;
  }

  .drag-handle,
  .drag-handle-small {
    touch-action: none;
  }

  /* Larger touch targets */
  .section-collapse,
  .section-menu,
  .subsection-delete,
  .note-delete {
    min-width: 40px;
    min-height: 40px;
  }

  /* Rec grid stays single column */
  .saved-recs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rec-card {
    aspect-ratio: 3/4;
  }
}

/* Small mobile (480px) */
@media (max-width: 480px) {
  .builder-top-header {
    padding: 12px;
  }
         .notification-modal {
  position: absolute;
  top: 52px;
  right: 30px;
  width: 320px;
  max-height: 420px;
  background: rgba(2, 8, 32, 0.98);
  border-radius: 16px;
  padding: 12px 0;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 45px rgba(0,0,0,0.5);
  overflow-y: auto;
  z-index: 2000001 !important;
}

  .mobile-menu .create-btn {
    display: flex;
    width: 100%;
    justify-content: center;
  }


  .builder-title-input {
    font-size: 20px;
  }

  .builder-title-wrap::after {
    width: 80%;
  }

  .builder-actions {
    width: 100%;
  }

  .header-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .header-btn span {
    display: none; /* Hide text on very small screens */
  }

  .builder-visibility {
    width: 100%;
  }

  .vis-btn {
    flex: 1;
  }

  .panel-header h2 {
    font-size: 1rem;
  }

  .section-title-input {
    font-size: 0.9rem;
  }

  .add-section-btn {
    font-size: 0.9rem;
    padding: 12px;
  }
}

/* Drag handle for sections */
.drag-handle {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: grab;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s ease;
  font-size: 0.9rem;
}

.drag-handle:hover {
  color: #6b7280;
}

.drag-handle:active {
  cursor: grabbing;
}

/* Small drag handle for subsections and notes */
.drag-handle-small {
  background: none;
  border: none;
  color: #d1d5db;
  cursor: grab;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.drag-handle-small:hover {
  color: #9ca3af;
}

.drag-handle-small:active {
  cursor: grabbing;
}

/* Drag states */
.section.dragging,
.subsection.dragging,
.note.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.section.drag-over,
.subsection.drag-over,
.note.drag-over {
  border-top: 3px solid #c27aff;
}

/* Update note to have header */
.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  height: 24px;
}

/* Adjust note-delete positioning */
.note .note-delete {
  position: static;
  opacity: 1;
  margin: 0;
}

.drag-handle,
.drag-handle-small {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: element;
}

.builder-title-row{
  padding: 6px 0 10px 0;
}
.builder-title{
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #000e33;
}

.builder-top-header h2{
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #000e33;
}

.builder-top-header{
  padding: 18px 24px 14px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff;
    grid-column: 1 / -1; /* spans all panels */
  padding: 16px 24px 10px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
    border-bottom: none;
      position: relative;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  position: relative;

}

.builder-title-wrap{
  max-width: 1100px;
}

.builder-title-input{
  width: 200%;
  border: none;
  outline: none;
  background: transparent;

  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #000e33;

  padding: 0;
  transition: 0.3s ease-in-out;
  margin: 0;
}

.builder-title-input::placeholder{
  color: rgba(0, 14, 51, 0.28);
}

.builder-title-input:hover {
  background: #f9fafb;
}
.builder-title-input:focus{
  background: #f9fafb;
}

.builder-title-sub{
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
}

.builder-title-wrap{
  position: relative;
  display: inline-block; /* underline fits text width */
}

/* Gradient underline */
.builder-title-wrap::after{
  content: "";
  display: block;
  height: 3px;
  width: 56%;                /* 👈 half underline */
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #0066ff 0%,
    #c27aff 100%
  );
}

/* Slightly adjust spacing so it feels intentional */
.builder-title-input{
  line-height: 1.1;
}

.builder-panels{
  background: #f9fafb;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Purple divider line */
.builder-top-header::after{
  content: "";
  position: absolute;
  left: 0;              /* inset so it aligns with content */
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background-color: #4b5bd5;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* Layout row */
.builder-top-row{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 18px;
}

.builder-content,
.builder-panels {
  background: #f9fafb; /* very subtle gray */
}




/* Title wrap underline (keeps your half underline) */
.builder-title-wrap{
  position: relative;
  display: inline-block;
  max-width: 900px;
}

.builder-title-wrap::after{
  content: "";
  display: block;
  height: 6px;
  width: 56%;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0066ff 0%, #c27aff 100%);
}

/* Actions cluster */
.builder-actions{
  display:flex;
  align-items:center;
  gap: 12px;
  padding-bottom: 2px; /* aligns with underline baseline nicely */
}

/* Buttons */
.header-btn{
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  display:flex;
  align-items:center;
  gap: 8px;
  transition: 0.2s ease;
  white-space: nowrap;
}

.header-btn.primary{
  background: linear-gradient(135deg, #0066ff 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
      padding: 10px 14px !important;

}

.header-btn.secondary{
  background: rgba(0, 0, 0, 0.04);
  color: #000e33;
    padding: 10px 14px !important;

  border: 1px solid rgba(0,0,0,0.08);
}

.header-btn.secondary:hover{
  background: rgba(0, 0, 0, 0.06);
}

/* Visibility segmented toggle */
.builder-visibility{
  display:flex;
  align-items:center;
  border: 1px solid rgba(75, 91, 213, 0.18);
  border-radius: 999px;
  padding: 4px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.vis-btn{
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  color: rgba(0, 14, 51, 0.75);
  cursor: pointer;
  transition: 0.2s ease;
}

.vis-btn.active{
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: #fff;
}

/* Responsive: stack actions under title */
@media (max-width: 900px){
  .builder-top-row{
    flex-direction: column;
    align-items: flex-start;
  }
  .builder-actions{
    width: 100%;
    flex-wrap: wrap;
  }
}
.recs-source-tabs{
  display: flex;
  gap: 10px;
  padding: 12px 0 8px 0;
}

.source-tab{
  border: 1px solid rgba(75, 91, 213, 0.18);
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  color: #374151;
}

.source-tab.active{
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border: none;
  color: #fff;
  box-shadow: 0 12px 20px rgba(0,0,0,0.10);
}

.destination-search{
  padding: 8px 0 12px 0;
}

.destination-search.hidden{
  display: none;
}



.scope-pill{
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  color: #111827;
}

.scope-pill.active{
  background: rgba(75, 91, 213, 0.10);
  border-color: rgba(75, 91, 213, 0.25);
  color: #4b5bd5;
}

/* ───────────────────────────────────────────────────────────
   SKELETON LOADING STATES
   ─────────────────────────────────────────────────────────── */

.rec-card.skeleton {
  position: relative;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.rec-card.skeleton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

/* ───────────────────────────────────────────────────────────
   DESTINATION SEARCH RESULTS
   ─────────────────────────────────────────────────────────── */

.destination-results {
  margin-top: 16px;
  max-height: calc(100vh - 400px);
  overflow-y: auto;
}

.destination-results .saved-recs-grid {
  padding-top: 12px;
}

/* Empty state styling */
.recs-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.recs-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
  display: block;
}

.recs-empty h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #6b7280;
}

.recs-empty p {
  font-size: 0.9rem;
  margin: 0;
  color: #9ca3af;
}

/* Scrollbar for destination results */
.destination-results::-webkit-scrollbar {
  width: 6px;
}

.destination-results::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}

.destination-results::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.destination-results::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}


/* Better "Added" badge */
.rec-count {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
  animation: spin 1s linear infinite;
}

/* Responsive adjustments for search */
@media (max-width: 768px) {
  .destination-search .search-row {
    margin-bottom: 12px;
  }

  .scope-pills {
    flex-wrap: wrap;
    gap: 6px;
  }

  .scope-pill {
    font-size: 11px;
    padding: 6px 8px;
  }
}

/* ───────────────────────────────────────────────────────────
   SKELETON LOADING STATES
   ─────────────────────────────────────────────────────────── */

.rec-card.skeleton {
  position: relative;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.rec-card.skeleton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

/* ───────────────────────────────────────────────────────────
   REC CARD ACTIONS (INFO + ADD BUTTONS)
   ─────────────────────────────────────────────────────────── */

.rec-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.rec-info-btn,
.rec-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rec-info-btn:hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  box-shadow: 0 0 12px rgba(75, 91, 213, 0.6);
  transform: scale(1.1);
}

.rec-add-btn:hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6);
  transform: scale(1.1);
}

/* ───────────────────────────────────────────────────────────
   REC DETAIL MODAL
   ─────────────────────────────────────────────────────────── */

.rec-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.rec-detail-modal.hidden {
  display: none;
}

.rec-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.rec-detail-panel {
  position: relative;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
  overflow: hidden;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.rec-detail-header {
  padding: 24px;
  border-bottom: 2px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #ffffff;
}

.rec-detail-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  flex: 1;
  padding-right: 16px;
}

.rec-detail-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rec-detail-close:hover {
  transform: rotate(90deg);

}

.rec-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.rec-detail-image-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
}

.rec-detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}

.rec-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: #374151;
}

.rec-detail-row i {
  color: #6b7280;
  width: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.rec-detail-row a {
  color: #4b5bd5;
  text-decoration: none;
  font-weight: 500;
}

.rec-detail-row a:hover {
  text-decoration: underline;
}

.rec-detail-section {
  margin-bottom: 28px;
}

.rec-detail-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.rec-detail-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}
.notes-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(75,91,213,0.35);
  background: rgba(75,91,213,0.10);
  color: #4b5bd5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.notes-pill:hover{
  background: rgba(75,91,213,0.16);
}

.notes-pill.open{
  opacity: 0.75;
}

.rec-detail-notes {
  width: 90%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.rec-detail-notes:focus {
  outline: none;
  border-color: #4b5bd5;
  box-shadow: 0 0 0 3px rgba(75, 91, 213, 0.1);
}

.rec-detail-save-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}



.rec-detail-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rec-vis-toggle {
  display: flex;
  gap: 8px;
}

.vis-pill {
  flex: 1;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.vis-pill:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.vis-pill.active {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(194, 122, 255, 0.3);
}

.saved-by-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.saved-by-row.hidden {
  display: none;
}

.saved-by-text {
  font-size: 0.9rem;
  color: #6b7280;
}

.rec-detail-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #f3f4f6;
}

.rec-detail-action-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.rec-detail-action-btn.primary {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(194, 122, 255, 0.3);
}



.rec-detail-action-btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rec-detail-action-btn.secondary {
  background: #f9fafb;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.rec-detail-action-btn.secondary:hover {
  background: #f3f4f6;
}

/* Scrollbar for modal content */
.rec-detail-content::-webkit-scrollbar {
  width: 6px;
}

.rec-detail-content::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.rec-detail-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.rec-detail-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .rec-detail-panel {
    width: 100vw;
  }

  .rec-detail-header {
    padding: 20px 16px;
  }

  .rec-detail-header h2 {
    font-size: 1.3rem;
  }

  .rec-detail-content {
    padding: 20px 16px;
  }
}

/* ───────────────────────────────────────────────────────────
   DESTINATION SEARCH RESULTS
   ─────────────────────────────────────────────────────────── */

.destination-results {
  margin-top: 16px;
  max-height: calc(100vh - 400px);
  overflow-y: auto;
}

.destination-results .saved-recs-grid {
  padding-top: 12px;
}

/* Empty state styling */
.recs-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.recs-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
  display: block;
}

.recs-empty h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #6b7280;
}

.recs-empty p {
  font-size: 0.9rem;
  margin: 0;
  color: #9ca3af;
}

/* Scrollbar for destination results */
.destination-results::-webkit-scrollbar {
  width: 6px;
}

.destination-results::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}

.destination-results::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.destination-results::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
.rec-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Better "Added" badge */
.rec-count {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
  animation: spin 1s linear infinite;
}

/* Responsive adjustments for search */
@media (max-width: 768px) {
  .destination-search .search-row {
    margin-bottom: 12px;
  }

  .scope-pills {
    flex-wrap: wrap;
    gap: 6px;
  }

  .scope-pill {
    font-size: 11px;
    padding: 6px 8px;
  }
}

.saved-by-avatars {
  display: flex;
  margin-right: 8px;
}

.saved-by-avatar-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  margin-left: -8px;
  position: relative;
}

.saved-by-avatar-ring:first-child {
  margin-left: 0;
}

.saved-by-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saved-by-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-by-avatar-inner.monogram {
  background: #000e33;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
}

.saved-by-friends-link {
  color: #4b5bd5;
  cursor: pointer;
  font-weight: 600;
}

.saved-by-friends-link:hover {
  text-decoration: underline;
}

/* My Recs Controls */
.my-recs-controls {
  padding: 0 0 16px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.my-recs-controls.hidden {
  display: none;
}

.recs-search-bar,
.search-row {
  position: relative;
  margin-bottom: 12px;
}

.recs-search-bar i,
.search-row i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.9rem;
}

.recs-search-bar input,
.search-row input,
#destinationSearchInput {
  width: 87%;
  padding: 10px 14px 10px 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  outline: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.recs-search-bar input:focus,
.search-row input:focus,
#destinationSearchInput:focus {
  border-color: #4b5bd5;
  box-shadow: 0 0 0 3px rgba(75, 91, 213, 0.1);
}

.recs-sort-filter {
  display: flex;
  gap: 8px;
}

.sort-btn,
.filter-btn,
.dest-sort-btn {
  flex: 1;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.sort-btn:hover,
.filter-btn:hover,
.dest-sort-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.filter-btn.active {
  background: rgba(75, 91, 213, 0.1);
  border-color: #4b5bd5;
  color: #4b5bd5;
}

/* Dropdowns */
.sort-dropdown,
.filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 200px;
  z-index: 100;
}


.sort-option,
.filter-option {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #374151;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
}

.sort-option:hover,
.filter-option:hover {
  background: #f9fafb;
}

.filter-option {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #374151;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-option i {
  width: 16px;
  font-size: 0.85rem;
  color: #c27aff;
  flex-shrink: 0;
}

.filter-option:hover {
  background: #f9fafb;
}

.filter-option.active {
  background: rgba(194, 122, 255, 0.1);
  color: #4b5bd5;
}

.filter-section {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h4 {
  margin: 0 0 6px 0;
  padding: 0 12px;
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#filterDestinationsList {
  max-height: 200px;
  overflow-y: auto;
}

#filterDestinationsList::-webkit-scrollbar {
  width: 4px;
}

#filterDestinationsList::-webkit-scrollbar-track {
  background: #f3f4f6;
}

#filterDestinationsList::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.sort-option.active,
.filter-option.active {
  background: rgba(75, 91, 213, 0.1);
  color: #4b5bd5;
}

.filter-section {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h4 {
  margin: 0 0 6px 0;
  padding: 0 12px;
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sort-wrapper,
.filter-wrapper{
  position: relative;
  flex: 1;
}

.hidden {
  display: none !important;
}

.recs-empty.hidden {
  display: none !important;
}

/* Destination filter chips */
.filter-destinations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  max-height: 200px;
  overflow-y: auto;
}

.filter-destinations-empty {
  padding: 12px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

.filter-destination-chip {
  padding: 6px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  color: #374151;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-destination-chip:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.filter-destination-chip.active {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(194, 122, 255, 0.3);
}

/* Scrollbar for destination list */
.filter-destinations-list::-webkit-scrollbar {
  width: 4px;
}

.filter-destinations-list::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}

.filter-destinations-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.filter-destinations-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

#myRecsDestinationFilter { margin-top: 10px; }
.dest-filter { position: relative; width: 320px; max-width: 100%; }

.dest-filter-btn{
  width: 100%;
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
  cursor: pointer;
  font-weight: 600;
}

.dest-filter-menu{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  padding: 8px;
  z-index: 50;
  max-height: 280px;
  overflow: auto;
}

.dest-option{
  width: 100%;
  display:flex; align-items:center; gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}

.dest-option:hover{ background: rgba(0,0,0,0.04); }

.dest-option i{
  width: 18px;
  visibility: hidden;
}

.dest-option.active{
  background: rgba(75, 91, 213, 0.10);
  color: #4b5bd5;
}

.dest-option.active i{ visibility: visible; }

.dest-select-wrap{
  position: relative;
  width: 100%;
  margin-top: 8px;
}

.dest-select{
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 12px 42px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  cursor: pointer;
}

.dest-select:focus{
  outline: none;
  border-color: rgba(75, 91, 213, 0.55);
  box-shadow: 0 0 0 3px rgba(75, 91, 213, 0.12);
}

.dest-select-icon{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.7;
}

.dest-select-wrap {
  position: relative;
  width: 100%;
}

.dest-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 12px 42px 12px 14px; /* 👈 room for arrow */
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  cursor: pointer;
}

.dest-select:focus {
  outline: none;
  border-color: rgba(75, 91, 213, 0.55);
  box-shadow: 0 0 0 3px rgba(75, 91, 213, 0.12);
}

.dest-select-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;

  font-size: 0.9rem;          /* ⬆ bigger */
  color: #6b7280;             /* ⬆ darker */
  opacity: 1;                 /* ⬆ visible */
}

.filter-dropdown .dest-select-wrap {
  width: 100%;
}

.filter-dropdown .dest-select {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

/* Friends Saved Modal */
.friends-saved-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.friends-saved-modal.hidden {
  display: none;
}

.friends-saved-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.friends-saved-dialog {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.friends-saved-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1;
  font-size: 1.5rem;
}

.friends-saved-close:hover {
  transform: rotate(90deg);
}

.friends-saved-title {
  padding: 32px 32px 24px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000e33;
  text-align: center;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
    border-bottom: 1px solid rgba(0, 14, 51, 0.08);


}

.friends-saved-list {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 32px;
}

.modal-loading {
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}

.modal-loading i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.modal-empty {
  padding: 80px 20px;
  text-align: center;
  color: #9ca3af;
}

.modal-empty i {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  opacity: 0.4;
}

.modal-empty p {
  margin: 0;
  font-size: 1.1rem;
  color: #6b7280;
}

/* User Item */
.user-item {
 display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  transition: 0.2s ease;
  cursor: pointer;
  margin-bottom: 8px;
}

.user-item:hover {
  background: #f9fafb;
}


/* User Item in Modal */
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  transition: 0.2s ease;
  cursor: pointer;
  margin-bottom: 8px;
}

.user-item:hover {
  background: rgba(0, 14, 51, 0.03);
}

.user-item-avatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff) !important;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-item-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.user-item-avatar .monogram{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #000e33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  color: white;
}

.user-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-item-name,
.user-name {
  font-weight: 600;
  font-size: 1rem;
  color: #000e33;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



.rec-detail-section {
  margin-bottom: 28px;
}

.rec-detail-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.rec-detail-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

.user-item-location,
.user-username {
  font-size: 0.85rem;
  color: #4b5bd5;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.user-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #000e33;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}



.follow-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(0, 14, 51, 0.3);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
    background: linear-gradient(135deg, #0066ff, #c27aff);
  color: white;
}


.follow-btn.following {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
}

.follow-btn.following:hover {
  background: rgba(0, 14, 51, 0.05);

}

.follow-btn.following i {
  font-size: 0.9rem;
}

/* Scrollbar */
.friends-saved-list::-webkit-scrollbar {
  width: 8px;
}

.friends-saved-list::-webkit-scrollbar-track {
  background: #f9fafb;
}

.friends-saved-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.friends-saved-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

@media (max-width: 768px) {
  .friends-saved-dialog {
    max-width: 95%;
    max-height: 85vh;
  }

  .friends-saved-title {
    padding: 24px 24px 20px;
    font-size: 1.5rem;
  }

  .friends-saved-list {
    padding: 16px 20px 24px;
  }

  .user-item {
    padding: 12px 8px;
  }
}

/* Destination Recs Controls */
.dest-recs-controls {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}



.rec-comments-panel {
  margin-top: 10px;
  border-radius: 22px;
  border: 1px solid rgba(107, 95, 255, 0.16);
  background: rgba(107, 95, 255, 0.04);
  box-shadow: 0 14px 30px rgba(10, 12, 30, 0.10);
  overflow: hidden;
}

.rec-comments-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rec-comments-scroll::-webkit-scrollbar {
  width: 10px;
}

.rec-comments-scroll::-webkit-scrollbar-thumb {
  background: rgba(107, 95, 255, 0.18);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.rec-comments-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

.rec-comments-loading,
.rec-comments-empty,
.rec-comments-error {
  text-align: center;
  padding: 14px 0 8px;
  color: rgba(20, 20, 30, 0.55);
  font-size: 0.92rem;
}

.rec-comment-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(107, 95, 255, 0.14);
  box-shadow: 0 10px 20px rgba(10, 12, 30, 0.08);
}

/* Avatar with gradient border */
.rec-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #0066ff 0%, #c27aff 100%) border-box;
}

/* Monogram: Black background, white initials, gradient border */
.rec-comment-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;

  /* Black background with white text */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  text-transform: uppercase;

  /* Gradient border with black background */
  border: 2px solid transparent;
  background:
    linear-gradient(#000e33, #000e33) padding-box,
    linear-gradient(135deg, #0066ff 0%, #c27aff 100%) border-box;
}

.rec-comment-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dest-sort-btn.active {
  background: rgba(75, 91, 213, 0.1);
  border-color: #4b5bd5;
  color: #4b5bd5;
}


.dest-sort-option {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #374151;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
}

.dest-sort-option:hover {
  background: #f9fafb;
}

.dest-sort-option.active {
  background: rgba(75, 91, 213, 0.1);
  color: #4b5bd5;
}

/* Scope and Sort Row */
.scope-and-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 👈 This pushes sort to the right */
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.scope-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 1 auto; /* 👈 Don't grow, just use needed space */
}

.dest-sort-wrapper {
  position: relative;
  flex-shrink: 0; /* 👈 Don't shrink */
  margin-left: auto; /* 👈 Push to far right */
}


.dest-sort-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 100;
  min-width: 180px;
}

.dest-sort-option {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #374151;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
}

.dest-sort-option:hover {
  background: #f9fafb;
}

.dest-sort-option.active {
  background: rgba(75, 91, 213, 0.1);
  color: #4b5bd5;
}

/* Remove old dest-recs-controls styles if you had them */

/* Saved By Indicator on Rec Cards */
/* Saved By Indicator on Rec Cards */
.rec-saved-by {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 14, 51, 0.9);
  backdrop-filter: blur(12px);
  padding: 3px 8px 3px 3px;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(rgba(0, 14, 51, 0.9), rgba(0, 14, 51, 0.9)),
    linear-gradient(135deg, #0066ff, #c27aff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.rec-saved-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  padding: 1.5px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-saved-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.saved-avatar-initials {
  width: 17px;
  height: 17px;
  background: rgba(0, 14, 51, 0.95);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-saved-text {
  line-height: 1;
  white-space: nowrap;
}

/* Adjust rec-count position so it doesn't overlap */
.rec-count {
  position: absolute;
  top: 10px;
  left: 10px;
  /* ... rest of existing styles ... */
}

/* Place Items in Itinerary */
.place-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: move;
}

.place-item:hover {
  border-color: #8b5cf6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.place-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.place-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.place-info {
  flex: 1;
  min-width: 0;
}

.place-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 4px;
}

.place-address {
  font-size: 0.8rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.place-view-btn,
.place-delete,
.place-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}



.place-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Place Items in Itinerary */
.place-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: move;
}

.place-item:hover {
  border-color: #8b5cf6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.place-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.place-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.place-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f4f6;
}

.place-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: white;
  font-size: 1.2rem;
}

.place-info {
  flex: 1;
  min-width: 0;
}

.place-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 4px;
}

.place-address {
  font-size: 0.8rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.place-view-btn,
.place-delete {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.place-view-btn:hover,
.place-action-btn:hover {
  background: #e5e7eb !important;
  color: #4b5bd5 !important;
}

.place-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.place-info {
  flex: 1;
  min-width: 0;
  transition: all 0.2s ease;
}

.place-info:hover {
  transform: translateX(2px);
}

.place-info:hover .place-name {
  color: #4b5bd5;
}

.place-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.place-address {
  font-size: 0.8rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}/* Keep your padding kills */
.gm-style .gm-style-iw-c { padding: 0 !important; overflow: hidden !important; }
.gm-style .gm-style-iw-d { padding: 0 !important; overflow: hidden !important; }

/* Kill header space but keep X visible */
.gm-style .gm-style-iw-chr{
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}



/* style icon */
.gm-style .gm-style-iw-c .gm-ui-hover-effect img{
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  opacity: 0.75 !important;
}

/* ✅ hide any extra icons Google injects */
.gm-style .gm-style-iw-c .gm-ui-hover-effect img:not(:first-child){
  display: none !important;
}

/* Google Places Autocomplete Styling */
.pac-container {
  background: #ffffff;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  font-family: inherit;
}

.pac-item {
  padding: 12px 16px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pac-item:hover {
  background: #f9fafb;
}

.pac-item-query {
  color: #111827;
  font-weight: 600;
  font-size: 0.95rem;
}

.pac-matched {
  color: #4b5bd5;
  font-weight: 600;
}

.pac-icon {
  display: none;
}


.share-rec-modal {
  position: fixed;
  inset: 0;
  z-index: 2600; /* above rec detail + friends modal */
}

.share-rec-modal.hidden {
  display: none;
}

.share-rec-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Centered dialog */
.share-rec-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  max-width: 90%;
  background: #000e33;
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

/* Close button */
.share-rec-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

/* Title + subtitle */
.share-rec-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.share-rec-subtitle {
  margin: 0 0 14px;
  font-size: 13px;
  color: #b4b9d8;
}

/* Button column */
.share-rec-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

/* Each share button */
.share-rec-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 11px;
  border: none;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, transform 0.12s ease;
}

.share-rec-btn i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.share-rec-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Spin animation on close hover */
.share-rec-close {
  transition: transform 0.35s ease;
}

.share-rec-close i {
  transition: transform 0.35s ease;
  display: inline-block;
}

.share-rec-close:hover i {
  transform: rotate(90deg);
}

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background-color: white;
  margin: 80px auto;
  padding: 30px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}


.shareHeader {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000e33;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

#userSearch {
  margin-bottom: 16px;
  margin-top: 20px;
}

.userSearch input {
  width: 90%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 14, 51, 0.15);
  background: rgba(0, 14, 51, 0.02);
  color: #000e33;
  font-size: 0.95rem;
  font-family: inherit;
}

.userSearch input:focus {
  outline: none;
  border-color: #0066ff;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.user-results {
  max-height: 400px;
  overflow-y: auto;
}

.user-result-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.user-result-entry:hover {
  background-color: #f5f5f5;
}



.monogram-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 15px;
  font-weight: 500;
  color: #000e33;
}

/* Gradient ring wrapper */
.avatar-gradient {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Inner avatar stays clean */

.monogram-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
}


.sendButton {
  padding: 8px 20px;
  background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.modal-subtitle {
  margin: 12px 0 20px;
  padding-top: 8px;
  font-size: 0.95rem;
  color: #4a4f6b;
  text-align: center;
}

/* ─────────────────────────────────────────────
   SHARE MODAL (matches your group modal vibe)
───────────────────────────────────────────── */
#shareModal {
  display: none; /* you already toggle this */
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#shareModalContent {
  width: min(560px, calc(100vw - 32px));
  margin: 8vh auto;
  border-radius: 24px;
  padding: 22px 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  position: relative;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 26px;
  line-height: 34px;
}
.modal-close:hover {
  transform: rotate(90deg);
}
.modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000e33;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.modal-subtitle {
  margin: 0 0 14px;
  color: rgba(26,26,26,0.7);
  font-size: 14px;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 14px;
}

/* ─────────────────────────────────────────────
   SELECTABLE GROUP ROWS (reuses .group-item)
───────────────────────────────────────────── */

/* make label rows clickable without changing your existing .group-item layout */
.group-option {
  cursor: pointer;
  user-select: none;
}

/* hide checkbox but keep it accessible */
.group-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* right-side check indicator */
.check-pill {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.70);
  color: rgba(26,26,26,0.35);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

/* selected state: highlight the row + check */
/* selected state: use inset ring so it can't be clipped */
.group-option:has(.group-check:checked) {
  box-shadow: inset 0 0 0 2px rgba(0, 102, 255, 0.55);
  background: rgba(255,255,255,0.98);
  border-radius: 24px; /* match your row radius if needed */
}

/* gradient check */
.group-option:has(.group-check:checked) .check-pill {
  background: linear-gradient(90deg, #0066ff, #c27aff);
  border-color: #4b5bd5;
  color: #ffffff;
  transform: scale(1.05);
}


/* Share button (map to your existing primary button if you have one) */
.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(90deg, #0066ff, #c27aff);
  color: #ffffff;
}

.friends-saved-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


.friends-saved-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.friends-saved-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friends-saved-monogram {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #050b1f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #ffffff;
}


#userSearch {
  margin-bottom: 16px;
  margin-top: 20px;
}

.userSearch input {
  width: 90%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 14, 51, 0.15);
  background: rgba(0, 14, 51, 0.02);
  color: #000e33;
  font-size: 0.95rem;
  font-family: inherit;
}

.userSearch input:focus {
  outline: none;
  border-color: #0066ff;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}



.monogram-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}


/* Gradient ring wrapper */
.avatar-gradient {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Inner avatar stays clean */

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.user-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #000e33;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar {
    width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-weight: 600;
  font-size: 1rem;
  color: #000e33;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}


.user-item-info,
.user-info {
  flex: 1;
  min-width: 0;
}



.user-avatar .monogram {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #000e33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  color: white;
}

.monogram-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
}


.sendButton {
  padding: 8px 20px;
  background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.modal-subtitle {
  margin: 12px 0 20px;
  padding-top: 8px;
  font-size: 0.95rem;
  color: #4a4f6b;
  text-align: center;
}

.modal-list {
  max-width: 480px;   /* try 480–520px */
  margin: 0 auto 14px;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 14px;
}

/* make label rows clickable without changing your existing .group-item layout */
.group-option {
  cursor: pointer;
  user-select: none;
}

/* hide checkbox but keep it accessible */
.group-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* right-side check indicator */
.check-pill {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.70);
  color: rgba(26,26,26,0.35);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

/* selected state: highlight the row + check */
/* selected state: use inset ring so it can't be clipped */
.group-option:has(.group-check:checked) {
  box-shadow: inset 0 0 0 2px rgba(0, 102, 255, 0.55);
  background: rgba(255,255,255,0.98);
  border-radius: 24px; /* match your row radius if needed */
}

/* gradient check */
.group-option:has(.group-check:checked) .check-pill {
  background: linear-gradient(90deg, #0066ff, #c27aff);
  border-color: #4b5bd5;
  color: #ffffff;
  transform: scale(1.05);
}


/* Share button (map to your existing primary button if you have one) */
.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(90deg, #0066ff, #c27aff);
  color: #ffffff;
}


/* Group Item in Modal */
.group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  transition: 0.2s ease;
  cursor: pointer;
  margin-bottom: 8px;
}

.group-item:hover {
  background: rgba(0, 14, 51, 0.03);
}

/* Group Item Icon - With Gradient Border for Monogram */
.group-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

/* Monogram style - inner dark background */
.group-item-icon.monogram {
  padding: 2px; /* Space for gradient border */
}

.group-item-icon.monogram span {
  width: 100%;
  height: 100%;
  background: #000e33;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 700;
}

/* Group Item Image - When there's an actual photo */
.group-item-image {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-item-image img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.group-item-info {
  flex: 1;
  min-width: 0;
}

.group-item-name {
  font-weight: 600;
  font-size: 1rem;
  color: #000e33;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-item-members {
  font-size: 0.85rem;
  color: #000e33;
  opacity: 0.6;
}

/* Let the center panel content behave like a vertical layout */
.panel-center .panel-content{
  display: flex;
  flex-direction: column;
  min-height: 0;
}



/* If your actual Google map div is inside .map-view (common: <div id="map">) */
#map{
  width: 100%;
  height: 100%;
}

.panel-header-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.view-toggle{
  display:flex;
  gap:6px;
  padding:4px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

.view-tab{
  border:0;
  background: transparent;
  padding:6px 10px;
  border-radius:999px;
  font-size:0.85rem;
  cursor:pointer;
  color: rgba(0,0,0,0.70);
  transition: 0.2s ease;
  white-space: nowrap;
}

.view-tab.active{
  background: rgba(75, 91, 213, 0.10);
  color: #4b5bd5;
  font-weight: 600;
}

.view-pane{ display:none; }
.view-pane.active{ display:block; }

/* =========================
   VIEW COLLECTION (POLISH)
   Paste at bottom of CSS
   ========================= */


/* Make panel content feel like RoamRecs cards */
.builder-panel.panel-left .panel-content {
  padding: 14px !important;
}

/* Sections */
#sectionsContainer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* SECTION = wrapper only (no card) */
.section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 24px;
}

.section-header {
  padding: 6px 2px 10px;
  border-bottom: none;
  background: transparent;
    padding: 0px 10px;

}

.section-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #000e33;
  margin: 0;
}

.section-header::after {
  content: "";
  display: block;
  margin-top: 6px;
  width: 36px;
  height: 2px;
  border-radius: 2px;
background: rgba(75, 91, 213, 0.65);
}



/* Section content */
.section-content {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Shared row styles for locations + notes */
.location-row,
.note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

/* Hover polish (still view-only, just feels premium) */
.location-row:hover,
.note:hover {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.14);
}

/* Left grouping (number + text) */
.location-row-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1;
}

/* Number bubble */
.location-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #111827;
  background: rgba(0,0,0,0.08);
  flex: 0 0 auto;
}

/* Title + subtext */
.location-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0; /* prevents overflow */
}

.location-title,
.note-title {
  font-weight: 650;
  font-size: 0.92rem;
  color: #111827;
  line-height: 1.2;
}

.location-sub,
.note-body {
  font-size: 0.83rem;
  color: rgba(17, 24, 39, 0.68);
  line-height: 1.25;
}

/* Notes look slightly distinct */
.note {
  background: rgba(99, 102, 241, 0.04); /* subtle indigo tint */
  border-color: rgba(99, 102, 241, 0.18);
}

.note:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.22);
}

/* Empty state visibility */
.empty-state {
  padding: 22px 14px;
  text-align: center;
}

.empty-state h3 {
  margin: 10px 0 6px;
  font-size: 1rem;
  font-weight: 650;
  color: #111827;
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(17, 24, 39, 0.65);
}

/* =========================
   RECS TAB
   ========================= */

/* Save button stub (disabled for now, but looks nice) */
.rec-save-btn {
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.02);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: not-allowed;
  color: rgba(17, 24, 39, 0.65);
}

/* =========================
   TOGGLE (Itinerary / Recs)
   ========================= */

.view-toggle {
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

.view-tab {
  color: rgba(17, 24, 39, 0.70);
}

.view-tab.active {
  background: rgba(75, 91, 213, 0.1);
  color: #4b5bd5;
  font-weight: 650;
}

/* =========================
   MOBILE SAFETY
   ========================= */

@media (max-width: 900px) {
  .builder-panel.panel-left .panel-content {
    padding: 12px !important;
  }

  .section-header,
  .section-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.rec-card-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}

.rec-thumb{
  width:44px;
  height:44px;
  border-radius:12px;
  background: rgba(0,0,0,0.06);
  overflow:hidden;
  flex: 0 0 auto;
}

.rec-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* VIEW-ONLY PLACE CARD */
.place-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 10px 26px rgba(17,24,39,0.06);
}

.place-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.place-card-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0,0,0,0.06);
  flex: 0 0 auto;
}

.place-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.place-card-text {
  min-width: 0;
}

.place-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.place-card-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(0,0,0,0.06);
  color: #111827;
  flex: 0 0 auto;
}

.place-card-title {
  font-weight: 750;
  font-size: 0.98rem;
  color: #111827;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-card-sub {
  margin-top: 4px;
  font-size: 0.88rem;
  color: rgba(17,24,39,0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions (info + save) */
.place-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}



.place-card-num {
  display: none !important;
}

/* Force purple hover for Info button */
.place-action-btn.info-btn:hover {
  background: rgba(75, 91, 213, 0.12) !important;
  border-color: rgba(75, 91, 213, 0.38) !important;
  color: #4b5bd5 !important;
}

.place-action-btn.info-btn:hover i {
  color: #4b5bd5 !important;
}

.rec-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rec-detail-save-header-btn {
  background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}



.rec-detail-save-header-btn:active {
  transform: translateY(0);
}

.rec-detail-save-header-btn i {
  font-size: 14px;
}


/* Gradient icon on hover for unsaved state (bookmark) */
.place-action-btn.primary:not(.saved):hover i {
  background: rgba(75, 91, 213, 0.12) !important;
  border-color: rgba(75, 91, 213, 0.38) !important;
  color: #4b5bd5 !important;
}

/* Gradient icon for saved state (checkmark) - always gradient */
.place-action-btn.primary.saved i {
  background: rgba(75, 91, 213, 0.12) !important;
  border-color: rgba(75, 91, 213, 0.38) !important;
  color: #4b5bd5 !important;}

  /* Notes – clean callout style */
.note.note-card {
  display: block; /* override shared flex row */
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(75, 91, 213, 0.18);      /* #4b5bd5 tint */
  background: rgba(75, 91, 213, 0.06);
}

/* Note text */
.note.note-card .note-body {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(17, 24, 39, 0.85);
 white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Optional empty style (if note is blank) */
.note.note-card .note-empty {
  font-size: 0.9rem;
  color: rgba(17, 24, 39, 0.45);
}

/* Hover: subtle */
.note.note-card:hover {
  background: rgba(75, 91, 213, 0.08);
  border-color: rgba(75, 91, 213, 0.24);
}

.it-subheader {
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #111827;
}

.it-subheader::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 6px;
  border-radius: 2px;
  background: rgba(75, 91, 213, 0.45); /* #4b5bd5 tint */
}/* Recs grid */
/* Recs grid */


#collectionRecsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  max-width: 800px; /* ✅ Constrains grid width to make cards smaller */
}

/* Desktop - keep 2 columns but constrain width */
@media (min-width: 900px) {
  #collectionRecsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.rec-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  max-width: 350px; /* ✅ Maximum card width */
}

.rec-card:hover {
  transform: translateY(-4px);
}

/* Image fills entire card */
.rec-thumb {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.rec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ✅ Darker gradient overlay for better text readability */
.rec-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
  pointer-events: none;
}

/* Fallback for no image */
.rec-thumb.no-img {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: grid;
  place-items: center;
}

.rec-thumb-fallback {
  font-size: 3rem;
  color: white;
  z-index: 1;
}
/* Text overlay at bottom left */
.rec-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 90px; /* ✅ More space for 2 buttons */
  padding: 12px 14px;
  z-index: 2;
  color: white;
}
.profile-container {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-container .avatar {
  cursor: pointer;
}

/* Profile dropdown menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px); /* Reduced gap from 12px to 8px */
  right: 0;
  background: #000e33;
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-10px);
  z-index: 1100;
}

/* Add invisible bridge between avatar and dropdown */
.profile-dropdown::before {
  content: '';
  position: absolute;
  top: -12px; /* Covers the gap */
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.profile-container:hover .profile-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px; /* Increased from 10px to 12px for easier clicking */
  font-size: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.profile-dropdown a i {
  width: 16px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.profile-dropdown a:hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
}
/* ✅ Better wrapped title text */
.rec-card-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  color: white !important;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* ✅ Max 2 lines for cleaner look */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  word-break: break-word; /* ✅ Break long words properly */
}

/* For 3 columns on desktop */
@media (min-width: 900px) {
  #collectionRecsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  /* Slightly smaller font for 3-column layout */
  .rec-card-title {
    font-size: 0.9rem;
  }
}

/* ✅ Smaller action buttons - bottom right */
.rec-card-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: white;
  display: flex;
  gap: 6px;
  z-index: 3;
}
/* Base frosted button (matches Image 1) */
.rec-action-btn{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease;
}

.rec-action-btn i{
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

/* Hover: subtle brightening (still frosted) */
.rec-action-btn:hover{
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-1px);
}

/* ✅ Saved state: KEEP same frosted button… only change icon to purple */
.rec-action-btn.save-btn.saved{
  background: rgba(255,255,255,0.20) !important;
  border-color: rgba(255,255,255,0.28) !important;
  box-shadow: none !important;
}

.rec-action-btn.save-btn.saved i{
  color: #4b5bd5 !important;
  -webkit-text-fill-color: #4b5bd5 !important;
}

/* Prevent saved hover from turning white/gradient */
.rec-action-btn.save-btn.saved:hover{
  background: rgba(255,255,255,0.28) !important;
  border-color: rgba(255,255,255,0.35) !important;
}

/* --- Shared action row --- */
.rec-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* --- Base frosted button (already matching image 1) --- */
.rec-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform 0.2s ease,
              box-shadow 0.2s ease,
              background 0.2s ease;
}

/* Icons stay white by default */
.rec-action-btn i {
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

/* ------------------------------ */
/* ✨ HOVER EFFECTS (THE MAGIC) ✨ */
/* ------------------------------ */

/* Info button hover */
.rec-action-btn.info-btn:hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  box-shadow: 0 0 12px rgba(75, 91, 213, 0.6);
  transform: scale(1.1);
}

/* Save / add button hover (unsaved only) */
.rec-action-btn.save-btn:not(.saved):hover {
  background: linear-gradient(135deg, #0066ff, #c27aff);
  transform: scale(1.1);
}

/* ------------------------------ */
/* ✅ SAVED STATE OVERRIDES */
/* ------------------------------ */

.rec-action-btn.save-btn.saved {
  background: rgba(255,255,255,0.22) !important;
  border-color: rgba(255,255,255,0.28) !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: default;
}

.rec-action-btn.save-btn.saved i {
  color: #4b5bd5 !important;

}

/* Prevent saved hover glow */
.rec-action-btn.save-btn.saved:hover {
  box-shadow: none !important;
  transform: none !important;
}


.panel-left.collapsed {
  width: 48px;
  overflow: hidden;
}

.panel-left.collapsed .panel-content,
.panel-left.collapsed .panel-header-left {
  display: none !important;
}

.panel-left.collapsed .panel-toggle {
  margin: 0 auto;
}


.panel-expand-arrow {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  border: none;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: all 0.2s ease;
  z-index: 10;
}

.panel-expand-arrow:hover,
.map-expand-btn:hover {
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6), 0 0 6px rgba(0, 102, 255, 0.6);
  cursor: pointer;
}

.panel-center.collapsed .panel-expand-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Map styling */
.map-view {
  flex: 1;
  min-height: 300px;
  height: 100%;
}

/* Make place cards clickable for map interaction */
.place-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.place-card:hover {
  transform: translateY(-2px);
}

.rec-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.rec-card:hover {
  transform: translateY(-2px);
}
/* ===== CLEAN UP - REMOVE DUPLICATES AND FIX POSITIONING ===== */

.panel-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.panel-center.collapsed .panel-toggle {
  display: none;
}

/* Left panel expand arrow */
.panel-left .panel-expand-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: white !important;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.panel-left .panel-expand-arrow:hover ,
.map-expand-btn:hover {
  box-shadow: 0 4px 16px rgba(194, 122, 255, 0.6);
  transform: translate(-50%, -50%) scale(1.1);
}

.panel-left.collapsed .panel-expand-arrow {
  display: flex !important;
}

/* ===== MAP PANEL COLLAPSE ===== */

/* When collapsed, show thin strip */
.panel-center.collapsed {
  flex: 0 0 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  display: flex !important;
  overflow: visible !important;
}

/* Hide the header content when collapsed */
.panel-center.collapsed .panel-header {
  padding: 20px 6px;
  justify-content: center;
  border-bottom: none;
}

/* Hide the map content when collapsed */
.panel-center.collapsed .panel-content {
  display: none !important;
}

/* ===== MAP EXPAND BUTTON (SIBLING OF PANEL) ===== */

.map-expand-btn{
  position: absolute;           /* ✅ inside the strip */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Active/press effect */
.map-expand-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.panel-center { position: relative; }


.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .auth-modal {
      background: white;
      border-radius: 20px;
      padding: 40px;
      max-width: 500px;
      width: 90%;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      animation: slideUp 0.4s ease;
      position: relative;
    }

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

    .auth-modal-close {
  position: absolute; /* Position it absolutely */
  right: 28px; /* Align to the right */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 14, 51, 0.15);
  background: transparent;
  color: #000e33;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: 0.2s ease;
    }

    .auth-modal-close:hover {
    background: rgba(0, 14, 51, 0.05);
  transform: rotate(90deg);
    }

    .auth-modal-content h2 {
      margin: 0 0 15px 0;
      color: #000e33;
      font-size: 28px;
    }

    .auth-modal-content p {
      margin: 0 0 30px 0;
      color: #666;
      font-size: 16px;
      line-height: 1.6;
    }

    .auth-modal-buttons {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .auth-modal-buttons .primary-btn,
    .auth-modal-buttons .secondary-btn {
      width: 100%;
      padding: 15px 30px;
      font-size: 16px;
      font-weight: 600;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .auth-modal-buttons .primary-btn {
      background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
      color: white;
      border: none;
    }

    .auth-modal-buttons .primary-btn:hover {
 box-shadow: 0 0 12px rgba(194, 122, 255, 0.6),
              0 0 6px rgba(0, 102, 255, 0.6);
              transition: 0.3s ease-in-out;
              cursor: pointer;
    }

    .auth-modal-buttons .secondary-btn {
      background: white;
      color: #4b5bd5;
      border: 2px solid #4b5bd5;
    }

    .auth-modal-buttons .secondary-btn:hover {
      box-shadow: 0 0 12px rgba(194, 122, 255, 0.6),
              0 0 6px rgba(0, 102, 255, 0.6);
              transition: 0.3s ease-in-out;
              cursor: pointer;
    }

    /* Hide navbar elements for non-authenticated users */
    body:not(.authenticated) .notification-container,
    body:not(.authenticated) .create-btn,
    body:not(.authenticated) #navAvatar,
    body:not(.authenticated) .nav-left {
      display: none !important;
    }

    /* Prevent interactions when overlay is active */
    body.auth-required .view-rec-main,
    body.auth-required .navbar,
    body.auth-required .rr-footer {
      pointer-events: none;
    }

    .rr-footer{
  background: #000e33; /* match hero base */
  color: rgba(255,255,255,0.88);
  padding: 28px 0 56px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.guest-nav-left {
      display: none;
    }
    body:not(.authenticated) .guest-nav-left {
      display: flex !important;
    }
    /* Guest action buttons */
    .guest-nav-actions {
      display: none;
      gap: 10px;
      align-items: center;
    }
    body:not(.authenticated) .guest-nav-actions {
      display: flex;
    }

.guest-nav-left {
  gap: 32px;
  justify-content: center;
  align-items: center;
  grid-column: 2;
}

/* subtle hero-like glow */
.rr-footer::before{
  content:"";
  position:absolute;
  inset:-40%;
  pointer-events:none;
  background:
    radial-gradient(900px 420px at 18% 10%, rgba(0,102,255,0.18), transparent 60%),
    radial-gradient(900px 520px at 85% 25%, rgba(194,122,255,0.16), transparent 62%);
  filter: blur(40px);
  opacity: 0.8;
}

.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

/* Logo + tagline */
.footer-logo-wrapper{
  text-align: left;
  margin-bottom: 26px;
}

.footer-logo{
  height: 100px;
  width: auto;
  display: block;
  margin-bottom: 10px;
}

.footer-tagline{
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.68);
}

/* Columns */
.footer-columns{
  display: flex;
  justify-content: space-between;
  gap: 56px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.footer-col{
  min-width: 160px;
}

.footer-col h4{
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}

.footer-col a{
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: rgba(203,213,225,0.90); /* slate-ish */
  text-decoration: none;
  transition: color .15s ease, transform .15s ease;
}

.footer-col a:hover{
  color: #ffffff;
  transform: translateX(1px);
}

/* Divider */
.footer-divider{
  margin: 34px 0 26px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.footer-app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.footer-badges img {
  width: 130px;
}
/* App badges row + CTA */
.footer-app-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}


.footer-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 14px;
  color: #ffffff;
  text-decoration: none;

  background: linear-gradient(90deg, #0066ff, #c27aff);
  box-shadow: 0 16px 40px rgba(75,91,213,0.28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.footer-cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 20px 50px rgba(75,91,213,0.34);
}

/* Bottom row */
.footer-bottom{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-legal{
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.62);
  max-width: 560px;
}

.footer-socials a{
  margin-left: 12px;
  font-size: 18px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  transition: opacity .15s ease, transform .15s ease;
}

.footer-socials a:hover{
  opacity: 0.8;
  transform: translateY(-1px);
}

.collection-meta-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding-top: 8px;
  max-width: 1100px;
}

.collection-owner{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: #000e33;
}

.collection-owner:hover .collection-owner-name{
  color: #4b5bd5;
}
.collection-owner-avatar{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.collection-owner-avatar .inner{
  width:100%;
  height:100%;
  border-radius: 999px;
  background: #ffffff;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

.collection-owner-avatar img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  border-radius: 999px;
}

.collection-owner-initials{
  font-weight: 800;
  font-size: 0.8rem;
  color: #ffffff;
  background: #000e33; /* ✅ Dark background */
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.collection-owner-text{
  display:flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.collection-owner-label{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 14, 51, 0.55);
}

.collection-owner-name{
  font-size: 14px;
  font-weight: 800;
  color: #000e33;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.collection-stats{
  display:flex;
  align-items:center;
  gap: 8px;
  flex: 0 0 auto;
}

.collection-stat-pill{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
  cursor: pointer;
  font-weight: 800;
  color: rgba(0, 14, 51, 0.85);
  transition: 0.2s ease;
}

.collection-stat-pill i{
  color: #4b5bd5;
}

.collection-stat-pill:hover{
  background: rgba(75, 91, 213, 0.08);
  border-color: rgba(75, 91, 213, 0.22);
  transform: translateY(-1px);
}

@media (max-width: 768px){
  .collection-meta-row{
    flex-direction: column;
    align-items: flex-start;
  }
  .collection-owner-name{
    max-width: 100%;
  }
}

/* Move the underline styling from .builder-title-wrap to a new wrapper */
.builder-title-input-wrapper {
  position: relative;
  display: inline-block;
}

.builder-title-input-wrapper::after {
  content: "";
  display: block;
  height: 3px;
  width: 56%;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0066ff 0%, #c27aff 100%);
}

/* Remove the underline from .builder-title-wrap */
.builder-title-wrap::after {
  display: none;
}

/* Update collection-meta-row to stack vertically */
.collection-meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  max-width: 1100px;
}

/* Keep stats on same line */
.collection-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.collection-stat-pill.liked {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.3);
}

.collection-stat-pill.liked i {
  color: #ec4899;
}

.collection-stat-pill.liked {
  animation: likePopIn 0.3s ease;
}

@keyframes likePopIn {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.collection-comments-section {
  padding: 0px 16px;
  padding-top: 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(107, 95, 255, 0.14);
}

.comments-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #000e33;
  margin: 0 0 16px 0;
}

.comments-section-header i {
  color: #c27aff;
}

.collection-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.comments-loading,
.comments-empty {
  text-align: center;
  padding: 20px;
  color: rgba(20, 20, 30, 0.5);
  font-size: 0.9rem;
}

/* Comments section at bottom */
.collection-comments-section {
  border-top: 2px solid rgba(107, 95, 255, 0.15);
}

.comments-section-header {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-section-header i {
  color: #6b5fff;
}

.collection-comments-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
  margin-bottom: 16px;
}

.collection-comments-list::-webkit-scrollbar {
  width: 6px;
}

.collection-comments-list::-webkit-scrollbar-track {
  background: rgba(107, 95, 255, 0.05);
  border-radius: 3px;
}

.collection-comments-list::-webkit-scrollbar-thumb {
  background: rgba(107, 95, 255, 0.3);
  border-radius: 3px;
}

.collection-comment-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(107, 95, 255, 0.15);
}

.collection-comment-textarea {
  width: 95%;
  min-height: 60px;
  padding: 10px;
  border: 1px solid rgba(107, 95, 255, 0.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.collection-comment-textarea:focus {
  outline: none;
  border-color: #6b5fff;
}
.collection-comment-btn,
.rec-detail-primary-btn {
  align-self: flex-end;
  padding: 8px 20px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.collection-comment-btn:hover,
.rec-detail-primary-btn:hover {
  opacity: 0.9;
}

.collection-comment-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comments-loading,
.comments-empty {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}


.rec-comment-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(107, 95, 255, 0.14);
  box-shadow: 0 10px 20px rgba(10, 12, 30, 0.08);
}

/* Avatar with gradient border */
.rec-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #0066ff 0%, #c27aff 100%) border-box;
}

/* Monogram: Black background, white initials, gradient border */
.rec-comment-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;

  /* Black background with white text */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  text-transform: uppercase;

  /* Gradient border with black background */
  border: 2px solid transparent;
  background:
    linear-gradient(#000e33, #000e33) padding-box,
    linear-gradient(135deg, #0066ff 0%, #c27aff 100%) border-box;
}

.rec-comment-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.rec-comment-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-comment-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #000e33;
  line-height: 1.1;
  margin: 0;
  text-decoration: none;
}

.rec-comment-name:hover {
  color: #4b5bd5;
}

.rec-comment-time {
  font-size: 11px;
  color: rgba(20, 20, 30, 0.45);
  line-height: 1;
}

.rec-comment-text {
  color: rgba(20, 20, 30, 0.82);
  font-size: 0.93rem;
  margin: 0;
  margin-top: 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.rec-comment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec-comment-delete-btn,
.rec-comment-report-btn {
  border: 1px solid rgba(20, 20, 30, 0.10);
  background: rgba(255, 255, 255, 0.75);
  color: rgba(20, 20, 30, 0.70);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.rec-comment-delete-btn:hover {
  background: rgba(255, 107, 107, 0.10);
  border-color: rgba(255, 107, 107, 0.25);
  transform: translateY(-1px);
}

.rec-comment-report-btn {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-comment-report-btn:hover {
  background: rgba(107, 95, 255, 0.10);
  border-color: rgba(107, 95, 255, 0.22);
  transform: translateY(-1px);
}

.rec-comment-compose {
  display: flex;
  flex-direction: column; /* ✅ Stack vertically */
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(107, 95, 255, 0.14);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}


.rec-comment-textarea {
  width: 95%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(107, 95, 255, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #000e33;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: none;
  min-height: 46px;
  max-height: 110px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rec-comment-textarea::placeholder {
  color: rgba(20, 20, 30, 0.35);
}

.rec-comment-textarea:focus {
  outline: none;
  border-color: #0066ff;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

#recCommentSubmitBtn.rec-detail-primary-btn {
  margin-top: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: white;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 95%; /* ✅ Full width button */
  align-self: stretch; /* ✅ Stretch to full width */
}
#recCommentSubmitBtn.rec-detail-primary-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6), 0 0 6px rgba(0, 102, 255, 0.6);
}

#recCommentSubmitBtn.rec-detail-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .rec-comment-compose {
    grid-template-columns: 1fr;
  }

  #recCommentSubmitBtn.rec-detail-primary-btn {
    width: 100%;
  }
}

#recCommentSubmitBtn.rec-detail-primary-btn {
  margin-top: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: white;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 95%; /* ✅ Full width button */
  align-self: stretch; /* ✅ Stretch to full width */
}
#recCommentSubmitBtn.rec-detail-primary-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6), 0 0 6px rgba(0, 102, 255, 0.6);
}

#recCommentSubmitBtn.rec-detail-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .rec-comment-compose {
    grid-template-columns: 1fr;
  }

  #recCommentSubmitBtn.rec-detail-primary-btn {
    width: 100%;
  }
}


.rr-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
}

.rr-modal-card{
  width: min(560px, 92vw);
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
  position: relative;
  padding: 34px 34px 26px;
  text-align: center;
}

.rr-modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rr-modal-icon{
  width: 74px;
  height: 74px;
  border-radius: 22px;
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,102,255,0.12), rgba(194,122,255,0.14));
  border: 1px solid rgba(0,0,0,0.06);
}

.rr-modal-icon i{
  font-size: 26px;
  color: #000e33;
  opacity: 0.9;
}

.rr-modal-title{
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  color: #000e33;
  letter-spacing: -0.02em;
}

.rr-modal-subtitle{
  margin: 10px 0 18px;
  color: rgba(11,27,58,0.65);
  font-size: 15px;
}

.rr-form{
  text-align: left;
  margin: 18px auto 0;
  max-width: 420px;
  display: grid;
  gap: 14px;
}

.rr-field{ display: grid; gap: 8px; }

.rr-label{
  font-size: 13px;
  font-weight: 700;
  color: rgba(11,27,58,0.75);
}

.rr-input{
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(11,27,58,0.14);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  color: #0b1b3a;
  background: #fff;
}

.rr-input:focus{
  border-color: rgba(0,102,255,0.55);
  box-shadow: 0 0 0 4px rgba(0,102,255,0.10);
}

.rr-hint{
  font-size: 12px;
  color: rgba(11,27,58,0.55);
}

.rr-toggle-row{
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

/* Switch */
.rr-switch{
  position: relative;
  width: 54px;
  height: 32px;
  display: inline-block;
}

.rr-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.rr-slider{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(11,27,58,0.14);
  transition: 0.2s ease;
  cursor: pointer;
}

.rr-slider::before{
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 4px;
  top: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: 0.2s ease;
}

.rr-switch input:checked + .rr-slider{
  background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
}

.rr-switch input:checked + .rr-slider::before{
  transform: translateX(22px);
}

.rr-modal-actions{
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 22px;
}

.rr-btn{
  height: 50px;
  border-radius: 18px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rr-btn-ghost{
  background: rgba(11,27,58,0.06);
  color: rgba(11,27,58,0.85);
}

.rr-btn-primary{
  background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.rr-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* Segmented visibility toggle (refined) */
.rr-seg-toggle{
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(11,27,58,0.06);
  border: 1px solid rgba(11,27,58,0.10);
}

.rr-seg-btn{
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1;             /* key: prevents vertical bloat */
  cursor: pointer;
  color: rgba(11,27,58,0.6);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.rr-seg-btn.active{
  background: #fff;
  color: rgba(11,27,58,0.95);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border: 1px solid rgba(11,27,58,0.12);
}

/* --- VISIBILITY SEGMENTED TOGGLE (override-proof) --- */
.rr-modal .rr-seg-toggle{
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: 999px;
  background: rgba(11,27,58,0.06);
  border: 1px solid rgba(11,27,58,0.10);

  width: fit-content;
  justify-self: start; /* prevents stretching inside your grid */
  box-sizing: border-box;
}

.rr-modal .rr-seg-toggle .rr-seg-btn{
  all: unset; /* ✅ kills global button padding/font/line-height */
  box-sizing: border-box;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 34px;          /* ✅ controlled height */
  padding: 0 14px;       /* ✅ controlled width */
  border-radius: 999px;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;

  color: rgba(11,27,58,0.62);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.rr-modal .rr-seg-toggle .rr-seg-btn.active{
  background: #fff;
  color: rgba(11,27,58,0.95);
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);
  border: 1px solid rgba(11,27,58,0.10);
}

/* Close (X) micro-interaction */
.rr-modal-close i{
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* subtle rotate on hover */
.rr-modal-close:hover i{
  transform: rotate(90deg) scale(1.05);
  opacity: 0.8;
}

/* comment row layout */
.rr-comment{
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,102,255,0.12);
}

/* avatar wrapper (this is the “hard stop”) */
.rr-avatar{
  width: 52px;
  height: 52px;
  border-radius: 999px;
  flex: 0 0 52px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 3px solid rgba(0,102,255,0.75);
  background: #fff;
}

.rec-comment-delete-btn,
.rec-comment-report-btn{
  border: 1px solid rgba(20, 20, 30, 0.10);
  background: rgba(255, 255, 255, 0.75);
  color: rgba(20, 20, 30, 0.70);
  padding: 6px 12px; /* ✅ Use padding instead of fixed height */
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.rec-comment-delete-btn:hover{
  background: rgba(255, 107, 107, 0.10);
  border-color: rgba(255, 107, 107, 0.25);
  transform: translateY(-1px);
}
.rec-comment-report-btn:hover{
  background: rgba(107, 95, 255, 0.10);
  border-color: rgba(107, 95, 255, 0.22);
  transform: translateY(-1px);
}

.rec-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.rr-input{
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(11,27,58,0.14);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  color: #0b1b3a;
  background: #fff;
}

.rr-input:focus{
  border-color: rgba(0,102,255,0.55);
  box-shadow: 0 0 0 4px rgba(0,102,255,0.10);
}

.rr-hint{
  font-size: 12px;
  color: rgba(11,27,58,0.55);
}

.rr-toggle-row{
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

/* Switch */
.rr-switch{
  position: relative;
  width: 54px;
  height: 32px;
  display: inline-block;
}

.rr-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.rr-slider{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(11,27,58,0.14);
  transition: 0.2s ease;
  cursor: pointer;
}

/* Make textarea match rr-input sizing */
.rr-textarea{
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.35;
}

/* Select sometimes looks different across browsers—this helps */
.rr-input select,
select.rr-input{
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(11,27,58,0.55) 50%),
    linear-gradient(135deg, rgba(11,27,58,0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.rr-input::placeholder,
.rr-textarea::placeholder {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  color: rgba(11,27,58,0.45);
}


.rr-input,
.rr-textarea,
select.rr-input {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.25;

  /* 🔑 fixes “weird typing” look */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  letter-spacing: -0.01em;
}

.rr-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
}

/* Hover overlay */
/* Overlay hidden by default */
.collection-card-overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

/* Show overlay on hover */
.collection-card:hover .collection-card-overlay{
  opacity: 1;
  pointer-events: auto;
}

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.rr-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
}

.rr-modal-card{
  width: min(560px, 92vw);
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
  position: relative;
  padding: 34px 34px 26px;
  text-align: center;
}

.rr-modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rr-modal-icon{
  width: 74px;
  height: 74px;
  border-radius: 22px;
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,102,255,0.12), rgba(194,122,255,0.14));
  border: 1px solid rgba(0,0,0,0.06);
}

.rr-modal-icon i{
  font-size: 26px;
  color: #000e33;
  opacity: 0.9;
}

.rr-modal-title{
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  color: #000e33;
  letter-spacing: -0.02em;
}


.modal-content {
  position: relative;
  background-color: white;
  margin: 80px auto;
  padding: 30px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}


/* Actions in top-right */
.collection-card-actions{
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 10px;
}

/* Action buttons (copy your rec-card-action vibe) */
.collection-card-action{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
}


.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.confirm-modal.active {
  display: flex;
}

.confirm-modal-content {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  text-align: center;
}

.confirm-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: #ff3b30;
}

.confirm-modal-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000e33;
}

.confirm-modal-message {
  margin: 0 0 28px;
  font-size: 1rem;
  color: #000e33;
  opacity: 0.7;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-delete-btn,
.confirm-cancel-btn {
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.confirm-delete-btn {
  background: #ff3b30;
  color: white;
}

.confirm-delete-btn:hover {
  background: #e02d21;
  box-shadow: 0 8px 20px rgba(255, 59, 48, 0.3);
}

.confirm-cancel-btn {
  background: transparent;
  border: 1px solid rgba(0, 14, 51, 0.2);
  color: #000e33;
}

.confirm-cancel-btn:hover {
  background: rgba(0, 14, 51, 0.05);
}

@media (max-width: 480px) {
  .confirm-modal-content {
    padding: 24px;
  }

  .builder-title-input-wrapper {
    white-space: wrap;
    width: 50%;
  }
  .confirm-modal-actions {
    flex-direction: column-reverse;
  }

  .confirm-delete-btn,
  .confirm-cancel-btn {
    width: 100%;
    justify-content: center;
  }
}

.collection-owner-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collection-owner-name-row .creator-badge {
  font-size: 10px;
  padding: 3px 6px;
}

 .creator-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
  }
  .creator-badge i {
    font-size: 10px;
  }
  .guest-nav-actions {
  display: none; /* hidden by default; shown for guests below */
  align-items: center;
  gap: 10px;
}

body:not(.authenticated) .guest-nav-actions {
  display: flex;
}

.guest-login-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.guest-login-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.guest-signup-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.guest-signup-btn:hover {
  box-shadow: 0 0 12px rgba(194, 122, 255, 0.6),
              0 0 6px rgba(0, 102, 255, 0.6);
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

  /* Number badge for itinerary - positioned NEXT to the thumbnail */
.place-card-number-badge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: #4b5bd5;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid white;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Numbered badge for recs grid cards - ON the image */
.rec-thumb-number {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: #4b5bd5;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
  border: 2px solid white;
}

/* Make sure the thumb is positioned relative for rec cards */
.rec-thumb {
  position: relative;
}

/* ═══════════════════════════════════════════════════════════
   MAP VIEW TOGGLE BUTTON
   ═══════════════════════════════════════════════════════════ */

.map-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.map-view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   FULL MAP MODE — hides left panel, map already fills all
   ═══════════════════════════════════════════════════════════ */

.builder-container.full-map-mode .panel-left {
  transform: translateX(-100%);
}

.builder-container.full-map-mode .panel-center {
  left: 0;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - mobile stacks panels vertically
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .builder-container {
    height: auto;
    min-height: 100vh;
  }

  .builder-panels {
    position: relative;
    height: 100vh;
  }

  .panel-left {
    width: 100%;
    bottom: auto;
    max-height: 55vh;
  }

  .panel-center {
    top: 55vh;
    inset: 55vh 0 0 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   MAP PLACE PREVIEW CARD
   ═══════════════════════════════════════════════════════════ */


.map-place-preview {
  position: absolute;
  bottom: 24px;
  left: 20px; /* default spacing from map edge */
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.10);
  padding: 14px 16px;
  min-width: 320px;
  max-width: 420px;
  animation: previewSlideUp 0.2s ease;
  transition: left 0.3s ease;
}

.panel-left.collapsed ~ .panel-center .map-place-preview {
  left: calc(48px + 16px);
}

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

.map-preview-img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #e5e7eb center/cover no-repeat;
  flex-shrink: 0;
}

.map-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.map-preview-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-preview-address {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-preview-meta {
  font-size: 12px;
  color: #374151;
  margin-top: 2px;
}

.map-preview-meta a {
  color: #4b5bd5;
  text-decoration: none;
}

.map-preview-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.map-preview-info-btn:hover { opacity: 0.85; }

.map-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 14px;
  padding: 2px 5px;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.map-preview-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.builder-container {
  height: calc(100vh - 80px);
  overflow: hidden;
}

.builder-panels {
  position: relative;
  height: 100%;
  min-height: 0;
}

.panel-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 640px;
  overflow-y: auto;
  z-index: 2;
}

.panel-center {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 640px;
  z-index: 0;
  display: block !important;
  min-height: 0;
  background: #1a2332;
}

#map.map-view {
  width: 100%;
  height: 100% !important;
  min-height: 0;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — phone-optimized layout
   Overrides the absolute-positioned desktop rules above.
   Map pinned at top; itinerary scrolls below.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Let the page scroll naturally; clip only horizontal overflow */
  .builder-container {
    height: auto;
    min-height: 100svh;
    overflow-y: visible;
    overflow-x: clip;
  }

  /* Switch from absolute-overlay to flex column */
  .builder-panels {
    position: relative;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  /* Map at top with a visible fixed height */
  .panel-center {
    position: relative;
    width: 100%;
    height: 42vh;
    min-height: 220px;
    left: auto;
    top: auto;
    right: auto;
    bottom: auto;
    order: 1;
    z-index: 1;
    display: block !important;
  }

  /* Itinerary panel below the map, scrolls with the page */
  .panel-left {
    position: relative;
    width: 100%;
    height: auto;
    left: auto;
    top: auto;
    bottom: auto;
    max-height: none;
    overflow: visible;
    order: 2;
    z-index: 2;
  }

  /* Prevent collapsed state from hiding everything on mobile */
  .panel-left.collapsed {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .panel-left.collapsed .panel-content,
  .panel-left.collapsed .panel-header-left {
    display: flex !important;
  }

  .panel-left.collapsed .builder-top-header {
    display: block !important;
  }

  /* Map fills its container */
  #map.map-view {
    height: 100% !important;
    min-height: 220px;
  }

  /* Hide desktop-only collapse/expand controls */
  .panel-toggle,
  .panel-expand-arrow,
  .map-expand-btn,
  .map-view-toggle-btn {
    display: none !important;
  }

  /* Map place preview: full width on narrow screens */
  .map-place-preview {
    left: 8px;
    right: 8px;
    bottom: 10px;
    min-width: 0;
    max-width: none;
    width: calc(100% - 16px);
    box-sizing: border-box;
  }

  /* Suppress decorative footer glow that bleeds upward */
  .rr-footer::before {
    display: none;
  }
}

/* Hide guest nav on mobile — placed last to override earlier rules */
@media (max-width: 768px) {
  .guest-nav-left,
  body:not(.authenticated) .guest-nav-left { display: none !important; }
  .guest-nav-actions,
  body:not(.authenticated) .guest-nav-actions { display: none !important; }
}

/* Show Sign Up button inside guest mobile menu for non-auth users */
body:not(.authenticated) .guest-mobile-menu .create-btn { display: block !important; }
