/*
Theme Name:   Divi AI SaaS Child
Theme URI:    https://divicrest.com/
Description:  Child theme for the Divi AI SaaS website (Divi 5). The design lives in Divi modules, presets, Global Colors and variables. This theme holds only the approved code rows (button hover, offer countdown, homepage motion, before/after drag, accessible FAQ); the popups are native Divi canvases, each targeting a dai- class set in a module's Advanced › CSS Class.
Author:       DiviCrest
Author URI:   https://divicrest.com/
Template:     Divi
Version:      1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Tested up to: 7.1
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  divi-ai-saas-child
Domain Path:  /languages
*/

/* A word in the accent violet inside a heading or text (span set in the module's text). */
.dai-accent {
	color: var(--gcid-primary-color);
}

/* Words set in another colour inside one text: the white prices of the CTA band, the muted half of the footer line. */
.dai-tc-white {
	color: var(--gcid-white);
}

.dai-tc-muted {
	color: var(--gcid-muted-text);
}

/* Colours in this theme's CSS are Divi Global Colours (var(--gcid-*)) and change with them in the Variable Manager. */

/* Divi's default 10px space under headings is removed: heading spacing comes from each module's own options. */
.et_pb_heading h1,
.et_pb_heading h2,
.et_pb_heading h3,
.et_pb_heading h4,
.et_pb_heading h5,
.et_pb_heading h6 {
	padding-bottom: 0;
}

/* Row 2: when the visitor's offer time is up (countdown.js adds dai-offer-over), the offer bar and popup are hidden. */
html.dai-offer-over .dai-offer-only {
	display: none !important;
	/* Reason: Divi's display conditions and the open popup print display with !important. */
}

/* Background grid lines (design .gridbg / .ctagrid). Drawn with CSS so the site carries no grid image files;
   the line colour is a Global Colour at low opacity and changes with it. Divi has no line-grid background pattern
   and no mask option. Targets (set by the build in Advanced › CSS Class on the decoration Group):
   .dai-grid (light sections, fades out downwards), .dai-grid-faq (FAQ head, fades from the top centre),
   .dai-grid-dark (dark cards), .dai-cta-grid (CTA band, fades out from the middle). Masks use transparency only. */
.dai-grid,
.dai-grid-faq {
	background-image:
		linear-gradient(color-mix(in srgb, var(--gcid-primary-color) 10%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--gcid-primary-color) 10%, transparent) 1px, transparent 1px);
	background-repeat: repeat;
	/* Divi sets no-repeat on Group backgrounds */
	background-size: 44px 44px;
	background-position: -1px -1px;
}

.dai-grid {
	-webkit-mask-image: linear-gradient(180deg, black 0%, rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.15) 60%, transparent 85%);
	mask-image: linear-gradient(180deg, black 0%, rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.15) 60%, transparent 85%);
}

.dai-grid-faq {
	-webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, black 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, black 20%, transparent 75%);
}

.dai-grid-dark,
.dai-cta-grid {
	background-image:
		linear-gradient(color-mix(in srgb, var(--gcid-white) 8%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--gcid-white) 8%, transparent) 1px, transparent 1px);
	background-repeat: repeat;
	/* Divi sets no-repeat on Group backgrounds */
	background-size: 36px 36px;
}

.dai-cta-grid {
	background-size: 48px 48px;
	background-position: center top;
	-webkit-mask-image: radial-gradient(ellipse 75% 85% at 50% 30%, black 30%, transparent 100%);
	mask-image: radial-gradient(ellipse 75% 85% at 50% 30%, black 30%, transparent 100%);
}

/* Contact form selects: the design's chevron (8 x 4px, 1.6px line) in place of Divi's grey triangle (the Contact
   Field module has no option for the select arrow). Its two strokes are drawn with gradients so the colour is the
   Forest Global Colour. Target: .dai-form (Contact Form › Advanced › CSS Class). */
.dai-form .et_pb_contact_field[data-type="select"]::after {
	display: none;
}

.dai-form select.et_pb_contact_select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 48px;
	cursor: pointer;
	background-image:
		linear-gradient(45deg, transparent calc(50% - 0.8px), var(--gcid-forest) calc(50% - 0.8px), var(--gcid-forest) calc(50% + 0.8px), transparent calc(50% + 0.8px)),
		linear-gradient(-45deg, transparent calc(50% - 0.8px), var(--gcid-forest) calc(50% - 0.8px), var(--gcid-forest) calc(50% + 0.8px), transparent calc(50% + 0.8px));
	background-repeat: no-repeat;
	background-position: right 26px center, right 22px center;
	background-size: 4px 4px;
}

/* Popups (native canvases): Divi appends them inside the page content, whose layer sits under the sticky header
   and the footer. While a popup is open, the page content layer is lifted above both. */
.et-l--post>.et_builder_inner_content:has(> [class*="et-interaction-target-dai"][style*="display: flex"]) {
	z-index: 100000;
}

/* A link with a minimum height (footer links, legal page nav) keeps its label in the middle of the box, as in the
   design; Divi's Link layout options act on the inner label only. Target: .dai-link-mid (set by the build). */
.dai-link-mid {
	justify-content: center;
}