/* -------------------------------------------------------------------------- */
/* Contact block — Contact Form 7 (scoped under .contactBlock__form)         */
/* CF7 wraps each field in <p> by default. Layout uses :has([name="…"]) so */
/* it tracks your mail tags; if you rename fields, update the selectors.    */
/* -------------------------------------------------------------------------- */

.contactBlock {
	width: 100%;
	box-sizing: border-box;
    padding: 92px 80px 112px 80px;
    background: var(--Beige,#FEFBF6);
}

.contactBlock__form {
	width: 768px;
	max-width: 100%;
	margin-inline: auto;
	box-sizing: border-box;
	color: #0a0a0a;
}

.contactBlock h2 {
	margin: 0;
	color: #0a0a0a;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 30px;
	font-style: normal;
	font-weight: 500;
	line-height: 36px;
}

.contactBlock__form .wpcf7-form > h2 {
	grid-column: 1 / -1;
	margin-top: 20px;
	margin-bottom: 8px;
}

.contactBlock__form .wpcf7 {
	margin: 0;
}

.contactBlock__form .wpcf7-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 24px;
	align-items: start;
}

.contactBlock__form .wpcf7-form > p {
	margin: 0;
}

/* Optional: in CF7 paste e.g. <div class="contactBlock__sectionTitle">Kontaktuppgifter</div> */
.contactBlock__form .wpcf7-form > .contactBlock__sectionTitle {
	grid-column: 1 / -1;
	margin: 24px 0 32px;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 400;
	line-height: 1.2;
	color: #0a0a0a;
	letter-spacing: 0;
	text-transform: none;
}

.contactBlock__form .wpcf7-form > .contactBlock__sectionTitle:first-child {
	margin-top: 0;
	margin-bottom: 32px;
}

/* If CF7 wraps your heading in a <p>, this still spans the row */
.contactBlock__form .wpcf7-form > p:has(.contactBlock__sectionTitle) {
	grid-column: 1 / -1;
	margin-top: 24px;
	margin-bottom: 32px;
}

.contactBlock__form .wpcf7-form > p:has(.contactBlock__sectionTitle):first-child {
	margin-top: 0;
}

.contactBlock__form .wpcf7-form > p:has(.contactBlock__sectionTitle) .contactBlock__sectionTitle {
	margin: 0;
}

/* Full-width rows (field names = CF7 mail tag names) */
.contactBlock__form .wpcf7-form > p:has([name="your-name"]),
.contactBlock__form .wpcf7-form > p:has([name="your-company"]),
.contactBlock__form .wpcf7-form > p:has(select),
.contactBlock__form .wpcf7-form > p:has(textarea),
.contactBlock__form .wpcf7-form > p:has(.wpcf7-submit),
.contactBlock__form .wpcf7-form > p:has(input[type="submit"]) {
	grid-column: 1 / -1;
}

/*
 * Event row: CF7 often lists fields as date → time → guests.
 * We reorder with `order` so layout is: date | guests, then time full width.
 * Mail tags: your-date, your-guests, your-time (or your-tid). Adjust if yours differ.
 */
.contactBlock__form .wpcf7-form > p:has([name="your-date"]) {
	order: 5;
	grid-column: 1;
}

.contactBlock__form .wpcf7-form > p:has([name="your-guests"]) {
	order: 6;
	grid-column: 2;
}

.contactBlock__form .wpcf7-form > p:has([name="your-time"]),
.contactBlock__form .wpcf7-form > p:has([name="your-tid"]) {
	order: 7;
	grid-column: 1 / -1;
}

.contactBlock__form .wpcf7-form > p:has(select) {
	order: 10;
}

.contactBlock__form .wpcf7-form > p:has(textarea) {
	order: 11;
}

.contactBlock__form .wpcf7-form > p:has(.wpcf7-submit),
.contactBlock__form .wpcf7-form > p:has(input[type="submit"]) {
	order: 12;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
	column-gap: 8px;
	text-align: left;
}

/*
 * Footnote (e.g. "Obligatoriska fält") after submit: default order is 0, same as
 * headings — grid sorts by `order` first, so h3 would appear before date/select
 * (order 5–11). Keep it after submit (order 12).
 */
.contactBlock__form .wpcf7-form > h3,
.contactBlock__form .wpcf7-form > p:has(h3) {
	order: 13;
	grid-column: 1 / -1;
	margin:0;
    color: #6A7282;
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px; /* 142.857% */
letter-spacing: -0.15px;
margin-top: -7px;
}

/* Labels: small caps / caption style */
.contactBlock__form .wpcf7-form label {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	color: #6a7282;
	font-family: Inter, system-ui, sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0.55px;
	text-transform: uppercase;
}

.contactBlock__form .wpcf7-form-control-wrap {
	display: flex;
	flex-direction: column;
	align-self: stretch;
	width: 100%;
	box-sizing: border-box;
}

/* Text inputs + select: fixed row height */
.contactBlock__form .wpcf7-text,
.contactBlock__form .wpcf7-email,
.contactBlock__form .wpcf7-tel,
.contactBlock__form .wpcf7-number,
.contactBlock__form .wpcf7-date,
.contactBlock__form .wpcf7-select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
	height: 50px;
	flex-shrink: 0;
	align-self: stretch;
	border-radius: 2px;
	border: 1px solid #d1d5dc;
	padding: 0 16px;
	line-height: calc(50px - 2px);
	background: #fefbf6;
	color: #0a0a0a;
	font-family: Inter, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contactBlock__form .wpcf7-select {
	cursor: pointer;
	appearance: none;
	padding: 0 40px 0 16px;
	line-height: calc(50px - 2px);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230A0A0A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

/* Message field */
.contactBlock__form .wpcf7-textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
	height: 170px;
	min-height: 170px;
	flex-shrink: 0;
	align-self: stretch;
	border-radius: 2px;
	border: 1px solid #d1d5dc;
	padding: 12px 16px;
	background: #fefbf6;
	color: #0a0a0a;
	font-family: Inter, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	resize: vertical;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contactBlock__form .wpcf7-text:focus,
.contactBlock__form .wpcf7-email:focus,
.contactBlock__form .wpcf7-tel:focus,
.contactBlock__form .wpcf7-number:focus,
.contactBlock__form .wpcf7-date:focus,
.contactBlock__form .wpcf7-select:focus,
.contactBlock__form .wpcf7-textarea:focus {
	outline: none;
	border-color: #a33f0f;
	box-shadow: 0 0 0 1px #a33f0f;
}

.contactBlock__form .wpcf7-text::placeholder,
.contactBlock__form .wpcf7-email::placeholder,
.contactBlock__form .wpcf7-tel::placeholder,
.contactBlock__form .wpcf7-number::placeholder,
.contactBlock__form .wpcf7-textarea::placeholder {
	color: rgba(10, 10, 10, 0.45);
	text-transform: none;
	letter-spacing: 0;
	font-size: 15px;
}

/* Email: same border as other fields (UA + WebKit autofill often override border) */
.contactBlock__form .wpcf7-form input[type="email"],
.contactBlock__form .wpcf7-form input.wpcf7-email {
	min-width: 0;
	width: 100%;
	max-width: none;
	border: 1px solid #d1d5dc;
	border-radius: 2px;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
}

.contactBlock__form .wpcf7-form input[type="email"]:-webkit-autofill,
.contactBlock__form .wpcf7-form input[type="email"]:-webkit-autofill:hover,
.contactBlock__form .wpcf7-form input[type="email"]:-webkit-autofill:focus,
.contactBlock__form .wpcf7-form input.wpcf7-email:-webkit-autofill,
.contactBlock__form .wpcf7-form input.wpcf7-email:-webkit-autofill:hover,
.contactBlock__form .wpcf7-form input.wpcf7-email:-webkit-autofill:focus {
	border: 1px solid #d1d5dc !important;
	border-radius: 2px;
	-webkit-text-fill-color: #0a0a0a;
	/* Match field fill + 1px inner edge so the border stays visible like other inputs */
	-webkit-box-shadow: 0 0 0 1000px #fefbf6 inset, 0 0 0 1px #d1d5dc inset;
	box-shadow: 0 0 0 1000px #fefbf6 inset, 0 0 0 1px #d1d5dc inset;
	transition: background-color 9999s ease-out;
}

.contactBlock__form .wpcf7-form input[type="email"]:focus,
.contactBlock__form .wpcf7-form input.wpcf7-email:focus {
	border-color: #a33f0f !important;
	box-shadow: 0 0 0 1px #a33f0f;
}

.contactBlock__form .wpcf7-form input[type="email"]:focus:-webkit-autofill,
.contactBlock__form .wpcf7-form input.wpcf7-email:focus:-webkit-autofill {
	border-color: #a33f0f !important;
	-webkit-box-shadow: 0 0 0 1000px #fefbf6 inset, 0 0 0 1px #a33f0f inset;
	box-shadow: 0 0 0 1000px #fefbf6 inset, 0 0 0 1px #a33f0f inset;
}

/* Submit */
.contactBlock__form .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: none;
	min-width: 200px;
	margin: 8px 0 0;
	margin-inline: 0;
	padding: 16px 28px;
	border: none;
	border-radius: 2px;
	background: #a33f0f;
	color: #fefbf6;
	font-family: Inter, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-transform: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.contactBlock__form .wpcf7-submit:hover,
.contactBlock__form .wpcf7-submit:focus-visible {
	background: #8a350d;
}

.contactBlock__form .wpcf7-submit:focus-visible {
	outline: 2px solid #0a0a0a;
	outline-offset: 2px;
}

/* Validation & messages */
.contactBlock__form .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-family: Inter, system-ui, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: #b42318;
}

.contactBlock__form .wpcf7-response-output {
	margin: clamp(16px, 3vw, 24px) 0 0;
	padding: 12px 14px;
	border-radius: 2px;
	font-family: Inter, system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	letter-spacing: 0;
	text-transform: none;
	grid-column: 1 / -1;
}

.contactBlock__form .wpcf7-validation-errors {
	border: 1px solid rgba(180, 35, 24, 0.35);
	background: rgba(180, 35, 24, 0.06);
	color: #5c1f1a;
}

.contactBlock__form .wpcf7-mail-sent-ok {
	border: 1px solid rgba(22, 101, 52, 0.35);
	background: rgba(22, 101, 52, 0.08);
	color: #14532d;
}

.contactBlock__form .wpcf7-spinner {
	margin-inline-start: 12px;
}

/* Inline HTML / WYSIWYG links in CF7 (labels, headings, notes, response text) */
.contactBlock__form .wpcf7 a,
.contactBlock__form .wpcf7 a:visited {
	color: inherit;
	text-decoration: none;
}

.contactBlock__form .wpcf7 a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------- */
/* Mobile: single column                                                      */
/* -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.contactBlock__form .wpcf7-form {
		grid-template-columns: 1fr;
	}

	.contactBlock__form .wpcf7-form > p:has([name="your-name"]),
	.contactBlock__form .wpcf7-form > p:has([name="your-company"]),
	.contactBlock__form .wpcf7-form > p:has(select),
	.contactBlock__form .wpcf7-form > p:has(textarea),
	.contactBlock__form .wpcf7-form > p:has(.wpcf7-submit),
	.contactBlock__form .wpcf7-form > p:has(input[type="submit"]) {
		grid-column: 1;
	}

	.contactBlock__form .wpcf7-form > p:has([name="your-date"]),
	.contactBlock__form .wpcf7-form > p:has([name="your-guests"]),
	.contactBlock__form .wpcf7-form > p:has([name="your-time"]),
	.contactBlock__form .wpcf7-form > p:has([name="your-tid"]) {
		grid-column: 1;
	}

	.contactBlock__form .wpcf7-submit {
		width: auto;
		max-width: none;
		align-self: flex-start;
	}
}

/* Viewports under 396px: keep block + form centered (avoids heavy side padding skew) */
@media (max-width: 395px) {
	.contactBlock {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 92px 16px 112px;
	}

	.contactBlock__form {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin-inline: auto;
	}

	.contactBlock__form .wpcf7-form > p:has(.wpcf7-submit),
	.contactBlock__form .wpcf7-form > p:has(input[type="submit"]) {
		justify-content: center;
		text-align: center;
	}

	.contactBlock__form .wpcf7-submit {
		align-self: center;
		margin-inline: auto;
	}
}
