/* Locations page template */
.locations-page {
	padding: 2rem 0 3rem;
}

.locations-page__inner {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1rem;
}

@media (min-width: 640px) {
	.locations-page__inner { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
	.locations-page__inner { padding: 0 2rem; }
}

.locations-page__header {
	margin-bottom: 2rem;
}

.locations-page__title {
	color: #003366;
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	font-weight: bold;
}

.locations-page__subtitle {
	color: #666;
	margin: 0;
}

.locations-page__search-wrap {
	position: relative;
	max-width: 42rem;
	margin-bottom: 1.5rem;
}

/* Hide native search clear (x) so we can use our own centered one */
.locations-page__search::-webkit-search-cancel-button,
.locations-page__search::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.locations-page__search[type="search"] {
	-webkit-appearance: none;
	appearance: none;
}

.locations-page__search {
	width: 100%;
	box-sizing: border-box;
	padding-left: 42px !important;
	padding-right: 2.75rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	font-size: 1rem;
	position: relative;
	z-index: 1;
	background-color: #fff;
}

.locations-page__search:focus {
	outline: none;
	border-color: #003366;
	box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.2);
}

.locations-page__search-icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.25rem;
	height: 1.25rem;
	opacity: 0.5;
	pointer-events: none;
	z-index: 2;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
}

.locations-page__search-icon svg {
	width: 100%;
	height: 100%;
}

.locations-page__search-clear {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #6b7280;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: color 0.15s, background 0.15s;
}

.locations-page__search-clear:hover {
	color: #374151;
	background: #f3f4f6;
}

.locations-page__search-clear:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.3);
}

.locations-page__search-clear svg {
	width: 100%;
	height: 100%;
}

.locations-page__search-clear[hidden] {
	display: none;
}

.locations-page__count {
	display: inline-block;
	background: #dc2626;
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: 0.5rem;
	margin-bottom: 2rem;
	font-weight: 600;
}

.locations-page__count--none {
	opacity: 0.7;
}

.locations-page__list {
	display: block;
}

.locations-city {
	margin-bottom: 3rem;
}

.locations-city__title {
	color: #003366;
	margin: 0 0 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e5e7eb;
	font-size: 28px;
	font-weight: 500;
}

.locations-city__grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.locations-city__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.locations-city__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.locations-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	padding: 1.5rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.2s;
}

.locations-card:hover {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.locations-card__title {
	color: #003366;
	margin: 0 0 1rem;
	font-size: 22px;
	font-weight: 500;
}

.locations-card__details {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.locations-card__row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: #374151;
	font-size: 18px;
}

.locations-card__row a {
	color: inherit;
}

.locations-card__row a:hover {
	color: #003366;
}

.locations-card__icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.125rem;
	opacity: 0.8;
	display: inline-flex;
	align-items: flex-start;
}

.locations-card__icon svg {
	width: 100%;
	height: 100%;
}

.locations-card__directions {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #dc2626;
	color: #fff;
	padding: 0.625rem 1.5rem;
	border-radius: 0.375rem;
	text-decoration: none;
	font-size: 1rem;
	transition: background 0.2s;
}

.locations-card__directions-icon {
	width: 20px;
	height: 20px;
}

.locations-card__directions:visited {
	color: #fff;
}

.locations-card__directions:hover {
	background: #b91c1c;
	text-decoration: none;
	color: #fff;
}

.locations-page__empty,
.locations-page__no-results {
	text-align: center;
	padding: 3rem 1rem;
	color: #6b7280;
}
