/* ============================================================
   lakasg Quote Request Widget
   ============================================================ */

.lakasg-qr-wrap {
	box-sizing: border-box;
	width: 100%;
}

/* ── Form wrapper ─────────────────────────────────────────── */
.lakasg-qr-form-inner {
	background: #ffffff;
	border-radius: 8px;
	padding: 28px;
	box-sizing: border-box;
}

/* ── Product badge ────────────────────────────────────────── */
.lakasg-qr-product-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f0f4ff;
	color: #1a56db;
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 20px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lakasg-qr-product-badge svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
}

/* ── Grid layout ──────────────────────────────────────────── */
.lakasg-qr-fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.lakasg-qr-fields--2col {
	grid-template-columns: 1fr 1fr;
}

@media ( max-width: 767px ) {
	.lakasg-qr-fields--2col {
		grid-template-columns: 1fr;
	}
}

.lakasg-qr-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.lakasg-qr-field--full {
	grid-column: 1 / -1;
}

/* ── Labels ───────────────────────────────────────────────── */
.lakasg-qr-label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.lakasg-qr-label .required {
	color: #d63638;
	margin-left: 2px;
}

/* Label inline mode */
.lakasg-qr-label--inline {
	display: none;
}

/* ── Inputs ───────────────────────────────────────────────── */
.lakasg-qr-input,
.lakasg-qr-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	font-size: 14px;
	font-family: inherit;
	color: #333;
	background: #fafafa;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	outline: none;
	transition: border-color 200ms, box-shadow 200ms;
	-webkit-appearance: none;
}

.lakasg-qr-input:focus,
.lakasg-qr-textarea:focus {
	border-color: #1a56db;
	box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
	background: #fff;
}

.lakasg-qr-textarea {
	resize: vertical;
	min-height: 110px;
}

/* ── Honeypot — always hidden ─────────────────────────────── */
.lakasg-qr-hp {
	display: none !important;
	visibility: hidden !important;
}

/* ── Submit button ────────────────────────────────────────── */
.lakasg-qr-footer {
	margin-top: 20px;
}

.lakasg-qr-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 28px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	color: #ffffff;
	background-color: #1a56db;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 250ms ease, box-shadow 250ms ease, transform 100ms ease;
	line-height: 1.2;
	white-space: nowrap;
}

.lakasg-qr-submit:hover {
	background-color: #1447c0;
}

.lakasg-qr-submit:active {
	transform: scale( 0.98 );
}

.lakasg-qr-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.lakasg-qr-submit svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Full width button */
.lakasg-qr-submit--full {
	width: 100%;
}

/* ── Messages ─────────────────────────────────────────────── */
.lakasg-qr-message {
	display: none;
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.lakasg-qr-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.lakasg-qr-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ── reCAPTCHA badge ──────────────────────────────────────── */
/* v3 badge is auto-shown by Google; hide if you want (not recommended) */
/* .grecaptcha-badge { visibility: hidden; } */

/* ── Editor preview notice ────────────────────────────────── */
.lakasg-qr-editor-notice {
	text-align: center;
	padding: 8px 0 0;
	font-size: 11px;
	color: #999;
	font-style: italic;
}

/* ============================================================
   Popup Mode
   ============================================================ */

/* ── Trigger button ───────────────────────────────────────── */
.lakasg-qr-trigger-wrap {
	display: flex;
	align-items: center;
}

.lakasg-qr-trigger-wrap.is-stretch .lakasg-qr-trigger {
	width: 100%;
	justify-content: center;
}

.lakasg-qr-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	color: #ffffff;
	background-color: #1a56db;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 250ms ease, box-shadow 250ms ease;
	line-height: 1.2;
	white-space: nowrap;
	-webkit-appearance: none;
}

.lakasg-qr-trigger:hover {
	background-color: #1447c0;
}

.lakasg-qr-trigger svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: currentColor;
}

/* ── Overlay ──────────────────────────────────────────────── */
.lakasg-qr-overlay {
	/* Rendered in the widget's DOM but escapes visually via fixed positioning */
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background-color: rgba( 0, 0, 0, 0.55 );
	box-sizing: border-box;

	/* Hidden state */
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease;

	/* Touch scroll containment */
	overscroll-behavior: contain;
}

.lakasg-qr-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* ── Dialog box ───────────────────────────────────────────── */
.lakasg-qr-popup-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc( 100dvh - 32px );
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.25 );
	display: flex;
	flex-direction: column;
	box-sizing: border-box;

	/* Slide-up animation */
	transform: translateY( 20px );
	transition: transform 220ms ease;

	/* Touch scroll inside */
	-webkit-overflow-scrolling: touch;
}

.lakasg-qr-overlay.is-open .lakasg-qr-popup-dialog {
	transform: translateY( 0 );
}

/* ── Header ───────────────────────────────────────────────── */
.lakasg-qr-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 0;
	flex-shrink: 0;
}

.lakasg-qr-popup-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.lakasg-qr-popup-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	color: #666;
	flex-shrink: 0;
	transition: background-color 150ms, color 150ms;
	padding: 0;
}

.lakasg-qr-popup-close:hover {
	background-color: #f0f0f0;
	color: #333;
}

.lakasg-qr-popup-close svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* ── Body (scrollable) ────────────────────────────────────── */
.lakasg-qr-popup-body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	flex: 1 1 auto;
}

/* Remove extra outer padding from form-inner inside popup
   since the popup dialog already has spacing */
.lakasg-qr-popup-body .lakasg-qr-form-inner {
	border-radius: 0;
	box-shadow: none;
	border: none;
}

/* ── Mobile: full-screen on small phones ─────────────────── */
@media ( max-width: 480px ) {
	.lakasg-qr-overlay {
		padding: 0;
		align-items: flex-end; /* slide up from bottom like a native sheet */
	}

	.lakasg-qr-popup-dialog {
		max-width: 100%;
		max-height: 92dvh;
		border-radius: 16px 16px 0 0; /* rounded only at top on mobile */
		transform: translateY( 100% );
	}

	.lakasg-qr-overlay.is-open .lakasg-qr-popup-dialog {
		transform: translateY( 0 );
	}
}
