/* ===================== GLOBAL ===================== */

body {
  font-family: "Plus Jakarta Sans", sans-serif !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f7f8fc;
}

main {
  flex: 1;
}

/* ===================== FILTER BAR ===================== */

.filter-bar {
  background: white;
  padding: 1.1rem 1.5rem;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #f4f6fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  transition: 0.25s;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.filter i {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.filter:hover {
  transform: translateY(-3px);
  background: #eef2ff;
}

.filter.active {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 15px 35px rgba(79,70,229,0.5);
}

/* ===================== TAX TOGGLE ===================== */

.tax-toggle-container {
  background: #f8fafc;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 240px;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.tax-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.tax-switch {
  position: relative;
  width: 48px;
  height: 24px;
}

.tax-switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  background: #c7c9d1;
  border-radius: 20px;
  cursor: pointer;
  transition: .4s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: .4s;
}

.tax-switch input:checked + .slider {
  background: #4f46e5;
}

.tax-switch input:checked + .slider:before {
  transform: translateX(24px);
}

/* ===================== CARDS ===================== */

.card {
  border: none !important;
  border-radius: 20px !important;
  overflow: hidden;
}

.listing-card {
  box-shadow: 0 20px 45px rgba(0,0,0,0.15);
  transition: 0.25s ease;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

.card-img-top {
  height: 16rem !important;
  object-fit: cover !important;
}

.listing-title {
  font-weight: 600;
  font-size: 1rem;
}

.listing-location {
  font-size: 0.8rem;
  color: gray;
}

.listing-chip {
  background: #eef2ff;
  color: #4f46e5;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  margin-left: 6px;
}

.listing-link {
  text-decoration: none;
  color: inherit;
}

/* ===================== BUTTONS ===================== */

.add-btn,
.edit-btn {
  background: #4f46e5 !important;
  border: none !important;
  color: white !important;
}

.add-btn:hover,
.edit-btn:hover {
  background: #4338ca !important;
}

/* ===================== SHOW PAGE ===================== */

.show-img {
  height: 40vh;
  object-fit: cover;
  border-radius: 20px;
}

/* ===================== REVIEWS ===================== */

.review-card {
  background-color: white;
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,0.03);
  transition: .25s;
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.review-stars {
  color: #f5b800;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

/* ===================== EMPTY STATE ===================== */

.empty-state {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

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

@media (max-width: 768px) {

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }
}
/* ========================= MAP CONTAINER ========================= */

#map {
  height: 420px;
  width: 100%;
  border-radius: 25px;
  overflow: hidden;
  position: relative;

  /* Premium glass look */
  box-shadow: 0 30px 65px rgba(0,0,0,0.25);
  border: 2px solid rgba(255,255,255,0.45);
  background: #0f172a;
}

/* ========================= LUXURY MARKER ========================= */

.custom-marker {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #4f46e5, #1e1b4b);
  border-radius: 50%;
  border: 3px solid white;

  box-shadow: 0 0 0 0 rgba(79,70,229,0.7);
  animation: pulse 2s infinite;
}

/* Pulse animation */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79,70,229,0.7);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(79,70,229,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79,70,229,0);
  }
}

/* ========================= DISTANCE UI ========================= */

.distance-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  z-index: 999;
  backdrop-filter: blur(8px);

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* ========================= GLASS POPUP ========================= */

.maptiler-popup-content {
  background: rgba(20, 20, 40, 0.85) !important;
  color: #fff !important;
  border-radius: 16px !important;
  padding: 15px !important;

  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.map-popup h6 {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.map-popup p {
  font-size: 0.75rem;
  margin: 0;
  color: #c7d2fe;
}

/* ========================= ROUTE LINE STYLE ========================= */

.mapboxgl-line-layer,
.maplibregl-line-layer {
  filter: drop-shadow(0 0 5px #4f46e5);
}

/* ========================= MOBILE MAP ========================= */

@media(max-width: 768px) {
  #map {
    height: 320px;
    border-radius: 18px;
  }

  .distance-badge {
    font-size: 0.7rem;
    padding: 8px 14px;
  }
}
/* ===== MODERN AI DESCRIPTION BOX ===== */
.ai-textarea-wrapper {
  position: relative;
  background: #f9fafb;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  transition: 0.2s ease;
}

.ai-textarea-wrapper:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.ai-textarea-wrapper textarea {
  width: 100%;
  border: none;
  resize: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* AI GENERATE BUTTON */
.ai-btn {
  border: none;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  padding: 6px 14px;
  font-size: 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 500;
}

.ai-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 15px rgba(79,70,229,0.4);
}

.ai-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
