/**
 * Haris Contact for Elementor — frontend styles.
 * Colours, sizes and spacing come from the Elementor Style tab;
 * the values here are structural fallbacks only.
 */

.haris-contact {
	--haris-ct-align: center;
	--haris-ct-justify: center;
	position: relative;
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 100px 70px 110px;
	background-color: #0a0a0a;
}

.haris-contact,
.haris-contact *,
.haris-contact *::before,
.haris-contact *::after {
	box-sizing: border-box;
}

.haris-contact__inner {
	width: 100%;
	max-width: 900px;
	text-align: var(--haris-ct-align, center);
}

.haris-contact__title {
	margin: 0;
	color: #fff;
	font-size: 42px;
	font-weight: 300;
	line-height: 1.24;
}

.haris-contact__subtitle {
	margin: 18px 0 0;
	color: #a2a2a2;
	font-size: 15px;
	line-height: 1.65;
}

/* ------------------------------------------------------------ Button row */

.haris-contact__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--haris-ct-justify, center);
	gap: 16px;
	margin-top: 44px;
}

.haris-contact__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 17px 26px;
	border: 1px solid transparent;
	background-color: transparent;
	color: #f0f0f0;
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.3s ease, color 0.3s ease,
		border-color 0.3s ease;
}

.haris-contact__btn--primary {
	border-color: #e8c547;
	background-color: #e8c547;
	color: #0a0a0a;
}

.haris-contact__btn--secondary {
	border-color: rgba(255, 255, 255, 0.35);
}

.haris-contact__btn[disabled] {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}

.haris-contact__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.haris-contact__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	font-size: 14px;
	line-height: 1;
}

.haris-contact__btn-icon i,
.haris-contact__btn-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: none;
}

.haris-contact__btn-icon i {
	fill: currentColor;
}

/* --------------------------------------------------------------- Pop-up */

.haris-contact__modal[hidden] {
	display: none;
}

.haris-contact__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: left;
}

.haris-contact__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(5, 5, 5, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.haris-contact__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 48px);
	padding: 40px;
	overflow-y: auto;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	background-color: #121212;
	opacity: 0;
	transform: translateY(14px) scale(0.985);
	transition: opacity 0.3s ease,
		transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.haris-contact__modal.is-open .haris-contact__backdrop,
.haris-contact__modal.is-open .haris-contact__dialog {
	opacity: 1;
}

.haris-contact__modal.is-open .haris-contact__dialog {
	transform: none;
}

.haris-contact__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #9b9b9b;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.haris-contact__close svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: none;
}

.haris-contact__close:hover {
	background-color: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.haris-contact__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.haris-contact__form-title {
	margin: 0 34px 0 0;
	color: #fff;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.3;
}

.haris-contact__form-intro {
	margin: 10px 0 0;
	color: #9b9b9b;
	font-size: 14px;
	line-height: 1.6;
}

/* ---------------------------------------------------------------- Fields */

.haris-contact__form {
	margin-top: 26px;
}

.haris-contact__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.haris-contact__field {
	display: flex;
	flex-direction: column;
	flex: 1 1 100%;
	min-width: 0;
}

.haris-contact__field--w50 {
	flex: 1 1 calc(50% - 7px);
}

.haris-contact__label {
	display: block;
	margin-bottom: 7px;
	color: #bdbdbd;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 1.5px;
	line-height: 1;
	text-transform: uppercase;
}

/* Hidden from view but still read out, so the field keeps its name. */
.haris-contact__label--hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.haris-contact__req {
	color: #c9a227;
}

.haris-contact__input {
	display: block;
	width: 100%;
	padding: 13px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 2px;
	background-color: rgba(255, 255, 255, 0.04);
	color: #f2f2f2;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	appearance: none;
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.haris-contact__input::placeholder {
	color: #6e6e6e;
	opacity: 1;
}

.haris-contact__input:focus {
	border-color: #c9a227;
}

/*
 * Themes style `input:focus` with a ring of their own — sometimes an outline,
 * sometimes a box-shadow, often with !important. It reads as a pale border
 * outside the field that none of the border controls can touch, so both
 * properties are cleared here, and !important is the only thing that reliably
 * beats a theme that used it first. Focus stays visible: the border takes the
 * focus colour.
 */
.haris-contact:not(.haris-contact--ring)
	.haris-contact__dialog
	.haris-contact__input:focus,
.haris-contact:not(.haris-contact--ring)
	.haris-contact__dialog
	.haris-contact__input:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/*
 * With the widget's own Focus Ring turned on, the same rule draws it — from
 * the custom properties the Style tab sets — so it wins on equal terms.
 */
.haris-contact--ring .haris-contact__dialog .haris-contact__input:focus,
.haris-contact--ring .haris-contact__dialog .haris-contact__input:focus-visible {
	outline: var(--haris-ct-ring-width, 2px) var(--haris-ct-ring-style, solid)
		var(--haris-ct-ring-color, #c9a227) !important;
	outline-offset: var(--haris-ct-ring-offset, 2px) !important;
	box-shadow: none !important;
}

/*
 * Chrome paints its own pale background and near-black text on a field it
 * fills from saved addresses, which is unreadable on a dark form. There is no
 * property that overrides it, so the accepted fix is a huge inset shadow; the
 * long transition keeps it from flashing back on re-render.
 */
.haris-contact .haris-contact__dialog .haris-contact__input:-webkit-autofill,
.haris-contact .haris-contact__dialog .haris-contact__input:-webkit-autofill:hover,
.haris-contact .haris-contact__dialog .haris-contact__input:-webkit-autofill:focus,
.haris-contact .haris-contact__dialog .haris-contact__input:-webkit-autofill:active {
	-webkit-text-fill-color: var(--haris-ct-input-color, #f2f2f2);
	/* !important, because the focus reset above clears box-shadow the same way. */
	-webkit-box-shadow: 0 0 0 1000px var(--haris-ct-autofill, #161616) inset !important;
	box-shadow: 0 0 0 1000px var(--haris-ct-autofill, #161616) inset !important;
	caret-color: var(--haris-ct-input-color, #f2f2f2);
	transition: background-color 100000s ease-in-out 0s;
}

.haris-contact__input--textarea {
	min-height: 96px;
	resize: vertical;
}

.haris-contact__field.is-invalid .haris-contact__input {
	border-color: #e08a8a;
}

/* Date inputs render their picker icon almost black on a dark field. */
.haris-contact__input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(1);
	opacity: 0.55;
	cursor: pointer;
}

.haris-contact__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	color: #9b9b9b;
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
}

.haris-contact__checkbox {
	flex: 0 0 auto;
	margin-top: 2px;
	accent-color: #c9a227;
}

/* The honeypot: off-screen, never focusable, never announced. */
.haris-contact__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------- Submit */

.haris-contact__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 20px;
	padding: 16px 28px;
	border: 0;
	background-color: #e8c547;
	color: #0a0a0a;
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.haris-contact__submit--full {
	width: 100%;
}

.haris-contact__submit[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.haris-contact__submit:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.haris-contact__status {
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.5;
}

.haris-contact__status:empty {
	display: none;
}

.haris-contact__status--ok {
	color: #7bc67b;
}

.haris-contact__status--error {
	color: #e08a8a;
}

.haris-contact__status--busy {
	color: #9b9b9b;
}

/* A form from another plugin keeps its own styling. */
.haris-contact__embed {
	margin-top: 24px;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1024px) {
	.haris-contact {
		padding: 78px 32px 86px;
	}

	.haris-contact__title {
		font-size: 34px;
	}
}

@media (max-width: 767px) {
	.haris-contact {
		padding: 56px 20px 64px;
	}

	.haris-contact__title {
		font-size: 27px;
	}

	.haris-contact--stack-mobile .haris-contact__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.haris-contact--stack-mobile .haris-contact__btn {
		width: 100%;
	}

	.haris-contact__modal {
		padding: 14px;
	}

	.haris-contact__dialog {
		max-height: calc(100vh - 28px);
		padding: 26px 22px;
	}

	/* Two half-width fields side by side get too narrow to type in. */
	.haris-contact__field--w50 {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------------ A11y / RM */

@media (prefers-reduced-motion: reduce) {
	.haris-contact *,
	.haris-contact *::before,
	.haris-contact *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.haris-contact__dialog {
		transform: none;
	}
}
