/* Gigatuin calculators — styled to the Figma design
   "Rekenmachine Voor Vierkante Meters".
   Brand colours from the Figma COLORS frame:
   green #81BB00, dark green #555F1A, black #121210. */

.gtc {
	--gtc-green: #81bb00;
	--gtc-green-dark: #555f1a;
	--gtc-black: #121210;
	--gtc-line: #e3e3e0;
	--gtc-muted: #6b6b66;

	background: #fff;
	border: 1px solid var(--gtc-line);
	border-radius: 10px;
	padding: 1.5rem;
	margin: 1.5rem 0;
	color: var(--gtc-black);
	max-width: 44rem;
	font-size: 15px;
	line-height: 1.45;

	/* Long Dutch labels must never spill outside the box. */
	box-sizing: border-box;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.gtc *,
.gtc *::before,
.gtc *::after {
	box-sizing: border-box;
	max-width: 100%;
}

/* The theme sets global h2/h3 typography that would otherwise blow these up to
   heading size, so sizes are pinned in px with high specificity. */
.gtc h2.gtc__title,
.gtc .gtc__title {
	margin: 0 0 1.15rem !important;
	font-size: 20px !important;
	line-height: 1.25 !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: .01em !important;
	color: var(--gtc-black) !important;
}

.gtc__block {
	padding-bottom: 1.1rem;
	margin-bottom: 1.1rem;
	border-bottom: 1px solid var(--gtc-line);
}

.gtc__block--last {
	border-bottom: 0;
	margin-bottom: .5rem;
}

.gtc h3.gtc__heading,
.gtc .gtc__heading {
	margin: 0 0 .3rem !important;
	font-size: 15px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: normal !important;
	color: var(--gtc-black) !important;
}

.gtc .gtc__intro {
	margin: 0 0 .8rem;
	font-size: 13px !important;
	line-height: 1.45 !important;
	color: var(--gtc-muted);
}

/* 4-column layout: name, length, width, remove */
.gtc__head,
.gtc__row {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 2rem;
	gap: .5rem;
	align-items: center;
}

.gtc .gtc__head {
	margin-bottom: .3rem;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.gtc__head em {
	color: #c00;
	font-style: normal;
}

.gtc__row {
	margin-bottom: .5rem;
}

.gtc .gtc__input {
	width: 100%;
	min-width: 0;
	padding: .55rem .65rem;
	border: 1px solid var(--gtc-line);
	border-radius: 6px;
	font-size: .88rem;
	background: #fff;
	color: var(--gtc-black);
	box-shadow: none;
}

.gtc .gtc__input::placeholder {
	color: #a5a5a0;
}

.gtc .gtc__input:focus {
	outline: 0;
	border-color: var(--gtc-green);
	box-shadow: 0 0 0 2px rgba(129, 187, 0, .18);
}

.gtc__input--custom {
	max-width: 100%;
	margin-top: .9rem;
}

.gtc .gtc__subtotal,
.gtc .gtc__total {
	margin: .25rem 0 .9rem;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.gtc .gtc__total {
	font-size: 15px !important;
	font-weight: 600;
}

/* The theme styles every <button> as a large green block, so the calculator's
   secondary controls need explicit resets to stay subtle. */
.gtc button.gtc__add,
.gtc button.gtc__add:hover,
.gtc button.gtc__add:focus {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	width: auto;
	max-width: 100%;
	min-width: 0;
	border: 1px solid var(--gtc-green);
	border-radius: 6px;
	background: #fff;
	color: var(--gtc-black);
	padding: .55rem 1rem;
	font-size: .85rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: uppercase;
	box-shadow: none;
	cursor: pointer;
	/* The theme sets nowrap on buttons, which pushed these long labels
	   ("Voeg het oppervlak toe om af te trekken") outside the container. */
	white-space: normal !important;
	text-align: left;
	overflow-wrap: anywhere;
	height: auto !important;
}

.gtc button.gtc__add:hover {
	background: rgba(129, 187, 0, .08);
}

.gtc__plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	border: 1.5px solid var(--gtc-green);
	color: var(--gtc-green);
	font-size: .85rem;
	line-height: 1;
}

/* Result rows hold "label ... value" pairs; the label must wrap rather than
   push the value out of the box. */
.gtc__row-out span { min-width: 0; }
.gtc__row-out strong,
.gtc__subtotal strong,
.gtc__total strong {
	flex: 0 0 auto;
	white-space: nowrap;
}

.gtc button.gtc__remove,
.gtc button.gtc__remove:hover,
.gtc button.gtc__remove:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	min-width: 0;
	min-height: 0;
	padding: 0;
	border: 1px solid var(--gtc-line);
	border-radius: 6px;
	background: #fff;
	color: #b00;
	font-size: 1.1rem;
	font-weight: 400;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.gtc button.gtc__remove:hover {
	background: #fdf2f2;
	border-color: #b00;
}

.gtc__radios {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .75rem;
}

.gtc__radio {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .9rem;
	cursor: pointer;
}

.gtc__radio input {
	accent-color: var(--gtc-green);
	width: 1.05rem;
	height: 1.05rem;
}

.gtc__results {
	margin: 0 0 1.25rem;
}

.gtc__row-out {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: .55rem 0;
	border-bottom: 1px solid var(--gtc-line);
	font-size: .95rem;
}

.gtc__row-out--total {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--gtc-green-dark);
	border-bottom: 0;
}

.gtc__actions {
	display: flex;
	justify-content: flex-end;
}

.gtc button.gtc__submit,
.gtc button.gtc__submit:hover,
.gtc button.gtc__submit:focus {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	width: auto;
	min-width: 0;
	border: 0;
	border-radius: 6px;
	background: var(--gtc-green);
	color: #fff;
	padding: .85rem 1.75rem;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .02em;
	box-shadow: none;
	cursor: pointer;
}

.gtc button.gtc__submit:hover {
	background: var(--gtc-green-dark);
}

/* Nothing to apply yet — visibly inactive, but still clickable so it can
   explain what is missing rather than doing nothing. */
.gtc button.gtc__submit.is-disabled {
	opacity: .5;
}

.gtc .gtc__head small {
	font-weight: 400;
	color: var(--gtc-muted);
	font-size: .85em;
}

.gtc__note {
	margin: .75rem 0 0;
	font-size: .78rem;
	color: var(--gtc-muted);
}

/* ---- "Help mij berekenen" trigger + modal (per the Figma design) ---- */

.gtc-trigger-wrap {
	margin: 1rem 0;
}

/* The theme animates and resizes buttons on hover, which made this one jump and
   flicker (shrinking, then re-expanding as the pointer re-entered). Every size
   related property is pinned identically across all states, and transforms and
   transitions are disabled, so only the colour changes on hover. */
.gtc button.gtc-trigger,
button.gtc-trigger,
button.gtc-trigger:hover,
button.gtc-trigger:focus,
button.gtc-trigger:active,
button.gtc-trigger:focus-visible {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	box-sizing: border-box;
	border: 1px solid #81bb00 !important;
	border-radius: 6px !important;
	background: #fff;
	color: #121210 !important;
	padding: .65rem 1.1rem !important;
	margin: 0;
	font-size: .9rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transform: none !important;
	scale: none !important;
	filter: none !important;
	animation: none !important;
	transition: background-color .15s ease !important;
	cursor: pointer;
}

button.gtc-trigger:hover,
button.gtc-trigger:focus-visible {
	background: rgba(129, 187, 0, .1) !important;
}

/* Some themes animate a pseudo-element behind the label; neutralise it. */
button.gtc-trigger::before,
button.gtc-trigger::after {
	content: none !important;
	display: none !important;
}

.gtc-trigger__icon {
	color: #81bb00;
}

.gtc-modal[hidden] {
	display: none;
}

.gtc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 2.5rem 1rem;
	overflow-y: auto;
}

.gtc-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(18, 18, 16, .55);
}

.gtc-modal__panel {
	position: relative;
	width: 100%;
	max-width: 46rem;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	box-sizing: border-box;
	overflow: hidden;
}

.gtc-modal__body .gtc {
	margin: 0;
	border: 0;
	max-width: none;
	padding-top: 2.75rem;
}

/* Theme button styling turns this into a green block, so it is fully pinned. */
button.gtc-modal__close,
button.gtc-modal__close:hover,
button.gtc-modal__close:focus,
button.gtc-modal__close:active {
	position: absolute !important;
	top: .5rem !important;
	right: .5rem !important;
	z-index: 2;
	width: 2.25rem !important;
	height: 2.25rem !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 2.25rem !important;
	padding: 0 !important;
	margin: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--gtc-line, #e3e3e0) !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #121210 !important;
	font-size: 22px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	box-shadow: none !important;
	transform: none !important;
	transition: background-color .15s ease !important;
	cursor: pointer;
}

button.gtc-modal__close:hover {
	background: rgba(129, 187, 0, .12) !important;
}

button.gtc-modal__close::before,
button.gtc-modal__close::after {
	content: none !important;
	display: none !important;
}

body.gtc-modal-open {
	overflow: hidden;
}

/* ---- "Ontvang een offerte": grout work enquiry form ---- */

.gtc-quote { max-width: 60rem; }

.gtc-quote__notice {
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border-radius: 6px;
	font-size: 14px;
}

.gtc-quote__notice--ok {
	background: rgba(129, 187, 0, .12);
	border: 1px solid var(--gtc-green);
	color: #2f4a00;
}

.gtc-quote__notice--error {
	background: #fdf2f2;
	border: 1px solid #d88;
	color: #8a1f1f;
}

.gtc-quote__field {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
}

.gtc .gtc-quote__label {
	display: block;
	margin: 0 0 .6rem;
	padding: 0;
	font-size: 15px !important;
	font-weight: 400;
	color: var(--gtc-grey-06, #5c5f5b);
}

.gtc-quote__req { color: var(--gtc-green, #81bb00); }

.gtc .gtc-quote__input {
	width: 100%;
	padding: 1rem 1.15rem;
	font-size: 15px;
	border: 1px solid var(--gtc-line, #d0d1d0);
	border-radius: 0;
	background: #fff;
}

.gtc .gtc-quote__input::placeholder { color: #aeb2ae; }

textarea.gtc-quote__input { min-height: 5rem; resize: vertical; }

/* Three columns on desktop, as designed; stacked on narrow screens. */
.gtc-quote__options {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .75rem;
}

.gtc-quote__option {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	font-size: 15px;
	line-height: 1.5;
	cursor: pointer;
	color: var(--gtc-grey-06, #5c5f5b);
}

.gtc-quote__option input {
	flex: 0 0 auto;
	margin: .25rem 0 0;
	accent-color: var(--gtc-green, #81bb00);
}

.gtc-quote__contact {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.gtc-quote__contact .gtc-quote__field { margin-bottom: 0; }

.gtc-quote__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 1.5rem;
}

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

@media (max-width: 720px) {
	.gtc-quote__options,
	.gtc-quote__contact { grid-template-columns: 1fr; }
	.gtc-quote__contact .gtc-quote__field { margin-bottom: 1rem; }
	.gtc-quote__actions { justify-content: stretch; }
}

/* Brief highlight on the quantity field after "Aantal overnemen", so it is
   obvious where the number landed once the modal closes. */
.gtc-flash {
	animation: gtc-flash 1.2s ease;
}

@keyframes gtc-flash {
	0%, 100% { box-shadow: 0 0 0 0 rgba(129, 187, 0, 0); }
	20%, 60% { box-shadow: 0 0 0 3px rgba(129, 187, 0, .55); }
}

@media (max-width: 720px) {
	.gtc-modal { padding: .75rem .5rem; }
	.gtc-modal__panel { border-radius: 8px; }

	.gtc {
		padding: 1rem;
		font-size: 14px;
	}
	.gtc h2.gtc__title,
	.gtc .gtc__title { font-size: 17px !important; }
	.gtc h3.gtc__heading,
	.gtc .gtc__heading { font-size: 14px !important; }
	.gtc .gtc__intro { font-size: 12.5px !important; }

	/* Header row is hidden, so each row becomes: name on its own line, then
	   length + width + remove together — the remove button must stay beside the
	   inputs it deletes, not orphaned on a line of its own. */
	.gtc__head { display: none; }
	.gtc__row {
		grid-template-columns: 1fr 1fr 2rem;
		gap: .4rem;
		padding-bottom: .6rem;
		margin-bottom: .6rem;
		border-bottom: 1px dashed var(--gtc-line);
	}
	.gtc__row [data-gtc-name] { grid-column: 1 / -1; }

	.gtc__radios { grid-template-columns: 1fr; gap: .4rem; }
	.gtc__actions { justify-content: stretch; }
	.gtc button.gtc__submit { width: 100%; justify-content: center; }
	.gtc button.gtc__add { width: 100%; justify-content: center; text-align: center; }
	.gtc__row-out { font-size: .88rem; }
}
