/* All Places */
.places-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 16px 110px;
}

.places-header {
  margin-bottom: 24px;
}

.places-header h1 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 4px;
}

.places-header p {
  color: #6c757d;
  margin: 0;
}

.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.place-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.place-tile:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.place-tile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #f1f3f5;
}

.place-tile-nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e3f4f7, #f1f3f5);
  color: #8fc9d3;
  font-size: 40px;
}

.place-tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.place-tile-name {
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 6px;
}

.place-tile-name a {
  color: #212529;
  text-decoration: none;
}

/* Make the whole tile clickable */
.place-tile-name a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.place-tile:hover .place-tile-name a {
  color: #138496;
}

.place-tile-desc {
  font-size: 14px;
  color: #495057;
  margin: 0 0 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.place-tile-meta {
  margin-top: auto;
  font-size: 12px;
  color: #868e96;
}

.place-tile-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #dc3545;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.place-tile-delete:hover {
  background: #dc3545;
  color: #fff;
}

.places-pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.places-empty {
  color: #6c757d;
  padding: 48px 0;
  text-align: center;
}

@media (max-width: 575px) {
  .place-tile-photo {
    aspect-ratio: 16 / 9;
  }
}

/* Your Places */
.non-map .places-page {
  padding-top: 8px;
}

.places-count {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 12px;
  background: #e9ecef;
  color: #495057;
  font-size: 14px;
  font-weight: 500;
}

.place-tile-actions {
  position: relative;
  z-index: 1; /* above the whole-tile link */
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid #f1f3f5;
}

.place-tile-actions .btn {
  flex: 1;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.place-tile-action-delete:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.places-empty-state {
  text-align: center;
  padding: 56px 16px;
  border: 2px dashed #dee2e6;
  border-radius: 16px;
  color: #6c757d;
}

.places-empty-state h2 {
  font-size: 20px;
  font-weight: 500;
  color: #212529;
  margin: 14px 0 6px;
}

.places-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #e3f4f7;
  color: #138496;
  font-size: 28px;
}
