/*
 * TECHSOFTX — child theme styles.
 *
 * Style through Elementor's own controls first (Style/Advanced tabs, kit globals).
 * Only rules Elementor has no control for live here; each one says why.
 * Colours come from the kit's global colour variables.
 */

/* Arrow buttons: Button widgets with the class "tsx-btn", and the enquiry form's submit.
 * Neither the Button nor the Form widget has an icon-size control. The design's arrow is 18px,
 * which also gives the designed 56px height: 18 + 2 × 18 padding + 2 × 1 border. */
.tsx-btn .elementor-button-icon,
.tsx-form .elementor-button-icon {
	font-size: 18px;
}

.tsx-btn .elementor-button-icon svg,
.tsx-form .elementor-button-icon svg {
	width: 18px;
	height: 18px;
}

/* Arrow icons: Icon widgets with the class "tsx-arrow". The Icon widget has no line-height
 * control, and its inline icon picks up the body line-height (27px), turning a 24px arrow
 * into a 32px box. Flex removes that line box, so the box is exactly the icon size. */
.tsx-arrow .elementor-icon-wrapper {
	display: flex;
}

/* Hero H1: "momentum." in Cyan 500. Elementor can't colour part of a heading,
 * so the word is wrapped in <em> in the title. */
.tsx-hero-title em {
	font-style: normal;
	color: var(--e-global-color-accent);
}

/* ---------------------------------------------------------------------------
 * Enquiry form (Form widget with the class "tsx-form").
 * Labels, field colours, border, typography, gaps and the button are set in the
 * widget's Style tab. Below is only what that tab has no control for.
 * ------------------------------------------------------------------------- */

/* Underline inputs: no padding or height control. 8 + 24 line + 15 + 1px border = 48px. */
.elementor-widget-form.tsx-form .elementor-field-group .elementor-field-textual {
	min-height: 48px;
	padding: 8px 0 15px;
}

.elementor-widget-form.tsx-form .elementor-field-group textarea.elementor-field-textual {
	height: 104px;
	resize: none; /* no resize handle in the design */
}

/* No placeholder-colour control. */
.elementor-widget-form.tsx-form .elementor-field-group .elementor-field-textual::placeholder {
	color: var(--e-global-color-graphite300);
	opacity: 1;
}

/* Focus: the spec's focus colour on the underline. !important because Elementor's
 * border-colour rule is far more specific. */
.elementor-widget-form.tsx-form .elementor-field-group .elementor-field-textual:focus {
	border-bottom-color: var(--e-global-color-accent) !important;
	box-shadow: none;
	outline: none;
}

/* Topic pills: a checkbox field shown as pills (per the brief). The native box is
 * visually hidden but stays focusable, so the pills work with a keyboard. */
.elementor-widget-form.tsx-form .elementor-field-type-checkbox > .elementor-field-label {
	padding-bottom: 16px; /* 16px under this label; 14px elsewhere (label spacing) */
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option {
	position: relative;
	margin: 0;
	padding: 0;
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option label {
	display: inline-block;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--e-global-color-text);
	color: var(--e-global-color-graphite300);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.21;
	transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option:hover label {
	border-color: var(--e-global-color-graphite300);
	color: var(--e-global-color-white);
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option:has(input:checked) label {
	background-color: var(--e-global-color-accent);
	border-color: var(--e-global-color-accent);
	color: var(--e-global-color-graphite950);
}

.elementor-widget-form.tsx-form .elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option:has(input:focus-visible) label {
	outline: 2px solid var(--e-global-color-accent);
	outline-offset: 2px;
}

/* Consent: a 16×16 square box with a 12px gap to the text; there are no checkbox styling
 * controls. !important on the box because Elementor's field-border rule also targets it,
 * with much higher specificity. */
.elementor-widget-form.tsx-form .elementor-field-type-acceptance .elementor-field-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.elementor-widget-form.tsx-form .elementor-field-type-acceptance .elementor-acceptance-field {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	min-height: 0;
	margin: 1px 0 0;
	padding: 0;
	border: 1px solid var(--e-global-color-text) !important;
	border-radius: 0;
	background: transparent !important;
	cursor: pointer;
}

.elementor-widget-form.tsx-form .elementor-field-type-acceptance .elementor-acceptance-field:checked {
	border-color: var(--e-global-color-accent) !important;
	background: var(--e-global-color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23151B1E' stroke-width='1.6'/%3E%3C/svg%3E") center / 12px no-repeat !important;
}

.elementor-widget-form.tsx-form .elementor-field-type-acceptance .elementor-acceptance-field:focus-visible {
	outline: 2px solid var(--e-global-color-accent);
	outline-offset: 2px;
}

.elementor-widget-form.tsx-form .elementor-field-type-acceptance .elementor-field-subgroup .elementor-field-option label {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--e-global-color-graphite300);
}
