/**
 * Location modal (design 2i).
 *
 * Styles the `c-location*` markup of the footer Interactivity API modal region
 * (LocationModal::render_modal) — a centred overlay for postcode capture.
 * Enqueued from source by LocationModal::boot().
 */

.c-location-modal__overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.55);
}

.c-location-modal {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.35);
}

.c-location-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: #f4f6f9;
	color: #6b7280;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.c-location-modal__close:hover {
	background: #e9edf3;
}

.c-location-modal__title {
	margin: 0 30px 8px 0;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #16181d;
}

.c-location-modal__body {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
}

.c-location__skip {
	display: block;
	width: 100%;
	margin-top: 14px;
	padding: 6px;
	border: 0;
	background: none;
	color: #6b7280;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
}

.c-location__skip:hover {
	color: #16181d;
}

.c-location__search {
	position: relative;
	margin-bottom: 12px;
}

.c-location__input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
	font-size: 15px;
	color: #16181d;
}

.c-location__input:focus {
	outline: 0;
	border-color: var(--wp--preset--color--primary, #1a5fe0);
}

.c-location__dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 2;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
	box-shadow: 0 12px 30px -12px rgba(9, 17, 45, 0.35);
}

.c-location__dropdown-item {
	padding: 9px 10px;
	border-radius: 8px;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
}

.c-location__dropdown-item:hover {
	background: #f4f6f9;
}

.c-location__current-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	justify-content: center;
	margin: 6px 0 12px;
	padding: 10px 14px;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
	background: #fff;
	color: #16181d;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.c-location__current-btn:hover {
	border-color: #c7dcff;
}

.c-location__stores {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.c-location__store-btn {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	text-align: left;
	padding: 12px 14px;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
}

.c-location__store-btn:hover,
.c-location__store-btn[aria-selected="true"] {
	border-color: var(--wp--preset--color--primary, #1a5fe0);
	background: #f5f8ff;
}

.c-location__store-name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-weight: 700;
	font-size: 14px;
	color: #16181d;
}

.c-location__store-distance {
	flex: none;
	font-weight: 600;
	font-size: 12px;
	color: #6b7280;
}

.c-location__store-address {
	font-size: 13px;
	color: #6b7280;
}

/* Postcode capture: full-width input then Save, stacked (#2353). */
.c-location__postcode-form {
	margin: 0;
}

.c-location__confirm {
	width: 100%;
	margin-top: 16px;
	padding: 12px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--wp--preset--color--primary, #1a5fe0);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
}

.c-location__confirm:hover,
.c-location__confirm:focus-visible {
	filter: brightness(1.08);
}

.c-location__confirm:disabled {
	opacity: 0.55;
	cursor: default;
}

.c-location__error {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fdecea;
	color: #b42318;
	font-size: 13px;
}

.c-location__loading,
.c-location__empty {
	margin: 12px 0 0;
	font-size: 14px;
	color: #6b7280;
	text-align: center;
}
