/**
 * Location search bar styles.
 *
 * @package TwoTwenty\Listings
 */

.twotwenty-location-search {
	margin: 0 0 1.5rem;
	font-family: inherit;
}

.twotwenty-location-search__form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: var(--twotwenty-bg-light, #f5f5f5);
	border: 1px solid var(--twotwenty-border, #ddd);
	border-radius: var(--twotwenty-radius, 8px);
	box-shadow: var(--twotwenty-shadow, 0 2px 8px rgba( 0, 0, 0, 0.1 ));
}

.twotwenty-location-search__icon {
	font-size: 1.1rem;
	line-height: 1;
	flex-shrink: 0;
}

.twotwenty-location-search__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	border: 1px solid var(--twotwenty-border, #ddd);
	border-radius: calc( var(--twotwenty-radius, 8px) - 4px );
	background: #fff;
	color: var(--twotwenty-secondary, #333);
}

.twotwenty-location-search__input:focus {
	outline: 2px solid var(--twotwenty-primary, #2D5F8A);
	outline-offset: 1px;
}

.twotwenty-location-search__submit {
	flex-shrink: 0;
	padding: 0.5rem 1rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #fff;
	background: var(--twotwenty-primary, #2D5F8A);
	border: 1px solid var(--twotwenty-primary, #2D5F8A);
	border-radius: calc( var(--twotwenty-radius, 8px) - 4px );
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.twotwenty-location-search__submit:hover,
.twotwenty-location-search__submit:focus {
	background: var(--twotwenty-accent, #E8913A);
	border-color: var(--twotwenty-accent, #E8913A);
}

.twotwenty-location-search__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

.twotwenty-location-search__summary {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: var(--twotwenty-secondary, #333);
}

.twotwenty-location-search__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.75rem;
	background: #fff;
	border: 1px solid var(--twotwenty-border, #ddd);
	border-radius: 999px;
}

.twotwenty-location-search__clear {
	color: var(--twotwenty-primary, #2D5F8A);
	text-decoration: none;
	font-weight: 500;
}

.twotwenty-location-search__clear:hover,
.twotwenty-location-search__clear:focus {
	text-decoration: underline;
}

.twotwenty-location-search-empty {
	padding: 1.5rem;
	text-align: center;
	background: var(--twotwenty-bg-light, #f5f5f5);
	border-radius: var(--twotwenty-radius, 8px);
}

@media ( max-width: 480px ) {
	.twotwenty-location-search__form {
		flex-wrap: wrap;
	}
	.twotwenty-location-search__input {
		flex: 1 1 100%;
		order: 2;
	}
	.twotwenty-location-search__submit {
		flex: 1 1 100%;
		order: 3;
	}
	.twotwenty-location-search__icon {
		order: 1;
	}
}
