/* ==========================================================================
   ROBS MANCUSO - PLACES KNOWLEDGE BASE STYLESHEET
   ========================================================================== */

.places-view-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
}

/* Hero Header */
.places-hero-header {
  background: linear-gradient(135deg, #2A241F 0%, #1A1715 100%);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.places-hero-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(192, 90, 62, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.places-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--brand-gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.places-hero-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: #FAF6F0;
  margin-bottom: 0.6rem;
}

.places-hero-desc {
  font-size: 0.95rem;
  color: #D6C8B8;
  max-width: 680px;
  line-height: 1.55;
}

.places-hero-actions {
  flex-shrink: 0;
}

/* Toolbar & Filters */
.places-toolbar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.places-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.places-search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-tertiary);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.places-search-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 2.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.places-search-input:focus {
  outline: none;
  border-color: var(--brand-terracotta);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(192, 90, 62, 0.12);
}

#btn-clear-search {
  position: absolute;
  right: 0.75rem;
}

.places-filters-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.places-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.places-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.places-filter-select {
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg2+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7268' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 14px;
}

.places-filter-select:focus {
  outline: none;
  border-color: var(--brand-terracotta);
}

/* Stats Bar */
.places-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.places-counter-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.places-counter-text strong {
  color: var(--brand-terracotta);
}

/* Grid of Cards */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.place-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.place-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.place-card-image-box {
  position: relative;
  height: 190px;
  width: 100%;
  background-color: #E5DFD5;
  overflow: hidden;
}

.place-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.place-card:hover .place-card-img {
  transform: scale(1.04);
}

.place-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.place-category-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(28, 25, 23, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
}

.place-geo-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: var(--brand-dark);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.place-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.place-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.place-card-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.place-card-location i {
  width: 14px;
  height: 14px;
  color: var(--brand-terracotta);
  flex-shrink: 0;
}

.place-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.place-card-tip {
  background-color: var(--brand-sand-light);
  border-left: 3px solid var(--brand-gold);
  border-radius: 0 6px 6px 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #7A531C;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.place-tip-icon {
  width: 14px;
  height: 14px;
  color: var(--brand-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.place-card-link-wrap {
  margin-top: 0.25rem;
}

.place-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-terracotta);
  text-decoration: underline;
}

.place-card-link:hover {
  color: var(--brand-navy);
}

.place-card-footer {
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.btn-add-place-to-itinerary {
  font-size: 0.82rem;
  padding: 0.5rem 0.95rem;
}

.place-card-mini-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.place-card-mini-actions .btn-icon {
  width: 32px;
  height: 32px;
}

/* Quick Time Chips in Add Modal */
.quick-time-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-time-chip:hover {
  background: var(--brand-sand-light);
  border-color: var(--brand-gold);
  color: var(--brand-dark);
}

/* Empty State */
.places-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.places-empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--brand-sand-light);
  color: var(--brand-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .places-hero-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem 1.5rem;
  }

  .places-filters-row {
    flex-direction: column;
    align-items: stretch;
  }

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

/* Modal Overlay & Dialog Isolation for Places */
#place-modal-overlay,
#add-to-itinerary-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 15, 13, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.place-modal-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 100000;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
