/* Basic layout */
html,
body,
#map {
  width: 100%;
  height: 100%;
  margin: 0;
}

.autocomplete-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 400px;
  z-index: 1002;
  border-radius: 8px;
}

/* Places list styling (Google Maps style) */
.places-list-container {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  display: none;
}

/* Standalone list styling (no header) */
.places-list-container.standalone {
  margin-top: 10px;
  border-radius: 8px;
}

.places-list-container.active {
  display: block;
}

.place-item {
  padding: 12px 16px;
  border-bottom: 1px solid #e8eaed;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

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

.place-item:hover {
  background-color: #f8f9fa;
  box-shadow: 0 1px 6px rgba(32, 33, 36, .28);
}

.place-item.selected {
  background-color: #f8f9fa;
  border-left: 4px solid #9aa0a6;
}

.place-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.place-header {
  width: 100%;
}

.place-bottom {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-end;
}

.place-title {
  font-weight: 600;
  color: #202124;
  font-size: 18px;
  line-height: 22px;
  margin-bottom: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.place-meta-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 16px;
}

.rating-stars {
  color: #fbbc04;
  font-size: 14px;
  line-height: 1;
  margin-right: 4px;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

.rating-number {
  font-weight: 500;
  color: #202124;
  margin-right: 2px;
  font-size: 14px;
}

.review-count {
  color: #70757a;
  margin-right: 2px;
  font-size: 14px;
}

.separator {
  color: #5f6368;
  margin: 0 4px;
  font-weight: 400;
}

.price-range {
  color: #5f6368;
  font-weight: 400;
}

.place-tags-container {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.tag-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-label {
  font-size: 9px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 1;
  min-height: 16px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #f1f3f4;
  color: #5f6368;
  font-size: 10px;
  font-weight: 500;
  border-radius: 12px;
  white-space: nowrap;
  border: none;
  flex-shrink: 0;
  line-height: 1;
  min-height: 16px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
}

/* Primary tags - Main blue theme for important info */
.tag-primary {
  background: #e8f0fe;
  color: #1565c0;
  box-shadow: 0 1px 2px rgba(21, 101, 192, 0.15);
}

/* Secondary tags - Subtle gray theme for additional info */
.tag-secondary {
  background: #f1f3f4;
  color: #5f6368;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
}

/* Facility tags - Special green theme for accessibility/important features */
.tag-facility {
  background: #e8f5e8;
  color: #2e7d32;
  box-shadow: 0 1px 2px rgba(46, 125, 50, 0.15);
}

.place-address {
  color: #70757a;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  flex: 1;
}

.place-hours {
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  min-width: 120px;
  flex-shrink: 0;
}

.hours-label {
  color: #5f6368;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0px;
}

.hours-text {
  color: #202124;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category-specific styling */
.geoapify-category-item {
  background-color: #e8f4fd !important;
  border-left: 3px solid #007acc !important;
}

.geoapify-category-item:hover {
  background-color: #d0e8f7 !important;
}

.autocomplete-container {
  position: relative;
}

/* Theme selector styling */
.theme-selector {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1001;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  padding: 4px 8px 4px 12px;
  border-right: 1px solid #eee;
  background: #f8f9fa;
  border-radius: 4px 0 0 4px;
  white-space: nowrap;
}

.theme-selector select {
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  min-width: 100px;
  border-radius: 0 4px 4px 0;
}

.theme-selector select:focus {
  outline: none;
}

.theme-selector:hover {
  border-color: #007bff;
  box-shadow: 0 2px 12px rgba(0, 123, 255, 0.15);
}

/* Dark theme styles for the demo page */
body.theme-minimal-dark,
body.theme-round-borders-dark {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

/* Dark theme - theme selector */
body.theme-minimal-dark .theme-selector,
body.theme-round-borders-dark .theme-selector {
  background: #333;
  border-color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-minimal-dark .theme-label,
body.theme-round-borders-dark .theme-label {
  color: #bbb;
  background: #444;
  border-right-color: #555;
}

body.theme-minimal-dark .theme-selector select,
body.theme-round-borders-dark .theme-selector select {
  color: #e0e0e0;
}

body.theme-minimal-dark .theme-selector:hover,
body.theme-round-borders-dark .theme-selector:hover {
  border-color: #007bff;
  box-shadow: 0 2px 12px rgba(0, 123, 255, 0.2);
}

/* Dark theme adjustments for category panel */
body.theme-minimal-dark .autocomplete-panel,
body.theme-round-borders-dark .autocomplete-panel {
  background: rgba(40, 40, 40, 0.95);
}


/* Dark theme category items */
body.theme-minimal-dark .geoapify-category-item,
body.theme-round-borders-dark .geoapify-category-item {
  background-color: #2a3f4f !important;
  border-left: 3px solid #4a9eff !important;
  color: #e0e0e0 !important;
}

body.theme-minimal-dark .geoapify-category-item:hover,
body.theme-round-borders-dark .geoapify-category-item:hover {
  background-color: #34495e !important;
}

/* Dark theme places list */
body.theme-minimal-dark .places-list-container,
body.theme-round-borders-dark .places-list-container {
  background: #2d3748;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-minimal-dark .place-item,
body.theme-round-borders-dark .place-item {
  background-color: #2d2e30;
  border-bottom-color: #3c4043;
}

body.theme-minimal-dark .place-item:hover,
body.theme-round-borders-dark .place-item:hover {
  background-color: #1e293b;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}

body.theme-minimal-dark .place-item.selected,
body.theme-round-borders-dark .place-item.selected {
  background-color: #2d2e30;
  border-left-color: #9aa0a6;
}

body.theme-minimal-dark .place-title,
body.theme-round-borders-dark .place-title {
  color: #e8eaed !important;
}

body.theme-minimal-dark .rating-number,
body.theme-round-borders-dark .rating-number {
  color: #e8eaed;
}

body.theme-minimal-dark .review-count,
body.theme-round-borders-dark .review-count {
  color: #9aa0a6;
}

body.theme-minimal-dark .separator,
body.theme-round-borders-dark .separator {
  color: #9aa0a6;
}

body.theme-minimal-dark .price-range,
body.theme-round-borders-dark .price-range {
  color: #9aa0a6;
}

body.theme-minimal-dark .tag-label,
body.theme-round-borders-dark .tag-label {
  color: #9aa0a6;
}

body.theme-minimal-dark .tag-badge,
body.theme-round-borders-dark .tag-badge {
  background: #3c4043;
  color: #9aa0a6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Dark theme tag variants */
body.theme-minimal-dark .tag-primary,
body.theme-round-borders-dark .tag-primary {
  background: #1e3a8a;
  color: #93c5fd;
  box-shadow: 0 1px 2px rgba(30, 58, 138, 0.3);
}

body.theme-minimal-dark .tag-secondary,
body.theme-round-borders-dark .tag-secondary {
  background: #3c4043;
  color: #9aa0a6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.theme-minimal-dark .tag-facility,
body.theme-round-borders-dark .tag-facility {
  background: #14532d;
  color: #86efac;
  box-shadow: 0 1px 2px rgba(20, 83, 45, 0.3);
}

body.theme-minimal-dark .place-address,
body.theme-round-borders-dark .place-address {
  color: #9aa0a6;
}

body.theme-minimal-dark .place-hours,
body.theme-round-borders-dark .place-hours {
  color: #9aa0a6;
}

body.theme-minimal-dark .hours-label,
body.theme-round-borders-dark .hours-label {
  color: #9aa0a6;
}

body.theme-minimal-dark .hours-text,
body.theme-round-borders-dark .hours-text {
  color: #e8eaed;
}

/* Search here control */
.search-here-control {
  display: none;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1003;
  padding: 0;
  margin: 0;
}

.search-here-control.visible {
  display: block;
}

.search-here-button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cfd9e5;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .12);
  font-size: 13px;
}

.search-here-button:hover {
  background: #f7fbff;
}

/* Dark theme for control */
body.theme-minimal-dark .search-here-button,
body.theme-round-borders-dark .search-here-button {
  background: #2d2e30;
  border-color: #3a3a3a;
  color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

body.theme-minimal-dark .search-here-button:hover,
body.theme-round-borders-dark .search-here-button:hover {
  background: #383a3d;
}