/* ============================================================================
   Lakasg Contact Form — frontend stylesheet (v2.7.0)
   ----------------------------------------------------------------------------
   Layout uses CSS Grid with custom properties:
     --lakasg-cols          — total grid columns (set on the <form> tag)
     --lakasg-span          — desktop column span      (set per field)
     --lakasg-span-tablet   — tablet override          (optional)
     --lakasg-span-mobile   — mobile override          (optional)
   ============================================================================ */

.lakasg-contact-form-wrap {
	width: 100%;
}

/* ── Grid container ─────────────────────────────────────────────────────── */
.lakasg-contact-form {
	display: grid;
	grid-template-columns: repeat(var(--lakasg-cols, 12), minmax(0, 1fr));
	row-gap: 16px;
	column-gap: 16px;
	border-style: solid;
	border-width: 0;
	box-sizing: border-box;
}

.lakasg-contact-form > .lakasg-status,
.lakasg-contact-form > .lakasg-success,
.lakasg-contact-form > .lakasg-form-actions,
.lakasg-contact-form > .lakasg-honeypot,
.lakasg-contact-form > .cf-turnstile,
.lakasg-contact-form > .lakasg-recaptcha-token {
	grid-column: span var(--lakasg-cols, 12);
}

.lakasg-field,
.lakasg-form-actions {
	grid-column: span var(--lakasg-span, 12);
	min-width: 0;
}

@media (max-width: 1024px) {
	.lakasg-field,
	.lakasg-form-actions {
		grid-column: span var(--lakasg-span-tablet, var(--lakasg-span, 12));
	}
}

@media (max-width: 600px) {
	.lakasg-field,
	.lakasg-form-actions {
		grid-column: span var(--lakasg-span-mobile, var(--lakasg-span, 12));
	}
	.lakasg-mobile-collapse .lakasg-field,
	.lakasg-mobile-collapse .lakasg-form-actions {
		grid-column: span var(--lakasg-cols, 12);
	}
}

/* ── Fields ─────────────────────────────────────────────────────────────── */

.lakasg-field {
	position: relative;
	display: block;
}

.lakasg-field > label,
.lakasg-field-legend {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: #222;
	cursor: pointer;
}

.lakasg-field-legend {
	padding: 0;
	border: 0;
	margin-bottom: 8px;
}

.lakasg-required-indicator {
	color: #d33;
	font-weight: bold;
	margin-left: 2px;
}

/* ── Inputs ─────────────────────────────────────────────────────────────── */

.lakasg-field input:not([type=checkbox]):not([type=radio]),
.lakasg-field textarea,
.lakasg-field select {
	display: block;
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.4;
	color: #222;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
	font-family: inherit;
}

.lakasg-field textarea {
	resize: vertical;
	min-height: 80px;
}

.lakasg-field input:focus,
.lakasg-field textarea:focus,
.lakasg-field select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.lakasg-field input:hover,
.lakasg-field textarea:hover,
.lakasg-field select:hover {
	border-color: #999;
}

.lakasg-field-help {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #777;
}

/* ── Field error state ──────────────────────────────────────────────────── */

.lakasg-field-error {
	display: none;
	margin-top: 6px;
	font-size: 12px;
	color: #d33;
	font-weight: 500;
}

.lakasg-field.has-error .lakasg-field-error {
	display: block;
}

.lakasg-field.has-error input:not([type=checkbox]):not([type=radio]),
.lakasg-field.has-error textarea,
.lakasg-field.has-error select {
	border-color: #d33;
}

/* ── Choices (radio + checkbox group) ───────────────────────────────────── */

.lakasg-choices-wrap {
	border: 0;
	padding: 0;
	margin: 0;
}

.lakasg-choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lakasg-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-weight: 400;
	margin-bottom: 0;
}

.lakasg-choice input {
	margin: 0;
	flex-shrink: 0;
}

.lakasg-choice--single,
.lakasg-choice--acceptance {
	align-items: flex-start;
	line-height: 1.4;
}

.lakasg-choice--acceptance span a {
	color: inherit;
	text-decoration: underline;
}

/* ── Label positions ────────────────────────────────────────────────────── */

/* Inline / left */
.lakasg-field--label-inline {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.lakasg-field--label-inline > label {
	flex: 0 0 30%;
	margin-bottom: 0;
	padding-top: 10px;
}
.lakasg-field--label-inline > input,
.lakasg-field--label-inline > textarea,
.lakasg-field--label-inline > select {
	flex: 1 1 auto;
}

/* Floating */
.lakasg-field--label-floating {
	position: relative;
}
.lakasg-field--label-floating > label {
	position: absolute;
	top: 12px;
	left: 12px;
	margin: 0;
	padding: 0 4px;
	background: transparent;
	color: #999;
	transition: top .15s ease, font-size .15s ease, color .15s ease;
	pointer-events: none;
	font-weight: 400;
}
.lakasg-field--label-floating input,
.lakasg-field--label-floating textarea {
	padding-top: 18px;
	padding-bottom: 6px;
}
.lakasg-field--label-floating.lakasg-is-filled > label,
.lakasg-field--label-floating input:focus + label,
.lakasg-field--label-floating textarea:focus + label,
.lakasg-field--label-floating > input:not(:placeholder-shown) ~ label,
.lakasg-field--label-floating > textarea:not(:placeholder-shown) ~ label {
	top: 4px;
	font-size: 11px;
	color: #2271b1;
}

/* Inside (Material-style) */
.lakasg-field--label-inside {
	position: relative;
}
.lakasg-field--label-inside > label {
	position: absolute;
	top: 4px;
	left: 12px;
	margin: 0;
	font-size: 11px;
	color: #666;
	background: transparent;
	pointer-events: none;
	font-weight: 500;
}
.lakasg-field--label-inside input,
.lakasg-field--label-inside textarea {
	padding-top: 22px;
	padding-bottom: 8px;
}

/* SR-only — visually hide labels but keep them for screen readers */
.lakasg-field--label-sr_only > label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Honeypot (off-screen, never visible) ───────────────────────────────── */

.lakasg-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ── Actions row ────────────────────────────────────────────────────────── */

.lakasg-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-start;
}

.lakasg-submit,
.lakasg-reset {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, opacity .15s ease;
	position: relative;
}

.lakasg-reset {
	background: transparent;
	color: #555;
	border: 1px solid #ccc;
}

.lakasg-submit:hover { background: #333; }
.lakasg-reset:hover  { background: #f6f7f7; color: #222; }

.lakasg-submit:disabled,
.lakasg-reset:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.lakasg-form-actions [style*="stretch"] .lakasg-submit { width: 100%; justify-content: center; }

/* Spinner — inside the button. Hidden until .is-loading. */
.lakasg-submit-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.35);
	border-top-color: #fff;
	border-left-color: #fff;
	border-radius: 50%;
	animation: lakasg-spin .7s linear infinite;
}

.lakasg-submit.is-loading .lakasg-submit-spinner { display: inline-block; }

/* Hide the icon while loading so the spinner has the spot. */
.lakasg-submit.is-loading .lakasg-submit-icon { display: none; }

/* "text_only" loading style: just show loading text, no spinner */
.lakasg-loading-text_only .lakasg-submit-spinner { display: none !important; }

/* "overlay" loading style: grey out the whole form during submit */
.lakasg-loading-overlay .lakasg-contact-form.is-submitting {
	position: relative;
	pointer-events: none;
}
.lakasg-loading-overlay .lakasg-contact-form.is-submitting::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.6);
	z-index: 5;
	border-radius: inherit;
}

@keyframes lakasg-spin {
	to { transform: rotate(360deg); }
}

/* ── Status messages ────────────────────────────────────────────────────── */

.lakasg-status {
	display: none;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
}
.lakasg-status.is-error {
	display: block;
	background: #fdeaea;
	color: #b32121;
	border-left: 3px solid #d33;
}

.lakasg-success {
	padding: 16px 20px;
	background: #e6f4ea;
	color: #1e6c2c;
	border-radius: 4px;
	border-left: 3px solid #34a853;
	font-size: 15px;
	line-height: 1.5;
}

/* When success replaces the form, hide the form itself */
.lakasg-contact-form-wrap.is-success .lakasg-contact-form { display: none; }

/* ── Captchas ───────────────────────────────────────────────────────────── */

.lakasg-turnstile {
	margin-top: 8px;
}
