/* store-locator/assets/css/frontend.css */

/* Overlay */
.store-locator-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.store-locator-overlay.active {
	opacity: 1;
	visibility: visible;
}

:root {
	--sl-drawer-width: 420px;
	--sl-drawer-mobile-width: 100%;
}

/* Drawer */
.store-locator-drawer {
	position: fixed;
	top: 0;
	width: var(--sl-drawer-width);
	max-width: 100vw;
	height: 100vh;
	background: #fff;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	transition: right 0.3s ease, left 0.3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.store-locator-drawer.store-locator-position-left {
	left: calc(-1 * var(--sl-drawer-width));
	right: auto;
	box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}
.store-locator-drawer.store-locator-position-left.active {
	left: 0;
	right: auto;
}
.store-locator-drawer.store-locator-position-right {
	right: calc(-1 * var(--sl-drawer-width));
	left: auto;
	box-shadow: -2px 0 10px rgba(0,0,0,0.15);
}
.store-locator-drawer.store-locator-position-right.active {
	right: 0;
	left: auto;
}

@media (max-width: 768px) {
	.store-locator-drawer {
		width: var(--sl-drawer-mobile-width);
	}
	.store-locator-drawer.store-locator-position-left {
		left: calc(-1 * var(--sl-drawer-mobile-width));
		right: auto;
	}
	.store-locator-drawer.store-locator-position-left.active {
		left: 0;
		right: auto;
	}
	.store-locator-drawer.store-locator-position-right {
		right: calc(-1 * var(--sl-drawer-mobile-width));
		left: auto;
	}
	.store-locator-drawer.store-locator-position-right.active {
		right: 0;
		left: auto;
	}
}

/* Header */
.store-locator-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid #eee;
}
.store-locator-drawer-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #111;
}
.store-locator-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #555;
	padding: 0;
	line-height: 1;
	margin:0 !important;
}

/* Body */
.store-locator-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}
.store-locator-intro p {
	font-size: 14px;
	color: #666;
	margin-top: 0;
	margin-bottom: 20px;
}

/* Country Selector (Option C: Radio Buttons & Dropdown) */
.store-locator-country-selector {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.store-locator-country-option {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	user-select: none;
	position: relative;
	margin: 0;
	padding: 0;
}
.store-locator-country-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	pointer-events: none;
}
.store-locator-radio-custom {
	position: relative;
	width: 20px;
	height: 20px;
	border: 2.5px solid #222;
	border-radius: 50%;
	background-color: #fff;
	flex-shrink: 0;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.store-locator-country-option:hover .store-locator-radio-custom {
	border-color: #000;
}
.store-locator-country-option input[type="radio"]:focus-visible + .store-locator-radio-custom {
	box-shadow: 0 0 0 2px rgba(227, 24, 55, 0.35);
}
.store-locator-country-option input[type="radio"]:checked + .store-locator-radio-custom::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 9px;
	height: 9px;
	background-color: #e31837;
	border-radius: 50%;
	display: block;
}
.store-locator-country-label {
	line-height: 1.2;
}

/* Country Dropdown */
.store-locator-country-dropdown-wrap {
	margin-bottom: 18px;
}
.store-locator-select-wrapper {
	position: relative;
	width: 100%;
	display: block;
}
.store-locator-country-select,
.store-locator-drawer select.store-locator-country-select {
	display: block !important;
	width: 100% !important;
	height: 46px !important;
	min-height: 46px !important;
	max-height: 46px !important;
	line-height: 22px !important;
	padding: 11px 40px 11px 16px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	font-family: inherit !important;
	color: #1a1a1a !important;
	background-color: #f5f5f5 !important;
	background-image: none !important; /* Removes duplicate arrow from themes / Tailwind */
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	vertical-align: middle !important;
	margin: 0 !important;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.store-locator-country-select::-ms-expand {
	display: none !important;
}
.store-locator-country-select:focus,
.store-locator-drawer select.store-locator-country-select:focus {
	outline: none !important;
	border-color: #e31837 !important;
	background-color: #fff !important;
	box-shadow: 0 0 0 2px rgba(227, 24, 55, 0.15) !important;
}
.store-locator-select-arrow {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	z-index: 2;
}
.store-locator-select-arrow svg {
	display: block;
	width: 12px;
	height: 12px;
}

/* Search */
.store-locator-search-container {
	margin-bottom: 24px;
}
.store-locator-search-label {
	display: block;
	font-size: 12px;
	color: #666;
	margin-bottom: 8px;
}
.store-locator-search-input-wrapper {
	position: relative;
	margin-bottom: 12px;
	display: block;
}
.store-locator-search-input-wrapper input,
.store-locator-drawer input#store-locator-search-input {
	display: block !important;
	width: 100% !important;
	height: 46px !important;
	min-height: 46px !important;
	max-height: 46px !important;
	line-height: 22px !important;
	padding: 11px 40px 11px 16px !important;
	border: 1px solid #ddd !important;
	background-color: #f5f5f5 !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	font-family: inherit !important;
	color: #1a1a1a !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.store-locator-search-input-wrapper input:focus,
.store-locator-drawer input#store-locator-search-input:focus {
	outline: none !important;
	border-color: #999 !important;
	background-color: #fff !important;
	box-shadow: none !important;
}
.store-locator-search-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #333;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	z-index: 2;
}

.store-locator-btn-location {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: none;
	border: none;
	font-size: 13px;
	font-weight: 600;
	color: #111;
	cursor: pointer;
	padding: 8px 0;
}

/* "Use my location | Show map": spread across the row, all top-aligned */
.store-locator-search-actions {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
}

/* Reset theme button/link styles (margins, min-heights, line-heights) so the
   <button> and the <a> render as identical boxes and line up exactly. */
.store-locator-search-actions .store-locator-btn-location,
.store-locator-search-actions .store-locator-search-actions-sep {
	flex: 0 0 auto;
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 8px 0;
	font-size: 13px;
	line-height: 16px;
	vertical-align: top;
	box-shadow: none;
	/* Both labels in capitals, whether or not the theme uppercases <button>s */
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.store-locator-search-actions .store-locator-btn-location {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.store-locator-search-actions .store-locator-btn-location svg {
	flex: 0 0 16px;
	display: block;
	margin: 0;
}

.store-locator-search-actions-sep {
	display: block;
	color: #bbb;
	user-select: none;
}

a.store-locator-btn-map,
a.store-locator-btn-map:hover,
a.store-locator-btn-map:focus,
a.store-locator-btn-map:visited {
	color: #111;
	text-decoration: none;
}

a.store-locator-btn-map:hover {
	text-decoration: underline;
}

/* Results */
.store-locator-results {
	border-top: 1px solid #eee;
	padding-top: 24px;
}

/* Card */
.store-locator-card {
	padding-bottom: 24px;
	margin-bottom: 24px;
	border-bottom: 1px solid #eee;
}
.store-locator-card:last-child {
	border-bottom: none;
	margin-bottom: 0;
}
.store-locator-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}
.store-locator-name {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #111;
}
.store-locator-badge-premium {
	background: #111;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 4px;
	text-transform: uppercase;
}
.store-locator-address {
	font-size: 14px;
	color: #333;
	margin-bottom: 8px;
	line-height: 1.5;
}
.store-locator-contact {
	margin-bottom: 16px;
}
.store-locator-phone {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #333;
}
.store-locator-phone a {
	color: #333;
	text-decoration: none;
}
.store-locator-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.store-locator-btn-directions {
	font-size: 13px;
	font-weight: 600;
	color: #111;
	text-decoration: none;
	display: inline-block;
}
.store-locator-btn-select {
	background: #e31837;
	color: #fff;
	border: none;
	padding: 12px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	border-radius: 4px;
	cursor: pointer;
	width: 100%;
	transition: background 0.2s;
}
.store-locator-btn-select:hover {
	background: #c1122a;
}
.store-locator-btn-select.selected {
	background: #2e7d32;
	cursor: default;
}
.store-locator-btn-select.selected:hover {
	background: #2e7d32;
}
.store-locator-distance {
	font-size: 13px;
	color: #666;
	margin-bottom: 12px;
	font-weight: 600;
}

/* Footer */
.store-locator-drawer-footer {
	padding: 24px;
	border-top: 1px solid #eee;
}
.store-locator-btn-browse {
	width: 100%;
	background: #fff;
	border: 1px solid #111;
	color: #111;
	padding: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	line-height:1em;
}
.store-locator-btn-browse:hover {
	background: #f5f5f5;
}

/* Loading/Empty */
.store-locator-loading, .store-locator-empty {
	text-align: center;
	padding: 40px 0;
	color: #666;
}
.store-locator-spinner {
	width: 24px;
	height: 24px;
	border: 3px solid rgba(0,0,0,0.1);
	border-top-color: #111;
	border-radius: 50%;
	animation: storeLocatorSpin 1s linear infinite;
	margin: 0 auto 16px;
}
@keyframes storeLocatorSpin {
	to { transform: rotate(360deg); }
}

/* Pagination */
.store-locator-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px 0;
	gap: 15px;
	border-top: 1px solid #eee;
}
.store-locator-pagination a {
	padding: 8px 16px;
	background: #111;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 500;
	font-size: 14px;
	transition: background 0.2s;
}
.store-locator-pagination a:hover {
	background: #333;
}
.store-locator-page-info {
	font-size: 14px;
	color: #666;
}
