/* Renovlies Calculator – neemt het lettertype van het thema over */
.rvc {
	--rvc-btn-bg: #000;
	--rvc-btn-color: #fff;
	--rvc-radius: 6px;
	--rvc-border: #ddd;
	--rvc-error: #b3261e;
	margin: 0 0 20px;
	font-family: inherit;
}

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

/* Knoppen */
.rvc-toggle,
.rvc-calc {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 12px 16px;
	background: var(--rvc-btn-bg);
	color: var(--rvc-btn-color);
	border: 0;
	border-radius: var(--rvc-radius);
	font: inherit;
	font-size: 15px;
	line-height: 1.3;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.rvc-toggle {
	justify-content: space-between;
	gap: 12px;
	text-align: left;
}

.rvc-calc {
	justify-content: center;
	margin-top: 18px;
}

.rvc-toggle:hover,
.rvc-calc:hover {
	opacity: 0.85;
}

.rvc-toggle:focus-visible,
.rvc-calc:focus-visible {
	outline: 2px solid var(--rvc-btn-bg);
	outline-offset: 2px;
}

.rvc-toggle-icon {
	flex-shrink: 0;
	width: 9px;
	height: 9px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.3s ease, margin 0.3s ease;
}

.rvc.is-open .rvc-toggle-icon {
	margin-top: 4px;
	transform: rotate(225deg);
}

/* Uitklappen zonder vaste max-height */
.rvc-panel {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 0.4s ease, visibility 0s linear 0.4s;
}

.rvc.is-open .rvc-panel {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows 0.4s ease, visibility 0s;
}

.rvc-panel-inner {
	min-height: 0;
	overflow: hidden;
}

.rvc-body {
	margin-top: 12px;
	padding: 16px;
	border: 1px solid var(--rvc-border);
	border-radius: var(--rvc-radius);
	background: #fff;
}

.rvc-title {
	margin: 0 0 4px;
	font-size: 18px;
}

/* Velden */
.rvc-field {
	margin-top: 14px;
}

.rvc-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.rvc-input-wrap {
	position: relative;
}

.rvc .rvc-input-wrap input {
	width: 100%;
	margin: 0;
	padding: 10px 46px 10px 12px;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	-moz-appearance: textfield;
	appearance: textfield;
}

.rvc .rvc-input-wrap input::-webkit-outer-spin-button,
.rvc .rvc-input-wrap input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.rvc .rvc-input-wrap input:focus {
	border-color: var(--rvc-btn-bg);
	outline: none;
	box-shadow: 0 0 0 1px var(--rvc-btn-bg);
}

.rvc .rvc-input-wrap input[aria-invalid="true"] {
	border-color: var(--rvc-error);
	box-shadow: 0 0 0 1px var(--rvc-error);
}

.rvc .rvc-waste {
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	background-color: #fff;
	font: inherit;
}

.rvc .rvc-waste:focus {
	border-color: var(--rvc-btn-bg);
	outline: none;
	box-shadow: 0 0 0 1px var(--rvc-btn-bg);
}

.rvc-unit {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	color: #777;
	font-size: 13px;
	pointer-events: none;
}

.rvc-hint {
	margin: 6px 0 0;
	color: #666;
	font-size: 13px;
}

/* Resultaat */
.rvc-result {
	margin-top: 16px;
}

.rvc-result:empty {
	display: none;
}

.rvc-result.is-error {
	color: var(--rvc-error);
	font-weight: 600;
}

.rvc-result.is-success {
	padding: 12px 14px;
	border-radius: 4px;
	background: #f4f4f4;
}

.rvc-result-rolls {
	font-size: 20px;
	font-weight: 700;
}

.rvc-result-meta,
.rvc-result-qty {
	margin-top: 4px;
	color: #555;
	font-size: 13px;
}

/* Korte markering van het aantal-veld na berekenen */
@keyframes rvc-flash {
	0%, 100% { box-shadow: 0 0 0 0 transparent; }
	30% { box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.45); }
}

input.rvc-flash {
	animation: rvc-flash 1.4s ease;
}

@media (prefers-reduced-motion: reduce) {
	.rvc-panel,
	.rvc.is-open .rvc-panel,
	.rvc-toggle-icon {
		transition: none;
	}
	input.rvc-flash {
		animation: none;
	}
}
