/**
 * "Get in touch with Satchel" popup + its Contact Form 7 form.
 * Figma: Pop up form / Contact us (3419:12141).
 */

.satchel-popup {
	--satchel-ink: #212121;
	--satchel-yellow: #ffd657;
	--satchel-grey10: #f3f3f3;
	--satchel-grey15: #dbdbdb;
	--satchel-grey50: #8e8e8e;
	--satchel-grey80: #4c4c4c;
	--satchel-white: #fff;
	--satchel-error: #d93025;

	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 40px 24px;
	border: 0;
	background: transparent;
	color: var(--satchel-ink);
	font-family: Inter, sans-serif;
	font-size: 16px;
	line-height: 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
}

.satchel-popup[open] {
	display: flex;
}

.satchel-popup.is-open {
	opacity: 1;
}

.satchel-popup::backdrop {
	background: rgba(33, 33, 33, 0.8);
	opacity: 0;
}

.satchel-popup.is-open::backdrop {
	opacity: 1;
}

.satchel-popup *,
.satchel-popup *::before,
.satchel-popup *::after {
	box-sizing: border-box;
}

html.satchel-popup-lock {
	overflow: hidden;
}

html.satchel-popup-lock body {
	padding-right: var(--satchel-scrollbar-width, 0px);
}

.satchel-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Panel ------------------------------------------------------------------ */

.satchel-popup__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
	width: 100%;
	max-width: 1068px;
	margin: auto;
	padding: 8px 8px 56px;
	border-radius: 8px;
	background: var(--satchel-white);
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}

.satchel-popup button.satchel-popup__close,
.satchel-popup button.satchel-popup__close:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	/* Decorative icon (Figma i-X, 24x24); the accessible name comes from aria-label. */
	background: transparent url("../img/close.svg") no-repeat center / 24px 24px;
	box-shadow: none;
	color: var(--satchel-ink);
	cursor: pointer;
}

.satchel-popup button.satchel-popup__close:hover {
	background-color: var(--satchel-grey10);
	color: var(--satchel-ink);
}

.satchel-popup button.satchel-popup__close:focus-visible {
	box-shadow: none;
	outline: 2px solid var(--satchel-ink);
	outline-offset: 2px;
}

.satchel-popup__content {
	display: flex;
	align-items: stretch;
	width: 100%;
	padding: 0 32px;
}

.satchel-popup__intro {
	display: flex;
	flex: 0 0 442px;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
	padding: 0 72px;
}

.satchel-popup .satchel-popup__title {
	margin: 0;
	color: var(--satchel-ink);
	font-family: Inter, sans-serif;
	font-size: 40px;
	font-weight: 600;
	line-height: 44px;
	letter-spacing: 0;
	overflow-wrap: break-word;
}

.satchel-popup .satchel-popup__text {
	margin: 0;
	color: var(--satchel-ink);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}

.satchel-popup__form {
	flex: 1 1 549px;
	min-width: 0;
	padding: 0 72px 0 68px;
	border-left: 1px solid var(--satchel-grey15);
}

/* Contact Form 7 --------------------------------------------------------- */

.satchel-popup .wpcf7,
.satchel-popup .wpcf7-form {
	margin: 0;
}

.satchel-popup .wpcf7-form-control-wrap {
	display: block;
	position: relative;
}

.satchel-cf7__fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.satchel-popup .satchel-cf7__field {
	display: block;
	line-height: inherit;
	vertical-align: baseline;
}

.satchel-popup .satchel-cf7 input.wpcf7-text,
.satchel-popup .satchel-cf7 textarea.wpcf7-textarea {
	display: block;
	width: 100%;
	height: 48px;
	min-height: 48px;
	margin: 0;
	padding: 20px 0 3px;
	border: 0;
	border-bottom: 1px solid var(--satchel-grey50);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--satchel-ink);
	font-family: Inter, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.satchel-popup .satchel-cf7 textarea.wpcf7-textarea {
	max-height: 144px;
	overflow-y: hidden;
	resize: none;
}

.satchel-popup .satchel-cf7 input.wpcf7-text::placeholder,
.satchel-popup .satchel-cf7 textarea.wpcf7-textarea::placeholder {
	color: var(--satchel-grey50);
	opacity: 1;
}

.satchel-popup .satchel-cf7 input.wpcf7-text:focus,
.satchel-popup .satchel-cf7 textarea.wpcf7-textarea:focus {
	border-bottom-color: var(--satchel-ink);
	box-shadow: 0 1px 0 0 var(--satchel-ink);
	outline: none;
}

.satchel-popup .satchel-cf7 input.wpcf7-text[aria-invalid="true"],
.satchel-popup .satchel-cf7 textarea.wpcf7-textarea[aria-invalid="true"] {
	border-bottom-color: var(--satchel-error);
}

.satchel-popup .satchel-cf7 input.wpcf7-text[aria-invalid="true"]:focus,
.satchel-popup .satchel-cf7 textarea.wpcf7-textarea[aria-invalid="true"]:focus {
	box-shadow: 0 1px 0 0 var(--satchel-error);
}

/* Checkboxes */

.satchel-cf7__checks {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}

.satchel-popup .satchel-cf7 .wpcf7-checkbox,
.satchel-popup .satchel-cf7 .wpcf7-acceptance {
	display: block;
}

.satchel-popup .satchel-cf7 .wpcf7-list-item {
	display: block;
	margin: 0;
}

.satchel-popup .satchel-cf7 .wpcf7-list-item > label {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	color: var(--satchel-ink);
	font-size: 12px;
	line-height: 16px;
	vertical-align: baseline;
	cursor: pointer;
}

.satchel-popup .satchel-cf7 .wpcf7-list-item-label {
	padding-top: 2px;
	color: var(--satchel-ink);
}

.satchel-popup .satchel-cf7 .wpcf7-list-item input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1px solid var(--satchel-grey50);
	border-radius: 2px;
	background: var(--satchel-white) no-repeat center / 20px 20px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease;
}

.satchel-popup .satchel-cf7 .wpcf7-list-item input[type="checkbox"]:hover {
	border-color: var(--satchel-ink);
}

.satchel-popup .satchel-cf7 .wpcf7-list-item input[type="checkbox"]:checked {
	border-color: var(--satchel-yellow);
	background-color: var(--satchel-yellow);
	background-image: url("../img/checkbox-checked.svg");
}

.satchel-popup .satchel-cf7 .wpcf7-list-item input[type="checkbox"]:focus-visible {
	box-shadow: none;
	outline: 2px solid var(--satchel-ink);
	outline-offset: 2px;
}

.satchel-popup .satchel-cf7 .wpcf7-form-control-wrap:has(.wpcf7-not-valid-tip) input[type="checkbox"]:not(:checked) {
	border-color: var(--satchel-error);
}

.satchel-popup .satchel-cf7 a.satchel-cf7__terms-link {
	color: var(--satchel-grey50);
	text-decoration: none;
}

.satchel-popup .satchel-cf7 a.satchel-cf7__terms-link:hover,
.satchel-popup .satchel-cf7 a.satchel-cf7__terms-link:focus-visible {
	color: var(--satchel-grey80);
	text-decoration: underline;
}

/* Submit */

.satchel-cf7__actions {
	display: flex;
	align-items: center;
	margin-top: 48px;
}

.satchel-popup .satchel-cf7 input.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	margin: 0;
	padding: 11px 16px 9px;
	border: 0;
	border-radius: 4px;
	background: var(--satchel-yellow);
	box-shadow: 0 2px 6px rgba(255, 214, 87, 0.2);
	color: var(--satchel-ink);
	font-family: Inter, sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.satchel-popup .satchel-cf7 input.wpcf7-submit:hover,
.satchel-popup .satchel-cf7 input.wpcf7-submit:focus {
	background: #f5c93f;
	box-shadow: 0 4px 12px rgba(255, 214, 87, 0.4);
	color: var(--satchel-ink);
}

.satchel-popup .satchel-cf7 input.wpcf7-submit:focus-visible {
	outline: 2px solid var(--satchel-ink);
	outline-offset: 2px;
}

.satchel-popup .satchel-cf7 input.wpcf7-submit:disabled {
	cursor: default;
	opacity: 0.6;
}

.satchel-popup .satchel-cf7 .wpcf7-spinner {
	flex: none;
	margin: 0 0 0 16px;
	background-color: var(--satchel-ink);
}

/* Validation + response */

.satchel-popup .satchel-cf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	color: var(--satchel-error);
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
}

.satchel-popup .satchel-cf7 .wpcf7-checkbox + .wpcf7-not-valid-tip,
.satchel-popup .satchel-cf7 .wpcf7-acceptance + .wpcf7-not-valid-tip {
	padding-left: 36px;
}

.satchel-popup .wpcf7 form.satchel-cf7 .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 0;
	border: 0;
	color: var(--satchel-error);
	font-size: 14px;
	line-height: 20px;
}

.satchel-popup .wpcf7 form.satchel-cf7.sent .wpcf7-response-output {
	padding: 12px 16px;
	border-left: 3px solid var(--satchel-yellow);
	border-radius: 4px;
	background: var(--satchel-grey10);
	color: var(--satchel-ink);
}

/* Motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	.satchel-popup,
	.satchel-popup::backdrop {
		transition: opacity 0.2s ease;
	}

	.satchel-popup__panel {
		transform: translateY(16px);
		transition: transform 0.2s ease;
	}

	.satchel-popup.is-open .satchel-popup__panel {
		transform: none;
	}
}

/* Tablet: stacked, near full-screen, scrolls inside the panel ----------- */

@media (max-width: 1024px) {
	.satchel-popup {
		padding: 24px;
		overflow: hidden;
	}

	.satchel-popup__panel {
		max-width: 720px;
		max-height: 100%;
		padding: 8px 8px 48px;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.satchel-popup button.satchel-popup__close,
	.satchel-popup button.satchel-popup__close:focus {
		position: sticky;
		top: 0;
		z-index: 1;
		background-color: var(--satchel-white);
	}

	.satchel-popup__content {
		flex-direction: column;
		padding: 0 48px;
	}

	.satchel-popup__intro {
		flex: none;
		gap: 16px;
		padding: 0;
	}

	.satchel-popup__form {
		flex: none;
		margin-top: 32px;
		padding: 32px 0 0;
		border-top: 1px solid var(--satchel-grey15);
		border-left: 0;
	}
}

/* Mobile ----------------------------------------------------------------- */

@media (max-width: 767px) {
	.satchel-popup {
		padding: 8px;
	}

	.satchel-popup__panel {
		max-width: none;
		height: 100%;
		padding: 8px 8px 32px;
	}

	.satchel-popup__content {
		padding: 0 16px;
	}

	.satchel-popup .satchel-popup__title {
		font-size: 32px;
		line-height: 36px;
	}

	.satchel-popup__form {
		margin-top: 24px;
		padding-top: 24px;
	}

	.satchel-cf7__actions {
		margin-top: 32px;
	}
}
