/*
 * BSM Domain Checker - search box styles.
 *
 * To restyle without editing this file, override the variables below in
 * Elementor: Site Settings > Custom CSS, for example:
 *
 *   .bsm-dc { --bsm-dc-accent: #0056a6; --bsm-dc-radius: 999px; }
 */

.bsm-dc {
	--bsm-dc-accent: #0056a6;
	--bsm-dc-accent-text: #ffffff;
	--bsm-dc-radius: 8px;
	--bsm-dc-max-width: 640px;
	--bsm-dc-field-bg: #ffffff;
	--bsm-dc-field-text: #1a1f2b;
	--bsm-dc-field-border: #6f7a8c;

	box-sizing: border-box;
	width: 100%;
	max-width: var(--bsm-dc-max-width);
	margin-inline: auto;
	font-family: inherit;
}

.bsm-dc--left {
	margin-inline: 0 auto;
}

.bsm-dc--right {
	margin-inline: auto 0;
}

.bsm-dc *,
.bsm-dc *::before,
.bsm-dc *::after {
	box-sizing: border-box;
}

.bsm-dc .bsm-dc__form {
	margin: 0;
}

.bsm-dc .bsm-dc__label {
	display: block;
	margin: 0 0 8px;
	font-weight: 600;
	color: inherit;
}

/* Hidden visually, still read out by screen readers. */
.bsm-dc .bsm-dc__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*
 * The input and button sit side by side when there is room and stack when
 * there is not. This responds to the width of the Elementor column the box is
 * placed in, not the width of the screen, so it works in narrow columns too.
 */
.bsm-dc .bsm-dc__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bsm-dc .bsm-dc__input {
	flex: 999 1 16rem;
	min-width: 0;
	width: auto;
	min-height: 52px;
	margin: 0;
	padding: 12px 16px;
	font: inherit;
	font-size: max(16px, 1rem); /* 16px minimum stops iOS zooming in on focus. */
	line-height: 1.4;
	color: var(--bsm-dc-field-text);
	background: var(--bsm-dc-field-bg);
	border: 1px solid var(--bsm-dc-field-border);
	border-radius: var(--bsm-dc-radius);
	box-shadow: none;
	appearance: none;
}

.bsm-dc .bsm-dc__input::placeholder {
	color: #5b6474;
	opacity: 1;
	text-overflow: ellipsis;
}

.bsm-dc .bsm-dc__button {
	flex: 1 0 auto;
	min-height: 52px;
	margin: 0;
	padding: 12px 28px;
	font: inherit;
	font-size: max(16px, 1rem);
	font-weight: 600;
	line-height: 1.4;
	color: var(--bsm-dc-accent-text);
	background: var(--bsm-dc-accent);
	border: 1px solid var(--bsm-dc-accent);
	border-radius: var(--bsm-dc-radius);
	cursor: pointer;
	transition: filter 0.15s ease;
}

.bsm-dc .bsm-dc__button:hover {
	color: var(--bsm-dc-accent-text);
	background: var(--bsm-dc-accent);
	filter: brightness(0.88);
}

/* Two-tone focus ring so it stays visible on light and dark page sections. */
.bsm-dc .bsm-dc__input:focus-visible,
.bsm-dc .bsm-dc__button:focus-visible {
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px #10141c;
}

.bsm-dc .bsm-dc__input[aria-invalid="true"] {
	border-color: #b3261e;
	border-width: 2px;
}

/* Boxed with its own background so it is readable on any page section. */
.bsm-dc .bsm-dc__message {
	margin: 8px 0 0;
	padding: 10px 14px;
	font-size: 0.9375rem;
	line-height: 1.4;
	text-align: left;
	color: #8c1d18;
	background: #fdeceb;
	border-left: 4px solid #b3261e;
	border-radius: 4px;
}

.bsm-dc .bsm-dc__message[hidden] {
	display: none;
}

.bsm-dc .bsm-dc__hint {
	margin: 8px 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: inherit;
}

/*
 * Live results panel. It has its own white background and dark text, so it
 * stays readable whatever colour the page section behind it is.
 */
.bsm-dc .bsm-dc__results {
	margin: 8px 0 0;
	padding: 6px 16px 12px;
	text-align: left;
	color: #1a1f2b;
	background: #ffffff;
	border: 1px solid #d5dae2;
	border-radius: var(--bsm-dc-radius);
	box-shadow: 0 8px 24px rgba(16, 20, 28, 0.12);
	transition: opacity 0.15s ease;
}

.bsm-dc .bsm-dc__results[hidden] {
	display: none;
}

.bsm-dc .bsm-dc__results.is-loading .bsm-dc__list,
.bsm-dc .bsm-dc__results.is-loading .bsm-dc__more {
	opacity: 0.45;
}

.bsm-dc .bsm-dc__summary {
	margin: 10px 0 4px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	color: #1a1f2b;
}

.bsm-dc .bsm-dc__summary--good {
	color: #0b6b2e;
}

.bsm-dc .bsm-dc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bsm-dc .bsm-dc__result {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	min-height: 56px;
	margin: 0;
	padding: 8px 0;
	border-top: 1px solid #e6e9ee;
	list-style: none;
}

.bsm-dc .bsm-dc__result:first-child {
	border-top: 0;
}

.bsm-dc .bsm-dc__name {
	flex: 1 1 10rem;
	min-width: 0;
	font-size: 1rem;
	line-height: 1.4;
	color: #1a1f2b;
	overflow-wrap: anywhere;
}

.bsm-dc .bsm-dc__name strong {
	font-weight: 700;
}

.bsm-dc .bsm-dc__result--taken .bsm-dc__name {
	color: #5b6474;
}

.bsm-dc .bsm-dc__price {
	flex: 0 0 auto;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	color: #1a1f2b;
	white-space: nowrap;
}

.bsm-dc .bsm-dc__per {
	margin-left: 2px;
	font-size: 0.8125rem;
	font-weight: 400;
	color: #4a5261;
}

.bsm-dc .bsm-dc__status {
	flex: 0 0 auto;
	padding: 3px 10px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 999px;
}

.bsm-dc .bsm-dc__result--available .bsm-dc__status {
	color: #0b6b2e;
	background: #e3f4e8;
}

.bsm-dc .bsm-dc__result--taken .bsm-dc__status {
	color: #a3211a;
	background: #fdeceb;
}

.bsm-dc .bsm-dc__action {
	flex: 0 0 auto;
	margin-left: auto; /* Sits at the right-hand edge, including when the row wraps on phones. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 96px;
	min-height: 40px;
	padding: 8px 16px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	color: var(--bsm-dc-accent-text);
	background: var(--bsm-dc-accent);
	border: 1px solid var(--bsm-dc-accent);
	border-radius: var(--bsm-dc-radius);
	transition: filter 0.15s ease;
}

.bsm-dc .bsm-dc__action:hover {
	color: var(--bsm-dc-accent-text);
	text-decoration: none;
	filter: brightness(0.88);
}

.bsm-dc .bsm-dc__action--secondary,
.bsm-dc .bsm-dc__action--secondary:hover {
	color: #1a1f2b;
	background: #ffffff;
	border-color: #6f7a8c;
}

.bsm-dc .bsm-dc__more {
	margin: 10px 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
}

.bsm-dc .bsm-dc__more:empty {
	display: none;
}

.bsm-dc .bsm-dc__more-link {
	color: #0a4a8c;
	text-decoration: underline;
}

.bsm-dc .bsm-dc__action:focus-visible,
.bsm-dc .bsm-dc__more-link:focus-visible {
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px #10141c;
	border-radius: var(--bsm-dc-radius);
}

@media (prefers-reduced-motion: reduce) {
	.bsm-dc .bsm-dc__button,
	.bsm-dc .bsm-dc__action,
	.bsm-dc .bsm-dc__results {
		transition: none;
	}
}
