/* ===== MVP Features CSS — وين نروح بالرياض ===== */

/* ===== Feature 1: My Places Map ===== */
.my-places-map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius, 16px);
  overflow: hidden;
  margin: 20px 0;
  border: 2px solid var(--gold, #c9a84c);
  position: relative;
}

.my-places-map-container #my-places-map {
  width: 100%;
  height: 100%;
}

.my-places-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.my-places-toolbar .btn-share-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold, #c9a84c), var(--gold-dark, #b08d3a));
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.my-places-toolbar .btn-share-list:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.my-places-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.my-places-stat {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 12px;
  padding: 12px 20px;
  text-align: center;
  min-width: 120px;
}

.my-places-stat .stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold, #c9a84c);
}

.my-places-stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
}

/* My Places search/filter */
.my-places-filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
  align-items: center;
}

.my-places-search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid var(--border, #e8e0d4);
  border-radius: 12px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  background: var(--card-bg, #fff);
  color: var(--text, #1a1a1a);
  direction: rtl;
  transition: border-color 0.2s;
}

.my-places-search-input:focus {
  outline: none;
  border-color: var(--gold, #c9a84c);
}

.my-places-filter-select {
  padding: 10px 16px;
  border: 2px solid var(--border, #e8e0d4);
  border-radius: 12px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  background: var(--card-bg, #fff);
  color: var(--text, #1a1a1a);
  cursor: pointer;
  direction: rtl;
}

.my-places-filter-select:focus {
  outline: none;
  border-color: var(--gold, #c9a84c);
}

/* Shared list banner */
.shared-list-banner {
  background: linear-gradient(135deg, #0a1628, #1a2a4a);
  color: #fff;
  padding: 20px;
  border-radius: var(--radius, 16px);
  margin-bottom: 20px;
  text-align: center;
}

.shared-list-banner h3 {
  color: var(--gold, #c9a84c);
  margin-bottom: 8px;
}

.shared-list-banner p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.shared-list-banner .btn-save-shared {
  margin-top: 12px;
  background: var(--gold, #c9a84c);
  color: #0a1628;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Favorite Button v2 (for FilterEngine cards) ===== */
.fav-btn-v2 {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.4);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.fav-btn-v2:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.15);
}

.fav-btn-v2.is-fav {
  background: rgba(220,38,38,0.3);
  animation: favPulse 0.3s ease;
}

@keyframes favPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.card-v2-header {
  position: relative;
}

/* ===== Feature 2: Radar Chart (Deep Rating) ===== */
.radar-chart-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 8px;
  background: rgba(201,168,76,0.04);
  border-radius: 10px;
  border: 1px solid rgba(201,168,76,0.1);
}

.radar-chart-svg {
  flex-shrink: 0;
}

.radar-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  font-size: 0.72rem;
  color: var(--text-muted, #888);
}

.radar-labels .radar-label {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.radar-labels .radar-label-val {
  font-weight: 700;
  color: var(--gold, #c9a84c);
  font-size: 0.78rem;
}

[data-theme="dark"] .radar-chart-wrapper {
  background: rgba(201,168,76,0.06);
  border-color: rgba(201,168,76,0.12);
}

/* ===== Feature 3: Top 10 in Neighborhood ===== */
.top-neighborhood-section {
  margin: 24px 0 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(201,168,76,0.02));
  border-radius: var(--radius, 16px);
  border: 1px solid rgba(201,168,76,0.2);
}

.top-neighborhood-section h3 {
  font-size: 1.3rem;
  color: var(--gold, #c9a84c);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-place-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.top-place-item:hover {
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.top-place-item.rank-1 {
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
  border: 1px solid rgba(255,215,0,0.3);
}

.top-place-item.rank-2 {
  background: linear-gradient(135deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05));
  border: 1px solid rgba(192,192,192,0.3);
}

.top-place-item.rank-3 {
  background: linear-gradient(135deg, rgba(205,127,50,0.15), rgba(205,127,50,0.05));
  border: 1px solid rgba(205,127,50,0.3);
}

.top-place-item.rank-other {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e8e0d4);
}

.top-rank-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.rank-1 .top-rank-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,215,0,0.4);
}

.rank-2 .top-rank-badge {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #fff;
  box-shadow: 0 4px 12px rgba(192,192,192,0.4);
}

.rank-3 .top-rank-badge {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #fff;
  box-shadow: 0 4px 12px rgba(205,127,50,0.4);
}

.rank-other .top-rank-badge {
  background: var(--primary-light, #162040);
  color: var(--gold, #c9a84c);
}

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

.top-place-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.top-place-meta {
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  display: flex;
  gap: 10px;
  align-items: center;
}

.top-place-rating {
  font-weight: 800;
  color: var(--gold, #c9a84c);
  font-size: 1.1rem;
  flex-shrink: 0;
}

[data-theme="dark"] .top-neighborhood-section {
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(201,168,76,0.03));
}

[data-theme="dark"] .top-place-item.rank-other {
  background: var(--card-bg, #1c2333);
}

/* ===== Feature 4: Occasion Filter ===== */
.occasion-filter-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

.occasion-filter-section h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.occasion-filter-section .subtitle {
  color: var(--text-muted, #888);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: block;
}

.occasion-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.occasion-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 25px;
  border: 2px solid var(--border, #e8e0d4);
  background: var(--card-bg, #fff);
  color: var(--text, #1a1a1a);
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.occasion-btn:hover {
  border-color: var(--gold, #c9a84c);
  color: var(--gold, #c9a84c);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.15);
}

.occasion-btn.active {
  background: linear-gradient(135deg, var(--gold, #c9a84c), var(--gold-dark, #b08d3a));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

[data-theme="dark"] .occasion-btn {
  background: var(--card-bg, #1c2333);
  border-color: var(--border, #30363d);
  color: var(--text, #e6edf3);
}

[data-theme="dark"] .occasion-btn:hover {
  border-color: var(--gold, #c9a84c);
  color: var(--gold, #c9a84c);
}

.occasion-results {
  min-height: 100px;
}

.occasion-results .cards-grid-v2 {
  margin-top: 12px;
}

/* ===== Feature 5: New & Trending (Enhanced) ===== */
.trending-new-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px 0;
}

.trend-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.trend-tab {
  padding: 8px 18px;
  border-radius: 20px;
  border: 2px solid var(--border, #e8e0d4);
  background: transparent;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-light, #555);
}

.trend-tab.active {
  background: var(--gold, #c9a84c);
  color: #fff;
  border-color: var(--gold, #c9a84c);
}

[data-theme="dark"] .trend-tab {
  border-color: var(--border, #30363d);
  color: var(--text-light, #8b949e);
}

/* ===== Feature 6: Shareable Lists ===== */
.list-create-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.list-create-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.list-create-modal {
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 16px);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.list-create-modal-overlay.show .list-create-modal {
  transform: translateY(0);
}

.list-create-modal h3 {
  margin-bottom: 16px;
  color: var(--gold, #c9a84c);
}

.list-create-modal input,
.list-create-modal textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border, #e8e0d4);
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 12px;
  background: var(--card-bg, #fff);
  color: var(--text, #1a1a1a);
  direction: rtl;
}

.list-create-modal input:focus,
.list-create-modal textarea:focus {
  outline: none;
  border-color: var(--gold, #c9a84c);
}

.list-modal-search {
  position: relative;
  margin-bottom: 12px;
}

.list-modal-search input {
  margin-bottom: 0;
}

.list-modal-places {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 10px;
  margin-bottom: 12px;
}

.list-modal-place-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, #e8e0d4);
  cursor: pointer;
  transition: background 0.15s ease;
}

.list-modal-place-item:last-child {
  border-bottom: none;
}

.list-modal-place-item:hover {
  background: rgba(201,168,76,0.06);
}

.list-modal-place-item.selected {
  background: rgba(201,168,76,0.12);
}

.list-modal-place-item .place-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border, #e8e0d4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.list-modal-place-item.selected .place-check {
  background: var(--gold, #c9a84c);
  border-color: var(--gold, #c9a84c);
  color: #fff;
}

.list-modal-place-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.list-modal-place-meta {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
}

.list-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.list-modal-actions button {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-modal-actions .btn-cancel {
  background: transparent;
  border: 2px solid var(--border, #e8e0d4);
  color: var(--text, #1a1a1a);
}

.list-modal-actions .btn-create {
  background: linear-gradient(135deg, var(--gold, #c9a84c), var(--gold-dark, #b08d3a));
  color: #fff;
}

.list-modal-actions .btn-create:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Share link display */
.share-link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
}

.share-link-box input {
  flex: 1;
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  direction: ltr;
  text-align: left;
}

.share-link-box button {
  background: var(--gold, #c9a84c);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Selected count badge */
.selected-count-badge {
  background: var(--gold, #c9a84c);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 8px;
}

/* Shared list view */
.shared-list-grid {
  margin-top: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .my-places-map-container {
    height: 300px;
  }

  .my-places-stats {
    justify-content: center;
  }

  .occasion-btns {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .occasion-btn {
    flex-shrink: 0;
    font-size: 0.82rem;
    padding: 8px 16px;
  }

  .top-place-item {
    padding: 10px 12px;
  }

  .radar-chart-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .radar-labels {
    justify-items: center;
  }
}
