/**
 * NLS Property Hub — multi-property enquiry basket.
 *
 * Uses the plugin's design tokens (assets/css/tokens.css) with literal
 * fallbacks, because this stylesheet is enqueued on its own and must not look
 * broken if the token sheet is absent on a given page.
 *
 * The toggle is positioned against `.nlsph-card`, which cards.css already makes
 * `position: relative` — it is a sibling of the card link, never inside it.
 */

/* ------------------------------------------------------------------ toggle */

.nlsph-basket-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.45em 0.9em;
	font: inherit;
	font-size: 0.85rem;
	line-height: 1.2;
	color: var(--nlsph-text, #1d2228);
	background: var(--nlsph-surface, #fff);
	border: 1px solid var(--nlsph-line, #d8dde3);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nlsph-basket-toggle:hover,
.nlsph-basket-toggle:focus-visible {
	border-color: var(--nlsph-accent, #0f7b6c);
	color: var(--nlsph-accent, #0f7b6c);
}

.nlsph-basket-toggle.is-added {
	background: var(--nlsph-accent, #0f7b6c);
	border-color: var(--nlsph-accent, #0f7b6c);
	color: #fff;
}

.nlsph-basket-toggle::before {
	content: "+";
	font-weight: 700;
}

.nlsph-basket-toggle.is-added::before {
	content: "\2713"; /* check mark */
}

/* On a card: pinned over the photo, clear of the New build / For rent badges,
   which cards.css places top-left. */
.nlsph-basket-toggle--card {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 2;
	font-size: 0.78rem;
	padding: 0.35em 0.75em;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* ------------------------------------------------------------------- panel */

.nlsph-basket {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 1000;
	font-size: 0.95rem;
	color: var(--nlsph-text, #1d2228);
}

/* Clear of the single-property mobile contact bar, which contact.js announces
   by adding this class to <body>. */
body.nlsph-has-contact-bar .nlsph-basket {
	bottom: 4.5rem;
}

.nlsph-basket__fab {
	display: inline-flex;
	align-items: center;
	padding: 0.7em 1.2em;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--nlsph-accent, #0f7b6c);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
	cursor: pointer;
}

.nlsph-basket__fab:focus-visible {
	outline: 2px solid var(--nlsph-text, #1d2228);
	outline-offset: 2px;
}

.nlsph-basket__drawer {
	position: absolute;
	right: 0;
	bottom: calc(100% + 0.6rem);
	width: min(24rem, calc(100vw - 2rem));
	max-height: min(32rem, calc(100vh - 6rem));
	overflow-y: auto;
	padding: 1rem;
	background: var(--nlsph-surface, #fff);
	border: 1px solid var(--nlsph-line, #d8dde3);
	border-radius: var(--nlsph-radius, 10px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.nlsph-basket__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.6rem;
}

.nlsph-basket__title {
	margin: 0;
	font-size: 1.05rem;
}

.nlsph-basket__close {
	padding: 0 0.3em;
	font-size: 1.5rem;
	line-height: 1;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.nlsph-basket__list {
	margin: 0 0 0.6rem;
	padding: 0;
	list-style: none;
}

.nlsph-basket__item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.6rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--nlsph-line, #eceff2);
}

.nlsph-basket__item-main {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.nlsph-basket__item-title {
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.nlsph-basket__item-title:hover {
	text-decoration: underline;
}

.nlsph-basket__item-meta {
	font-size: 0.82rem;
	color: var(--nlsph-muted, #5c666f);
	overflow-wrap: anywhere;
}

.nlsph-basket__remove {
	flex: 0 0 auto;
	padding: 0.2em 0.5em;
	font: inherit;
	font-size: 0.8rem;
	color: var(--nlsph-muted, #5c666f);
	background: none;
	border: 1px solid var(--nlsph-line, #d8dde3);
	border-radius: 6px;
	cursor: pointer;
}

.nlsph-basket__empty,
.nlsph-basket__note {
	margin: 0 0 0.6rem;
	font-size: 0.86rem;
	color: var(--nlsph-muted, #5c666f);
}

.nlsph-basket__note:empty {
	display: none;
	margin: 0;
}

/* -------------------------------------------------------------------- form */

.nlsph-basket__field {
	margin: 0 0 0.55rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.nlsph-basket__field label {
	font-size: 0.82rem;
	color: var(--nlsph-muted, #5c666f);
}

.nlsph-basket__field input,
.nlsph-basket__field textarea {
	width: 100%;
	padding: 0.5em 0.6em;
	font: inherit;
	color: inherit;
	background: var(--nlsph-surface, #fff);
	border: 1px solid var(--nlsph-line, #d8dde3);
	border-radius: 6px;
	box-sizing: border-box;
}

.nlsph-basket__consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin: 0 0 0.7rem;
	font-size: 0.8rem;
	line-height: 1.4;
}

.nlsph-basket__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.nlsph-basket__submit {
	flex: 1 1 10rem;
	padding: 0.65em 1em;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--nlsph-accent, #0f7b6c);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.nlsph-basket__submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.nlsph-basket__clear {
	padding: 0.65em 0.9em;
	font: inherit;
	color: var(--nlsph-muted, #5c666f);
	background: none;
	border: 1px solid var(--nlsph-line, #d8dde3);
	border-radius: 6px;
	cursor: pointer;
}

.nlsph-basket__status {
	margin: 0.6rem 0 0;
	font-size: 0.86rem;
}

.nlsph-basket__status[data-state="error"] {
	color: var(--nlsph-danger, #a4252b);
}

.nlsph-basket__status[data-state="success"] {
	color: var(--nlsph-accent, #0f7b6c);
}

.nlsph-basket__status:empty {
	display: none;
	margin: 0;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.nlsph-basket__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.nlsph-basket {
		right: 0.75rem;
		left: 0.75rem;
	}

	.nlsph-basket__drawer {
		width: auto;
		left: 0;
	}
}
