/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ==========================================================================
   CONTENTS
   1. Design tokens (spacing, radius) incl. breakpoints
   2. Components: listing cards
   3. Forms (JetFormBuilder)
      3.1 Base: field styling for all forms
      3.2 Consent checkbox
      3.3 Long form (contact, demo request)
      3.4 Gated content (Success Story / E-Direct download)
      3.5 Phone field (intl-tel-input)
      3.6 Contact form (.cns-form-contact)
      3.7 Forms mobile
   4. Shortcodes in the content editor ([cta], [slider], player)
   5. Pages & CPTs
      5.1 Product pages
      5.2 Success Stories: fact sheet
      5.3 Webinars / events
      5.4 Locations
      5.5 Careers: hiring timeline

   Breakpoints = Elementor: Tablet ≤ 1024px, Mobile ≤ 767px
   Rule: responsive overrides go at the end of their own section.
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
	--space-xxxxs: 4px;
	--space-xxxs: 8px;
	--space-xxs: 12px;
	--space-xs: 16px;
	--space-sm: 24px;
	--space-md: 32px;
	--space-lg: 48px;
	--space-xl: 80px;
	--space-2xl: 120px;
	--space-3xl: 160px;
	--widgets-spacing-custom: 20px;
	--widgets-border-radius: 20px;
}

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
	:root {
		--space-xs: 16px; /* unchanged, don't shrink small values */
		--space-sm: 20px;
		--space-md: 24px;
		--space-lg: 40px;
		--space-xl: 64px;
		--space-2xl: 96px;
		--space-3xl: 120px;
		--widgets-spacing-custom: 16px;
	}
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
	:root {
		--space-xs: 12px;
		--space-sm: 16px;
		--space-md: 24px;
		--space-lg: 32px;
		--space-xl: 48px;
		--space-2xl: 64px;
		--space-3xl: 96px;
		--widgets-spacing-custom: 12px;
	}
}


/* ==========================================================================
   2. COMPONENTS: LISTING CARDS
   Card image for the News and Events listings.
   Class "news-card-media" on the Dynamic Image widget (Advanced → CSS Classes).
   Do NOT set a height in the widget, otherwise the image won't fill the box.
   ========================================================================== */

.news-card-media .jet-listing-dynamic-image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 16px 16px 0 0; /* = card radius */
}

.news-card-media .jet-listing-dynamic-image > a {
	display: block;
	width: 100%;
	height: 100%;
}

.news-card-media .jet-listing-dynamic-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right center; /* text + logo sit on the right, crop only on the left */
}


/* ==========================================================================
   3. FORMS (JetFormBuilder)
   ========================================================================== */

/* 3.1 Base ----------------------------------------------------------------- */

/* Shared styling for text/email fields (checkbox/radio intentionally excluded) */
.jet-form-builder__field:not(.checkboxes-field):not(.checkradio-field) {
	border: none;
	background-color: var(--e-global-color-7b82b7a);
	border-radius: 6px;
	padding: 10px 14px;
}

.jet-form-builder__field:focus {
	outline: none;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
	transition: none;
}

.jfb-long-form,
.jfb-gated-content {
	margin-bottom: 0;
}

/* 3.2 Consent checkbox ----------------------------------------------------- */

/* No border, no box around checkbox + text */
.field-type-checkbox-field .checkradio-wrap,
.field-type-checkbox-field .checkboxes-wrap {
	border: none;
	background: none;
	box-shadow: none;
	padding: 0;
}

.jet-form-builder__field-label.for-checkbox:has(.consent-field) {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: var(--space-xxxs);
}

.jet-form-builder__field-label.for-checkbox:has(.consent-field) > input {
	flex: 0 0 auto;
	margin-top: 0.2em;
}

.jet-form-builder__field-label.for-checkbox:has(.consent-field) > span {
	flex: 1 1 auto;
}

.jet-form-builder__field-label.for-checkbox:has(.consent-field) a {
	display: inline;
	font: inherit;
	text-decoration: underline;
}

/* 3.3 Long form (contact, demo request): 2-column grid ---------------------- */

.jfb-long-form .wp-block-column {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.jfb-long-form .jet-form-builder-row {
	display: flex;
	flex-direction: row !important;
	align-items: center;
	gap: 8px;
}

.jfb-long-form .jet-form-builder-row,
.jfb-long-form .jet-form-builder-row:first-child {
	margin-block-start: 0;
}

.jfb-long-form .jet-form-builder__field-wrap {
	flex: 1;
}

.jfb-long-form .field-type-textarea-field,
.jfb-long-form .field-type-submit-field,
.jfb-long-form .jfb-user-info {
	grid-column: 1 / -1;
}

.jfb-long-form .field-type-checkbox-field {
	grid-column: 1 / -1;
	font-size: 0.8em;
	line-height: 1.5;
}

.jfb-long-form .field-type-checkbox-field p {
	margin-block-end: 0;
}

.jfb-long-form .jet-form-builder__submit-wrap {
	justify-content: center !important;
}

.jfb-long-form .jet-form-builder__submit-wrap button {
	border: unset;
}

/* 3.4 Gated content (downloads): single column, compact -------------------- */

.jfb-gated-content .wp-block-column {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.jfb-gated-content .jet-form-builder-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jfb-gated-content .field-type-checkbox-field {
	border: none;
}

.jfb-gated-content .field-type-checkbox-field p {
	margin-block-end: 0;
	line-height: 1.5;
}

/* Consistent fine print (notice text + consent) */
.jfb-gated-content .asset-privacy-text,
.jfb-gated-content .field-type-checkbox-field {
	font-size: 0.8em;
	line-height: 1.5;
	color: #6b7280; /* TODO: replace with CI grey */
}

.jfb-gated-content .asset-privacy-text {
	margin: 0;
}

.jfb-gated-content .asset-privacy-text a,
.jfb-gated-content .field-type-checkbox-field a {
	display: inline;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.jfb-gated-content .asset-privacy-text a:hover,
.jfb-gated-content .field-type-checkbox-field a:hover {
	color: var(--e-global-color-primary);
}

.jfb-gated-content .jet-form-builder__submit-wrap {
	justify-content: center !important;
}

.jfb-gated-content .jet-form-builder__submit-wrap button {
	border: unset;
}

/* 3.5 Phone field (JetFormBuilder phone block / intl-tel-input) ------------
   Important: do NOT style .iti (width/display), otherwise the library
   calculates the dropdown width incorrectly. The grey box sits on
   .phone-field-wrap. The long selectors are intentional: the phone block
   outputs its own high-specificity <style> per form.
   -------------------------------------------------------------------------- */

/* a) Field box */
.jfb-long-form .phone-field-wrap,
.jfb-gated-content .phone-field-wrap {
	background-color: var(--e-global-color-7b82b7a);
	border-radius: 6px;
}

/* b) Transparent input; padding-left belongs to the 13px in c) */
.jfb-long-form .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap input[type="tel"].jet-form-builder__field.phone-field-intl.iti__tel-input,
.jfb-gated-content .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap input[type="tel"].jet-form-builder__field.phone-field-intl.iti__tel-input {
	background-color: transparent !important;
	border: none !important;
	border-radius: 6px;
	padding-left: 56px !important;
}

/* c) Flag button, otherwise inherits the global button styling */
.jfb-long-form .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap .iti .iti__country-container button.iti__selected-country,
.jfb-gated-content .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap .iti .iti__country-container button.iti__selected-country {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0 6px 0 13px !important;
	min-height: 0 !important;
}

/* d) Placeholder, the block sets #000000 otherwise */
.jfb-long-form .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap input[type="tel"].jet-form-builder__field.phone-field-intl.iti__tel-input::placeholder,
.jfb-gated-content .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap input[type="tel"].jet-form-builder__field.phone-field-intl.iti__tel-input::placeholder {
	color: #9aa0a6 !important;
	opacity: 1 !important;
}

/* 3.6 Contact form (.cns-form-contact) ------------------------------------- */

/* Hide labels visually, keep them for screen readers */
.cns-form-contact .jet-form-builder__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Required asterisk only where no placeholder can carry it:
   phone (placeholder comes from intl-tel-input). */
.cns-form-contact .jet-form-builder__field-wrap {
	position: relative;
}

.cns-form-contact .jet-form-builder-row.field-type-phone-field .jet-form-builder__field-wrap:has(> input.phone-field[required])::after {
	content: "*";
	position: absolute;
	top: 14px;
	right: 20px;
	line-height: 1;
	pointer-events: none;
	color: var(--e-global-color-c95bbfb);
}

/* Select: room for chevron and asterisk */
.cns-form-contact select.jet-form-builder__field {
	padding-right: 48px;
}

/* Consistent placeholder colour: inputs, textarea and empty select */
.cns-form-contact .jet-form-builder__field::placeholder {
	color: #9aa0a6;
	opacity: 1;
}

/* Select still shows the empty placeholder option */
.cns-form-contact select.jet-form-builder__field:has(option[value=""]:checked) {
	color: #9aa0a6;
}

/* Country list in the dropdown back to normal text colour */
.cns-form-contact select.jet-form-builder__field option {
	color: var(--e-global-color-text);
}

/* 3.7 Forms mobile (≤ 767px) ---------------------------------------------- */

@media (max-width: 767px) {
	.jfb-long-form .wp-block-column {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.jfb-long-form .field-type-textarea-field textarea {
		min-height: 80px;
	}
}


/* ==========================================================================
   4. SHORTCODES IN THE CONTENT EDITOR
   PHP: inc/shortcodes-editor.php
   ========================================================================== */

/* [cta]: CTA button in the text editor ------------------------------------- */

.cds-cta {
	margin-block: var(--space-sm);
}

/* [slider]: image slider --------------------------------------------------- */

.cds-slider {
	margin-block: var(--space-lg);
	padding-block: var(--space-sm);
	background: #f5f6f7;
	border-radius: var(--widgets-border-radius);
}

.cds-slider__stage {
	position: relative;
}

.cds-slider__viewport {
	display: flex;
	gap: var(--space-xs);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.cds-slider__viewport::-webkit-scrollbar {
	display: none;
}

.cds-slider__item {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: center;
}

.cds-slider__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: contain;
	background: transparent;
	border-radius: calc(var(--widgets-border-radius) / 2);
}

.cds-slider__link {
	display: block;
	cursor: zoom-in;
}

/* Arrows */
.cds-slider button.cds-slider__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #1d1d1b;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: opacity 0.2s ease;
	z-index: 2;
}

.cds-slider button.cds-slider__nav--prev {
	left: var(--space-xs);
}

.cds-slider button.cds-slider__nav--next {
	right: var(--space-xs);
}

.cds-slider button.cds-slider__nav:hover {
	background: #fff;
	opacity: 0.85;
}

.cds-slider button.cds-slider__nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.cds-slider .cds-slider__icon {
	display: block;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}

/* Thumbnail strip */
.cds-slider__thumbs {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--space-xxxs);
	margin: var(--space-xs) 0 0;
	padding-inline: var(--space-xs);
	list-style: none;
}

.cds-slider__thumbs-item {
	margin: 0;
}

.cds-slider button.cds-slider__thumb {
	display: block;
	width: 76px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	cursor: pointer;
	opacity: 0.4;
	appearance: none;
	-webkit-appearance: none;
	transition: opacity 0.2s ease;
}

.cds-slider button.cds-slider__thumb:hover,
.cds-slider button.cds-slider__thumb.is-current {
	opacity: 1;
	background: none;
}

.cds-slider .cds-slider__thumb-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: calc(var(--widgets-border-radius) / 4);
}

/* Slider Mobile (≤ 767px) */
@media (max-width: 767px) {
	.cds-slider {
		margin-block: var(--space-md);
	}

	.cds-slider button.cds-slider__nav {
		width: 36px;
		height: 36px;
	}

	.cds-slider .cds-slider__icon {
		width: 18px;
		height: 18px;
	}

	.cds-slider button.cds-slider__thumb {
		width: 52px;
	}
}

/* Video player ------------------------------------------------------------- */

.cds-player {
	width: 100%;
	margin: 2rem 0;
	border-radius: 16px;
	overflow: hidden;
	background: #000;
}

.cds-player iframe,
.cds-player video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}


/* ==========================================================================
   5. PAGES & CPTs
   ========================================================================== */

/* 5.1 Product pages ------------------------------------------------------- */

@media (min-width: 680px) and (max-width: 1024px) {
	.hero-image {
		min-height: 640px;
	}
}

/* 5.2 Success Stories: fact sheet ------------------------------------------ */

.fact-sheet {
	font-size: 16px;
	line-height: 1.5;
	border: 1px solid var(--e-global-color-a0b7e9a);
	border-radius: 6px;
	overflow: hidden;
}

.fact-sheet .fact-row {
	display: grid;
	grid-template-columns: 42% 1fr;
	gap: 1rem;
	align-items: baseline;
	padding: .6rem .9rem;
}

.fact-sheet .fact-row:nth-of-type(odd) {
	background: var(--e-global-color-a0b7e9a);
}

.fact-sheet .fact-label {
	color: var(--e-global-color-c95bbfb);
	font-weight: 600;
}

.fact-sheet .fact-value {
	color: var(--e-global-color-text);
}

@media (max-width: 767px) {
	.fact-sheet .fact-row {
		grid-template-columns: 45% 1fr;
		gap: .5rem;
		padding: .55rem .75rem;
	}
}

/* 5.3 Webinars / events --------------------------------------------------- */

/* Speaker without image: hide empty img */
.speaker-card img[src=""],
.speaker-card img:not([src]) {
	display: none;
}

/* 5.4 Locations ------------------------------------------------------------ */

/* Move the local country to the front per language (one container per country) */
html[lang="de"] .locations-country--germany { order: -1; margin-bottom: var(--space-xl); }
html[lang="en"] .locations-country--usa     { order: -1; }
html[lang="it"] .locations-country--italy   { order: -1; }
html[lang="fr"] .locations-country--france  { order: -1; }
html[lang="hr"] .locations-country--croatia { order: -1; }
html[lang="zh"] .locations-country--china   { order: -1; }
html[lang="ja"] .locations-country--japan   { order: -1; }

/* Address card */
.loc-card-address {
	font-style: normal;
	line-height: 1.5;
}

.loc-card-address .loc-card-company,
.loc-card-address .loc-card-street,
.loc-card-address .loc-card-citytown {
	display: block;
}

.loc-card-address .loc-card-company {
	margin-bottom: 0.4em;
}

.loc-card-address .loc-card-phone,
.loc-card-address .loc-card-mail {
	display: block;
	text-decoration: none;
}

.loc-card-address .loc-card-phone {
	margin-top: 0.8em;
}

.loc-card-address .loc-card-mail {
	margin-top: 0.2em;
}

.loc-card-address .loc-card-phone:hover,
.loc-card-address .loc-card-mail:hover {
	text-decoration: underline;
}

.loc-card-address .loc-card-phone::before {
	content: "\260E"; /* telephone */
	margin-right: 0.5em;
	opacity: 0.6;
}

.loc-card-address .loc-card-mail::before {
	content: "\2709"; /* envelope */
	margin-right: 0.5em;
	opacity: 0.6;
}

/* 5.5 Careers: hiring timeline (equal-height cards) ------------------------ */

.cns-hiring-timeline .jet-hor-timeline-list--bottom {
	align-items: stretch;
}

.cns-hiring-timeline .jet-hor-timeline-list--bottom .jet-hor-timeline-item {
	display: flex;
	flex-direction: column;
	align-self: stretch;
}

.cns-hiring-timeline .jet-hor-timeline-list--bottom .jet-hor-timeline-item__card {
	display: flex;
	flex: 1 1 auto;
	height: 100%;
}

.cns-hiring-timeline .jet-hor-timeline-list--bottom .jet-hor-timeline-item__card-inner {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
}
