/* =========================================================
   Sticky aanvraagformulier – Amsterdam Work Spaces
   ========================================================= */

:root {
	--aws-sf-bar-h: 64px;
	--aws-sf-safe: env(safe-area-inset-bottom, 0px);
	--aws-sf-bar-total: calc(var(--aws-sf-bar-h) + var(--aws-sf-safe));
}

.aws-sf {
	--aws-sf-navy: #000b23;
	--aws-sf-gold: #b8965a;
	--aws-sf-gold-soft: rgba(184, 150, 90, .45);
	--aws-sf-cream: #faf7f1;
	--aws-sf-text-muted: #6b6862;
	--aws-sf-panel-w: 420px;
	--aws-sf-z: 99990;
	--aws-sf-ease: cubic-bezier(.22, .61, .36, 1);
	font-family: Poppins, sans-serif;
}

html.aws-sf-lock,
html.aws-sf-lock body {
	overflow: hidden;
}

/* ---------- Tab (desktop) ---------- */

.aws-sf__tab {
	position: fixed;
	top: 50%;
	right: 0;
	left: auto;
	width: auto;
	height: auto;
	min-width: 0;
	margin: 0;
	z-index: var(--aws-sf-z);
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 12px;
	font-family: Poppins, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .02em;
	color: #fff;
	background: var(--aws-sf-navy);
	border: 0;
	border-radius: 14px 0 0 14px;
	box-shadow: 0 12px 30px rgba(0, 11, 35, .25);
	cursor: pointer;
	writing-mode: vertical-rl;
	transform: translateY(-50%) rotate(180deg);
	transform-origin: center;
	transition: background-color .2s ease, opacity .3s ease, visibility .3s ease, translate .3s var(--aws-sf-ease);
}

.aws-sf__tab svg {
	flex: 0 0 auto;
	color: var(--aws-sf-gold);
	transform: rotate(180deg); /* corrigeert de 180° draaiing van de tab */
}

.aws-sf__tab:hover,
.aws-sf__tab:focus-visible {
	background: var(--aws-sf-gold);
}

.aws-sf__tab:hover svg,
.aws-sf__tab:focus-visible svg {
	color: #fff;
}

.aws-sf__tab:focus-visible {
	outline: 2px solid var(--aws-sf-gold);
	outline-offset: 3px;
}

/* ---------- Overlay ---------- */

.aws-sf__overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--aws-sf-z) + 1);
	background: rgba(0, 11, 35, .45);
	opacity: 0;
	cursor: pointer; /* iOS: zorgt dat een tik op de overlay een click-event geeft */
	-webkit-tap-highlight-color: transparent;
	transition: opacity .3s ease;
}

.aws-sf.is-open .aws-sf__overlay {
	opacity: 1;
}

/* ---------- Paneel ---------- */

.aws-sf__panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: calc(var(--aws-sf-z) + 2);
	display: flex;
	flex-direction: column;
	width: min(var(--aws-sf-panel-w), 100vw);
	height: 100vh;
	height: 100dvh;
	background: #fff;
	border-left: 1px solid var(--aws-sf-gold-soft);
	box-shadow: -18px 0 50px rgba(120, 90, 30, .15);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .35s var(--aws-sf-ease), visibility 0s linear .35s;
	outline: none;
}

.aws-sf.is-open .aws-sf__panel {
	transform: translateX(0);
	visibility: visible;
	transition: transform .35s var(--aws-sf-ease), visibility 0s linear 0s;
}

.aws-sf__inner {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	padding: 56px 32px 32px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.aws-sf__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5; /* iOS: boven de scrollende inhoud houden, anders vangt die de tik af */
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--aws-sf-navy);
	background: var(--aws-sf-cream);
	border: 1px solid var(--aws-sf-gold-soft);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.aws-sf__close:hover,
.aws-sf__close:focus-visible {
	color: #fff;
	background: var(--aws-sf-navy);
}

.aws-sf__title {
	margin: 0 0 10px;
	font-family: "Cormorant Garamond", serif;
	font-size: 32px;
	font-weight: 400;
	line-height: 1.15;
	color: var(--aws-sf-navy);
}

.aws-sf__intro {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--aws-sf-text-muted);
}

.aws-sf__usps {
	display: grid;
	gap: 8px;
	margin: 0 0 24px;
	padding: 16px 18px;
	list-style: none;
	background: var(--aws-sf-cream);
	border: 1px solid rgba(184, 150, 90, .25);
	border-radius: 14px;
}

.aws-sf__usps li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--aws-sf-navy);
}

.aws-sf__usps li::before {
	content: none;
}

.aws-sf__usps svg {
	flex: 0 0 auto;
	margin-top: 1px;
	color: var(--aws-sf-gold);
}

.aws-sf__call {
	margin: 20px 0 0;
	padding-top: 18px;
	font-size: 14px;
	color: var(--aws-sf-text-muted);
	border-top: 1px solid rgba(184, 150, 90, .25);
}

.aws-sf__call a {
	font-weight: 500;
	color: var(--aws-sf-navy);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 1px solid var(--aws-sf-gold);
}

.aws-sf__call a:hover {
	color: var(--aws-sf-gold);
}

/* ---------- Formulier ---------- */

.aws-sf__form .wpcf7-form {
	margin: 0;
}

.aws-sf__form .wpcf7-form p {
	margin: 0 0 14px;
}

.aws-sf__form .hidden-fields-container,
.aws-sf__form .akismet-fields-container {
	display: none;
}

.aws-sf__form .wpcf7_hp_field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.aws-sf__form label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--aws-sf-navy);
}

.aws-sf__form label br {
	display: none;
}

.aws-sf__form .wpcf7-form-control-wrap {
	display: block;
	margin-top: 6px;
}

.aws-sf__form input[type="text"],
.aws-sf__form input[type="email"],
.aws-sf__form input[type="tel"],
.aws-sf__form select,
.aws-sf__form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	font-family: Poppins, sans-serif;
	font-size: 15px;
	line-height: 1.4;
	color: var(--aws-sf-navy);
	background-color: var(--aws-sf-cream);
	border: 1px solid rgba(184, 150, 90, .35);
	border-radius: 12px;
	box-shadow: none;
	transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.aws-sf__form select {
	padding-right: 44px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b8965a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.aws-sf__form textarea {
	min-height: 96px;
	resize: vertical;
}

.aws-sf__form input::placeholder,
.aws-sf__form textarea::placeholder {
	color: #9a958b;
	opacity: 1;
}

.aws-sf__form input:focus,
.aws-sf__form select:focus,
.aws-sf__form textarea:focus {
	outline: none;
	background-color: #fff;
	border-color: var(--aws-sf-gold);
	box-shadow: 0 0 0 3px rgba(184, 150, 90, .18);
}

.aws-sf__form .wpcf7-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	margin-top: 4px;
	padding: 0 28px;
	font-family: Poppins, sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #fff;
	background: var(--aws-sf-navy);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .2s ease;
}

.aws-sf__form .wpcf7-submit:hover,
.aws-sf__form .wpcf7-submit:focus-visible {
	background: var(--aws-sf-gold);
}

.aws-sf__form .wpcf7-spinner {
	display: block;
	margin: 10px auto 0;
}

.aws-sf__form .small-text {
	font-size: 12px;
	line-height: 1.5;
	color: var(--aws-sf-text-muted);
}

.aws-sf__form .wpcf7-not-valid-tip {
	margin-top: 4px;
	font-size: 12px;
}

.aws-sf__form .wpcf7-response-output {
	margin: 14px 0 0 !important;
	padding: 10px 14px !important;
	font-size: 14px;
	border-radius: 12px;
}

/* ---------- Mobiele balk ---------- */

.aws-sf__bar {
	display: none;
}

/* ---------- Verbergen zodra het formulier op de pagina in beeld is ---------- */

.aws-sf.is-suppressed .aws-sf__tab {
	opacity: 0;
	visibility: hidden;
	translate: 100% 0;
	pointer-events: none;
}

.aws-sf__close svg {
	pointer-events: none;
}

/* ---------- Mobiel ---------- */

@media (max-width: 767px) {
	.aws-sf__tab {
		display: none;
	}

	body.aws-sf-active {
		padding-bottom: var(--aws-sf-bar-total);
	}

	.aws-sf__bar {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: var(--aws-sf-z);
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		height: var(--aws-sf-bar-total);
		padding: 10px 12px calc(10px + var(--aws-sf-safe));
		box-sizing: border-box;
		background: #fff;
		border-top: 1px solid var(--aws-sf-gold-soft);
		box-shadow: 0 -10px 30px rgba(0, 11, 35, .08);
		transition: transform .3s var(--aws-sf-ease);
	}

	.aws-sf__bar-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		height: 44px;
		align-self: center;
		font-family: Poppins, sans-serif;
		font-size: 15px;
		font-weight: 500;
		color: var(--aws-sf-navy);
		text-decoration: none;
		background: var(--aws-sf-cream);
		border: 1px solid var(--aws-sf-gold-soft);
		border-radius: 999px;
		cursor: pointer;
	}

	.aws-sf__bar-btn svg {
		color: var(--aws-sf-gold);
	}

	.aws-sf__bar-btn--primary {
		color: #fff;
		background: var(--aws-sf-navy);
		border-color: var(--aws-sf-navy);
	}

	.aws-sf.is-suppressed .aws-sf__bar {
		transform: translateY(110%);
	}

	body.aws-sf-active.aws-sf-bar-hidden {
		padding-bottom: 0;
	}

	/* Paneel als bottom sheet */
	.aws-sf__panel {
		top: auto;
		bottom: 0;
		width: 100%;
		height: auto;
		max-height: 92vh;
		max-height: 92dvh;
		border-left: 0;
		border-top: 1px solid var(--aws-sf-gold-soft);
		border-radius: 22px 22px 0 0;
		box-shadow: 0 -18px 50px rgba(0, 11, 35, .2);
		transform: translateY(100%);
	}

	.aws-sf.is-open .aws-sf__panel {
		transform: translateY(0);
	}

	.aws-sf__inner {
		padding: 48px 20px calc(24px + env(safe-area-inset-bottom, 0px));
	}

	.aws-sf__title {
		font-size: 28px;
	}

	/* Grotere tikzone voor sluiten */
	.aws-sf__close {
		top: 10px;
		right: 10px;
		width: 44px;
		height: 44px;
	}

	/* iOS zoomt in bij velden kleiner dan 16px; daardoor viel de sluitknop buiten beeld */
	.aws-sf__panel input[type="text"],
	.aws-sf__panel input[type="email"],
	.aws-sf__panel input[type="tel"],
	.aws-sf__panel select,
	.aws-sf__panel textarea {
		font-size: 16px;
	}
}

/* ---------- Live chat (WhatsApp Chat / qlwapp) en cookieknop (wcc) ---------- */

.qlwapp__container,
.wcc-btn-revisit-wrapper {
	transition: bottom .3s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}

/* Verbergen zolang het paneel open is, zodat ze niet over het formulier vallen */
html.aws-sf-lock .qlwapp__container,
html.aws-sf-lock .wcc-btn-revisit-wrapper {
	opacity: 0 !important;
	pointer-events: none !important;
}

@media (max-width: 767px) {
	/* Boven de vaste balk plaatsen */
	body.aws-sf-active .qlwapp__container {
		bottom: var(--aws-sf-bar-total) !important;
	}

	body.aws-sf-active .wcc-btn-revisit-wrapper {
		bottom: calc(var(--aws-sf-bar-total) + 15px) !important;
	}

	/* Balk verborgen (formulier op de pagina in beeld): terug naar de oorspronkelijke plek */
	body.aws-sf-active.aws-sf-bar-hidden .qlwapp__container {
		bottom: 0 !important;
	}

	body.aws-sf-active.aws-sf-bar-hidden .wcc-btn-revisit-wrapper {
		bottom: 15px !important;
	}
}

/* ---------- Minder beweging ---------- */

@media (prefers-reduced-motion: reduce) {
	.aws-sf__tab,
	.aws-sf__overlay,
	.aws-sf__panel,
	.aws-sf.is-open .aws-sf__panel,
	.aws-sf__bar,
	.qlwapp__container,
	.wcc-btn-revisit-wrapper {
		transition: none;
	}
}