/* =============================
   Places Feature Styles
   ============================= */

.place-selector-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border-light);
}

.place-selector-section > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.place-search-wrapper {
  position: relative;
  display: flex;
  gap: 0;
  margin-bottom: 8px;
}

.place-search-input {
  flex: 1;
  padding: 12px 48px 12px 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.place-search-input:focus {
  border-color: var(--primary);
  background: var(--bg-primary);
}

.place-add-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: #10b981;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.place-add-btn:hover {
  background: #059669;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.place-add-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.place-add-btn.hidden {
  display: none;
}

.place-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.place-search-results.hidden {
  display: none;
}

.place-search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--border-light);
}

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

.place-search-item:hover {
  background: var(--bg-primary);
}

.place-search-item.selected {
  background: rgba(139, 92, 246, 0.1);
}

.place-search-item-icon {
  font-size: 18px;
}

.place-search-item-name {
  flex: 1;
  color: var(--text-primary);
  font-size: 15px;
}

.place-search-item-check {
  color: var(--primary);
  font-size: 18px;
  font-weight: bold;
}

.place-search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.selected-places {
  margin-top: 12px;
}

.empty-places {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.place-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.place-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.place-tag:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.place-tag-icon {
  font-size: 16px;
}

.place-tag-name {
  color: var(--text-primary);
  font-weight: 500;
}

.place-tag-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.place-tag-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Places in details view */
.place-badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  font-size: 14px;
  margin-right: 8px;
  margin-bottom: 8px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.place-badge.clickable {
  cursor: pointer;
}

.place-badge.clickable:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.2);
}

.place-badge.clickable:active {
  transform: translateY(0);
}

/* Make the dropdown position work within modal */
.modal-body .place-search-wrapper {
  position: relative;
}

.modal-body .place-search-results {
  position: absolute;
  z-index: 10001;
}
