/* Neokliniken – Bli uppringd CTA
   Palette from the Elementor kit: plum #57135A, magenta #981996 / #AC2FB6,
   turquoise #2DC0C0, headings #342237, boxes #F3F4EF. */

.neo-bu {
	--neo-bu-plum: #57135A;
	--neo-bu-magenta: #981996;
	--neo-bu-highlight: #AC2FB6;
	--neo-bu-turquoise: #2DC0C0;
	--neo-bu-heading: #342237;
	--neo-bu-content: #491F4A;
	--neo-bu-box: #F3F4EF;
	--neo-bu-divider: #E7E6E3;

	/* Overridable per instance via the max_width / margin_y shortcode atts. */
	--neo-bu-max-width: 1300px;
	--neo-bu-margin-y: clamp(32px, 6vw, 80px);

	box-sizing: border-box;

	/* Constrain to the Elementor kit's container width (1300px) and centre it,
	   so the block lines up with the rest of the page even when dropped into a
	   full-bleed section. */
	max-width: var(--neo-bu-max-width);
	margin-block: var(--neo-bu-margin-y);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 24px);

	container-type: inline-size;
}

.neo-bu *,
.neo-bu *::before,
.neo-bu *::after {
	box-sizing: border-box;
}

.neo-bu__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(24px, 4vw, 48px);
	align-items: center;
	padding: clamp(28px, 5vw, 56px);
	border-radius: 24px;
	overflow: hidden;
}

.neo-bu--dark .neo-bu__inner {
	background-image: linear-gradient(135deg, #57135A 0%, #7A1670 55%, #981996 100%);
	color: #fff;
}

.neo-bu--light .neo-bu__inner {
	background-color: var(--neo-bu-box);
	color: var(--neo-bu-content);
	border: 1px solid var(--neo-bu-divider);
}

/* ---------- Copy ---------- */

.neo-bu__eyebrow {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.neo-bu--dark .neo-bu__eyebrow {
	color: var(--neo-bu-turquoise);
}

.neo-bu--light .neo-bu__eyebrow {
	color: var(--neo-bu-magenta);
}

.neo-bu__title {
	display: flex;
	align-items: center;
	gap: 0.4em;
	margin: 0 0 14px;
	font-size: clamp(28px, 4.2vw, 44px);
	line-height: 1.1;
	color: inherit;
}

/* Sized in em so it tracks the heading, and inherits currentColor so it works
   in both variants. */
.neo-bu__icon {
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.neo-bu--dark .neo-bu__icon {
	color: var(--neo-bu-turquoise);
}

.neo-bu--light .neo-bu__icon {
	color: var(--neo-bu-magenta);
}

.neo-bu__text {
	margin: 0;
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.6;
	max-width: 46ch;
}

.neo-bu--dark .neo-bu__text {
	color: rgba(255, 255, 255, 0.86);
}

.neo-bu__points {
	padding: 0;
	display: grid;
	gap: 10px;
	font-size: 15px;
}

/* The7 also overrides ul margins, so the spacing above the list needs the same
   specificity as the list-style reset below — a plain .neo-bu__points margin
   computes to 0. */
.neo-bu ul.neo-bu__points {
	margin-top: clamp(22px, 2.4vw, 30px);
	margin-bottom: 0;
}

/* The7 forces list-style-type: disc on ul/li, so this needs to outrank it —
   otherwise the theme's bullet sits next to our checkmark. */
.neo-bu ul.neo-bu__points,
.neo-bu ul.neo-bu__points > li {
	list-style: none !important;
}

.neo-bu ul.neo-bu__points > li::marker {
	content: "" !important;
}

.neo-bu__points li {
	position: relative;
	padding-inline-start: 30px;
	line-height: 1.5;
}

.neo-bu__points li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.35em;
	width: 18px;
	height: 9px;
	border-inline-start: 2.5px solid var(--neo-bu-turquoise);
	border-bottom: 2.5px solid var(--neo-bu-turquoise);
	transform: rotate(-45deg);
	border-radius: 1px;
}

.neo-bu--light .neo-bu__points li::before {
	border-color: var(--neo-bu-magenta);
}

.neo-bu__phone {
	margin: 22px 0 0;
	font-size: 15px;
}

.neo-bu__phone a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Form card ---------- */

/* No card: the form sits straight on the panel. Only the inputs keep a solid
   fill, so they stay legible against the gradient. */
.neo-bu__form {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
}

.neo-bu__note {
	margin: 14px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	text-align: center;
}

.neo-bu--dark .neo-bu__note {
	color: rgba(255, 255, 255, 0.75);
}

.neo-bu--light .neo-bu__note {
	color: #6b5a6d;
}

.neo-bu__note a {
	color: inherit;
	text-decoration: underline;
}

.neo-bu--light .neo-bu__note a {
	color: var(--neo-bu-magenta);
}

/* ---------- Fluent Forms inside the card ---------- */

.neo-bu__form .fluentform .ff-el-group {
	margin-bottom: 14px;
}

.neo-bu__form .fluentform .ff-el-input--content input[type="text"],
.neo-bu__form .fluentform .ff-el-input--content input[type="tel"],
.neo-bu__form .fluentform .ff-el-form-control {
	width: 100%;
	height: 54px;
	padding: 0 16px;
	font-size: 16px; /* keeps iOS from zooming on focus */
	color: var(--neo-bu-heading);
	background: #fff;
	border: 1.5px solid var(--neo-bu-divider);
	border-radius: 12px;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.neo-bu__form .fluentform .ff-el-form-control:focus {
	border-color: var(--neo-bu-magenta);
	box-shadow: 0 0 0 3px rgba(152, 25, 150, 0.14);
	outline: none;
}

.neo-bu__form .fluentform .ff-el-form-control::placeholder {
	color: #8d8194;
	opacity: 1;
}

/* The phone field ships an intl-tel-input country dropdown. The flag sits in an
   absolutely positioned overlay, so the input needs room for it on the left —
   our own `padding: 0 16px` above would otherwise run the placeholder under it. */
.neo-bu__form .fluentform .iti {
	width: 100%;
}

.neo-bu__form .fluentform .iti input[type="tel"] {
	padding-left: 60px !important;
}

.neo-bu__form .fluentform .iti__selected-flag,
.neo-bu__form .fluentform .iti__flag-container:hover .iti__selected-flag {
	background: transparent;
	padding-left: 14px;
	border-radius: 12px 0 0 12px;
}

/* Labels sit on the panel now, not on a white card. */
.neo-bu__form .fluentform .ff-el-input--label,
.neo-bu__form .fluentform .ff-el-input--label label {
	font-weight: 600;
}

.neo-bu--dark .neo-bu__form .fluentform .ff-el-input--label,
.neo-bu--dark .neo-bu__form .fluentform .ff-el-input--label label {
	color: #fff;
}

.neo-bu--light .neo-bu__form .fluentform .ff-el-input--label,
.neo-bu--light .neo-bu__form .fluentform .ff-el-input--label label {
	color: var(--neo-bu-heading);
}

.neo-bu__form .fluentform .ff-btn-submit {
	width: 100%;
	height: 56px;
	font-size: 17px;
	font-weight: 700;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.neo-bu__form .fluentform .ff-btn-submit:hover {
	transform: translateY(-1px);
}

.neo-bu__form .fluentform .ff-el-is-error .ff-el-form-control {
	border-color: #c62828;
}

.neo-bu__form .fluentform .error,
.neo-bu__form .fluentform .text-danger {
	font-size: 13px;
}

/* Default Fluent Forms red is unreadable on the plum gradient. */
.neo-bu--dark .neo-bu__form .fluentform .error,
.neo-bu--dark .neo-bu__form .fluentform .text-danger {
	color: #FFD5D5;
}

.neo-bu__form .ff-message-success {
	text-align: center;
	border: 0;
	background: transparent;
	padding: 0;
}

.neo-bu__form .ff-message-success h3 {
	margin: 0 0 8px;
	font-size: 22px;
}

.neo-bu--dark .neo-bu__form .ff-message-success,
.neo-bu--dark .neo-bu__form .ff-message-success h3 {
	color: #fff;
}

.neo-bu--light .neo-bu__form .ff-message-success {
	color: var(--neo-bu-content);
}

.neo-bu--light .neo-bu__form .ff-message-success h3 {
	color: var(--neo-bu-plum);
}

/* ---------- Two columns once there is room ---------- */

@container (min-width: 860px) {
	.neo-bu__inner {
		grid-template-columns: 1.05fr 0.95fr;
		gap: clamp(40px, 5vw, 72px);
	}
}

/* Fallback for browsers without container queries. */
@supports not (container-type: inline-size) {
	@media (min-width: 900px) {
		.neo-bu__inner {
			grid-template-columns: 1.05fr 0.95fr;
			gap: 64px;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.neo-bu__form .fluentform .ff-btn-submit,
	.neo-bu__form .fluentform .ff-el-form-control {
		transition: none;
	}

	.neo-bu__form .fluentform .ff-btn-submit:hover {
		transform: none;
	}
}
