/* ---------- Front-end search widget ---------- */
.bcr-zip-search-widget {
	max-width: 480px;
	margin: 0 auto;
}

.bcr-zip-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.bcr-zip-input {
	flex: 1 1 220px;
	padding: 12px 14px;
	font-size: 16px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
}

.bcr-zip-submit {
	padding: 12px 22px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #D71B1B;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.bcr-zip-submit:hover {
	background: #BB2820;
}

.bcr-zip-submit.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.bcr-zip-error {
	margin-top: 8px;
	color: #b91c1c;
	font-size: 14px;
}

/* ---------- Popups ---------- */
.bcr-zip-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	z-index: 100000;
	padding: 20px;
}

/*
 * The overlay starts hidden via the HTML `hidden` attribute. Our own
 * `display: none` above is required because author stylesheets always
 * take priority over the browser's built-in `[hidden] { display: none }`
 * rule — without this, setting `display: flex` directly on `.bcr-zip-overlay`
 * would override that default and show the overlay immediately on page
 * load, before the button is ever clicked. JS only ever toggles the
 * `hidden` attribute; this selector is what turns that into a flex layout.
 */
.bcr-zip-overlay:not([hidden]) {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bcr-zip-popup {
	display: none;
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 420px;
	width: 100%;
	padding: 32px 28px;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.bcr-zip-popup.is-visible {
	display: block;
}

.bcr-zip-popup-icon {
	font-size: 42px;
	margin-bottom: 12px;
}

.bcr-zip-popup-message {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 12px;
	color: #111827;
}

.bcr-zip-popup-locations {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bcr-zip-popup-locations li {
	margin: 10px 0;
}

.bcr-zip-popup-location-btn {
	display: inline-block;
	padding: 10px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #fff !important;
	background: #D71B1B;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.bcr-zip-popup-location-btn:hover {
	background: #BB2820;
	color: #fff;
	text-decoration: none;
}

.bcr-zip-popup-location-name {
	display: inline-block;
	font-weight: 600;
	font-size: 15px;
	color: #111827;
}

.bcr-zip-popup-location-detail {
	display: block;
	font-weight: 400;
	color: #6b7280;
	font-size: 13px;
	margin-top: 4px;
}

.bcr-zip-popup-close {
	position: absolute;
	top: 5px;
	right: 5px;
	background: none;
	border: none;
	font-size: 40px;
	line-height: 0;
	cursor: pointer;
	color: #474747;
	height: 30px;
	width: 30px;
	padding: 0;
	background: transparent;
}

.bcr-zip-popup-close:hover {
    color: #ffffff;
    background: #d71b1b;
}
/* ---------- Unavailable popup ---------- */
.bcr-zip-popup-subtext {
	font-size: 15px;
	color: #4b5563;
	line-height: 1.5;
	margin: 0 0 20px;
}

.bcr-zip-popup-cta {
	display: inline-block;
	padding: 12px 28px;
	font-size: 16px;
	font-weight: 600;
	color: #fff !important;
	background: #D71B1B;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.bcr-zip-popup-cta:hover {
	background: #BB2820;
	color: #fff;
	text-decoration: none;
}

/* ---------- Admin page ---------- */
.bcr-zip-summary-cards {
	display: flex;
	gap: 16px;
	margin: 20px 0;
	flex-wrap: wrap;
}

.bcr-zip-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px 22px;
	min-width: 160px;
}

.bcr-zip-card-number {
	display: block;
	font-size: 24px;
	font-weight: 700;
	color: #D71B1B;
}

.bcr-zip-card-label {
	display: block;
	font-size: 13px;
	color: #64748b;
	margin-top: 4px;
}

.bcr-zip-upload-form {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 20px;
	max-width: 720px;
}

.bcr-zip-search-widget input#bcr-zip-1-input {
	border-width: 1px;
	border-radius: 5px;
	background-color: #ffffff;
	border-color: #ccc;
}
