/* Hekwinkel – APF option tooltips
   Scoped to fields the plugin decorated (.hwt-cards). Colours follow the web concept. */

.hwt-cards {
	--hwt-primary: #2481b8;
	--hwt-text: #0c2333;
	--hwt-muted: #9fb3bf;
	--hwt-positive: #3fa84a;
	--hwt-border: #e2edf3;
	--hwt-bubble: #0c2333;
}

/* ----- card grid ----- */

.hwt-cards .hwt-cards__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

/* Hidden helper inputs APF puts next to the options must not take a grid cell */
.hwt-cards .hwt-cards__grid > input[type="hidden"] {
	display: none;
}

/* APF wraps each option in .wapf-checkable: let the card fill it */
.hwt-cards .hwt-cards__grid > .wapf-checkable {
	display: flex;
	margin: 0;
	padding: 0;
}

.hwt-cards .hwt-cards__grid > .wapf-checkable > .hwt-card {
	flex: 1 1 auto;
}

@media (max-width: 640px) {
	.hwt-cards .hwt-cards__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

/* APF's own custom radio circle: we draw ours on the right instead */
.hwt-cards .hwt-card .wapf-custom {
	display: none !important;
}

.hwt-cards .hwt-card {
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 !important;
	padding: 16px 16px 16px 18px !important;
	background: #fff;
	border: 1px solid var(--hwt-border);
	cursor: pointer;
	line-height: 1.3;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.hwt-cards .hwt-card:hover {
	border-color: rgba(36, 129, 184, .45);
}

.hwt-cards .hwt-card.is-checked {
	border-color: var(--hwt-primary);
	box-shadow: 0 0 0 1px var(--hwt-primary) inset;
}

/* Native radio: keep it accessible but draw our own circle on the right */
.hwt-cards .hwt-card input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	opacity: 0;
}

.hwt-cards .hwt-card::after {
	content: '';
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--hwt-border);
	background: #fff;
	box-sizing: border-box;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.hwt-cards .hwt-card.is-checked::after {
	border-color: #fff;
	background: var(--hwt-primary);
	box-shadow: 0 0 0 2px var(--hwt-primary);
}

.hwt-cards .hwt-card input[type="radio"]:focus-visible ~ *,
.hwt-cards .hwt-card:focus-within {
/*	outline: 2px solid var(--hwt-primary);
	outline-offset: 2px; */
}

/* Undo the theme's custom radio drawing, if it targets the option label */
.hwt-cards .hwt-card .wapf-swatch-label::after,
.hwt-cards .hwt-card .wapf-swatch-label::before {
	display: none !important;
}

/* ----- text block ----- */

.hwt-cards .hwt-card__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}


.hwt-cards .hwt-card__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.hwt-cards .hwt-card__label {
	font-size: 16px;
	font-weight: 500;
	color: var(--hwt-text);
}

.hwt-cards .hwt-card__sub {
	font-size: 13px;
	line-height: 1.2;
}

.hwt-cards .hwt-card__sub--positive {
	color: var(--hwt-positive);
}

.hwt-cards .hwt-card__sub--muted {
	color: var(--hwt-muted);
}

/* ----- tooltip ----- */

.hwt-tip {
	position: relative;
	display: inline-flex;
}

.hwt-tip__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hwt-bubble, #0c2333);
	color: #fff;
	font: 700 12px/1 sans-serif;
	cursor: help;
	appearance: none;
	-webkit-appearance: none;
}

.hwt-tip__button:hover,
.hwt-tip__button:focus-visible {
	background: var(--hwt-primary, #2481b8);
	outline: none;
}

.hwt-tip__bubble {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	z-index: 50;
	width: max-content;
	max-width: 240px;
	padding: 12px 14px;
	border-radius: 6px;
	background: var(--hwt-bubble, #0c2333);
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	transform: translateX(-50%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, visibility .15s ease;
}

.hwt-tip__bubble::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -7px;
	border: 7px solid transparent;
	border-top-color: var(--hwt-bubble, #0c2333);
}

.hwt-tip__bubble.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.hwt-tip__bubble a {
	color: #6cc3f5;
	text-decoration: underline;
}

.hwt-tip__bubble a:hover {
	color: #fff;
}
.hwt-cards .hwt-card__body .wapf-label-text{padding-left:0px;}

@media (max-width: 640px) {
	.hwt-tip__bubble {
		max-width: min(280px, calc(100vw - 32px));
	}
}

/* APF price hint inside the option label: show it as secondary text */
.hwt-cards .hwt-card__label .wapf-pricing-hint,
.hwt-cards .hwt-card__label .wapf-price-hint {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--hwt-muted);
}

/* Field instructions moved above the options (only on decorated fields) */
.hwt-cards .hwt-description--top {
	margin: 4px 0 16px;
}
