/*
 * Hotel and BnB – Unclaimed Listings
 * Inherits the theme's fonts and text colour; only the button uses an accent colour,
 * taken from the theme's main colour unless one is set in the plugin settings.
 */

.hnbu-box {
	--hnbu-accent-resolved: var(--hnbu-accent, var(--wp--preset--color--primary, #1d5c4d));
	--hnbu-line: rgba(127, 127, 127, 0.28);
	--hnbu-soft: rgba(127, 127, 127, 0.07);
	box-sizing: border-box;
	margin: 0 0 2em;
	padding: 1.5em;
	border: 1px solid var(--hnbu-line);
	border-radius: 10px;
	background: var(--hnbu-soft);
	font: inherit;
	color: inherit;
}

.hnbu-box *,
.hnbu-box *::before,
.hnbu-box *::after {
	box-sizing: inherit;
}

.hnbu-box__intro {
	max-width: 62ch;
}

.hnbu-badge {
	display: inline-block;
	padding: 0.2em 0.65em;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.4;
	opacity: 0.8;
}

.hnbu-box__title {
	margin: 0.6em 0 0.3em;
	font-size: 1.35em;
	line-height: 1.25;
}

.hnbu-box__text {
	margin: 0;
	opacity: 0.85;
}

/* Contact details */
.hnbu-contact {
	margin-top: 1.4em;
	padding-top: 1.2em;
	border-top: 1px solid var(--hnbu-line);
}

.hnbu-contact__title {
	margin: 0 0 0.6em;
	font-size: 1em;
}

.hnbu-contact__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 0.8em 1.5em;
	margin: 0;
}

.hnbu-contact__list dt {
	font-size: 0.85em;
	opacity: 0.7;
}

.hnbu-contact__list dd {
	margin: 0.1em 0 0;
	overflow-wrap: anywhere;
}

/* Map */
.hnbu-map {
	margin-top: 1.2em;
}

.hnbu-map iframe {
	display: block;
	width: 100%;
	height: 260px;
	border: 1px solid var(--hnbu-line);
	border-radius: 8px;
}

.hnbu-map__link {
	display: inline-block;
	margin-top: 0.4em;
	font-size: 0.9em;
}

/* Claim and removal */
.hnbu-form {
	margin-top: 1.2em;
}

.hnbu-form > summary {
	list-style: none;
	cursor: pointer;
}

.hnbu-form > summary::-webkit-details-marker {
	display: none;
}

.hnbu-button {
	display: inline-block;
	padding: 0.75em 1.3em;
	border: 0;
	border-radius: 6px;
	background: var(--hnbu-accent-resolved);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.hnbu-button:hover {
	filter: brightness(1.08);
}

.hnbu-form[open] > summary.hnbu-button {
	background: transparent;
	color: inherit;
	padding-inline: 0;
}

.hnbu-textlink {
	display: inline-block;
	font-size: 0.9em;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	opacity: 0.8;
}

.hnbu-button:focus-visible,
.hnbu-textlink:focus-visible,
.hnbu-form__body :focus-visible {
	outline: 2px solid var(--hnbu-accent-resolved);
	outline-offset: 2px;
}

.hnbu-form__body {
	display: grid;
	gap: 0.9em;
	max-width: 34rem;
	margin-top: 0.9em;
	padding: 1.2em;
	border: 1px solid var(--hnbu-line);
	border-radius: 8px;
	background: var(--wp--preset--color--base, rgba(255, 255, 255, 0.6));
}

.hnbu-form__lead {
	margin: 0;
	font-size: 0.95em;
	opacity: 0.85;
}

.hnbu-field label {
	display: block;
	margin-bottom: 0.3em;
	font-size: 0.9em;
	font-weight: 600;
}

.hnbu-field input,
.hnbu-field select,
.hnbu-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.6em 0.7em;
	border: 1px solid var(--hnbu-line);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.hnbu-check {
	display: flex;
	gap: 0.6em;
	align-items: flex-start;
	font-size: 0.92em;
}

.hnbu-check input {
	margin-top: 0.25em;
}

.hnbu-button--submit {
	justify-self: start;
}

.hnbu-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Messages */
.hnbu-alert {
	margin: 1.2em 0 0;
	padding: 0.8em 1em;
	border-radius: 6px;
	border-left: 4px solid;
}

.hnbu-alert--ok {
	border-color: #2e7d4f;
	background: rgba(46, 125, 79, 0.1);
}

.hnbu-alert--error {
	border-color: #b3261e;
	background: rgba(179, 38, 30, 0.08);
}

.hnbu-attrib {
	margin: 1.4em 0 0;
	font-size: 0.8em;
	opacity: 0.7;
}

.hnbu-placeholder {
	object-fit: cover;
}

@media (max-width: 600px) {
	.hnbu-box {
		padding: 1.1em;
	}

	.hnbu-map iframe {
		height: 200px;
	}
}
