/**
 * Rekenhulp modal — styles
 *
 * Used by the cbv_enqueue_rekenhulp() helper.
 * Follows WooCommerce colour conventions; primary button inherits site .button styles.
 *
 * @package containerbakverhuur
 */

/* Hide helper — controls [hidden] attribute */
[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------------------
 * Overlay
 * ------------------------------------------------------------------------- */
.cbv-rh-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

/* ---------------------------------------------------------------------------
 * Modal box
 * ------------------------------------------------------------------------- */
.cbv-rh-modal {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 8px 32px rgba( 0, 0, 0, 0.18 );
	max-width: 600px;
	width: 100%;
	padding: 40px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

/* Close button */
.cbv-rh-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 4px 8px;
}

.cbv-rh-close:hover {
	color: #000;
}

/* Title */
.cbv-rh-modal h2 {
	margin: 0 0 24px;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.25;
	color: #112e51;
	padding-right: 32px; /* don't overlap close button */
}

/* ---------------------------------------------------------------------------
 * Unit toggle
 * ------------------------------------------------------------------------- */
.cbv-rh-unit-toggle {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.cbv-rh-unit-toggle label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-weight: normal;
}

/* ---------------------------------------------------------------------------
 * Inputs grid
 * ------------------------------------------------------------------------- */
.cbv-rh-inputs {
	display: grid;
	gap: 12px;
	margin-bottom: 8px;
}

.cbv-rh-inputs label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.cbv-rh-inputs input[type="number"] {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 1rem;
	box-sizing: border-box;
}

.cbv-rh-inputs input[type="number"].cbv-rh-input-error {
	border-color: #e00;
}

.cbv-rh-error {
	color: #c00;
	font-size: 0.875rem;
	margin: 4px 0 0;
}

/* ---------------------------------------------------------------------------
 * Calculate button
 * ------------------------------------------------------------------------- */
/* High specificity so site-wide .button rules can't override the spacing. */
.cbv-rh-modal .cbv-rh-calculate {
	display: block;
	width: 100%;
	margin: 32px 0 0;
	padding: 14px 24px;
	background-color: #112e51;
	color: #fdce07;
	border: 2px solid #fdce07;
	border-radius: 5px;
	font-weight: bold;
	font-style: normal;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1.4;
}

.cbv-rh-modal .cbv-rh-calculate:hover,
.cbv-rh-modal .cbv-rh-calculate:focus {
	background-color: #fdce07;
	color: #112e51;
}

/* ---------------------------------------------------------------------------
 * Result area
 * ------------------------------------------------------------------------- */
.cbv-rh-result {
	margin-top: 20px;
	border-top: 1px solid #eee;
	padding-top: 16px;
}

.cbv-rh-volume {
	font-weight: 600;
	margin: 0 0 8px;
}

/* Recommendation — success style */
.cbv-rh-aanbeveling {
	background: #f0f7f0;
	border-left: 4px solid #4a9e4a;
	padding: 14px 16px;
	margin-top: 12px;
	border-radius: 0 3px 3px 0;
}

.cbv-rh-aanbeveling p {
	margin: 0 0 10px;
}

.cbv-rh-aanbeveling p:last-child {
	margin: 0;
}

/* Already-on-this-product confirmation */
.cbv-rh-on-product {
	background: #e6f4ea;
	border-left: 4px solid #1e8e3e;
	padding: 14px 16px;
	margin-top: 12px;
	border-radius: 0 3px 3px 0;
	color: #0b3a17;
	font-weight: 600;
}

.cbv-rh-on-product::before {
	content: "\2713\00a0";
	color: #1e8e3e;
	font-weight: bold;
}

.cbv-rh-on-product p {
	margin: 0;
	display: inline;
}

/* Ga-naar-product CTA — link styled like the primary button */
.cbv-rh-go-link {
	display: inline-block;
	padding: 10px 18px;
	background-color: #112e51;
	color: #fdce07;
	border: 2px solid #fdce07;
	border-radius: 5px;
	font-weight: bold;
	text-decoration: none;
	font-size: 0.95rem;
	transition: background-color 0.15s, color 0.15s;
}

.cbv-rh-go-link:hover,
.cbv-rh-go-link:focus {
	background-color: #fdce07;
	color: #112e51;
	text-decoration: none;
}

/* No-category notice */
.cbv-rh-no-cat {
	background: #f5f5f5;
	border-left: 4px solid #aaa;
	padding: 12px 16px;
	margin-top: 12px;
	border-radius: 0 3px 3px 0;
}

.cbv-rh-no-cat p {
	margin: 0;
}

/* Overflow notice — warning style */
.cbv-rh-overflow {
	background: #fff8e1;
	border-left: 4px solid #f4b400;
	padding: 12px 16px;
	margin-top: 12px;
	border-radius: 0 3px 3px 0;
}

.cbv-rh-overflow p {
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * Trigger button — link-style appearance
 * ------------------------------------------------------------------------- */
.cbv-rh-link-style {
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	font-size: inherit;
	padding: 0;
	text-decoration: underline;
}

.cbv-rh-link-style:hover {
	opacity: 0.75;
}

.cbv-rh-trigger-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 0.9em;
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------- */
@media ( max-width: 520px ) {
	.cbv-rh-modal {
		padding: 20px 16px;
		max-height: 95vh;
	}
}
