/*
Theme Name: White Velvet
Template: hello-elementor
Version: 1.0.20
Description: Child theme of Hello Elementor for White Velvet Weddings & Events. Elementor builds the pages; this file holds only what Elementor has no control for.
Author: GRA
Text Domain: white-velvet
Requires PHP: 8.3
*/

.wv-highlight {
	color: var(--e-global-color-accent);
}

.wv-dark .wv-highlight {
	color: var(--e-global-color-wvpinkdark);
}

.elementor-heading-title {
	text-wrap: balance;
}

.elementor-widget-text-editor p {
	text-wrap: pretty;
}

.elementor-widget-text-editor a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.elementor-widget-text-editor a:hover {
	color: inherit;
	text-decoration-thickness: 2px;
}

body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--e-global-color-wvwhite, #fff);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--e-global-color-secondary, #1d1d1d);
}

.elementor-popup-modal .dialog-close-button {
	padding: 11px;
}

/* Elementor draws this icon with a font the site doesn't load, so it shows as an empty box. */
.elementor-message::before {
	display: none;
}

/* Form errors float over the form, so showing one doesn't move the fields. */
.elementor-form,
.elementor-form .elementor-field-group {
	position: relative;
}

.elementor-form .elementor-message.elementor-message-danger {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 2;
	width: max-content;
	max-width: 100%;
	margin: 4px 0 0;
	padding: 4px 10px;
	background: var(--e-global-color-secondary, #1d1d1d);
	color: var(--e-global-color-wvwhite, #fff);
	font-size: 13px;
	line-height: 1.4;
}

/* A field's own error straddles its bottom edge: clear of its text, and short of the next field. */
.elementor-form .elementor-field-group .elementor-message.elementor-message-danger {
	top: auto;
	bottom: -10px;
	left: 12px;
	max-width: calc(100% - 24px);
	margin: 0;
}

.elementor-form .elementor-message.elementor-message-danger:empty {
	display: none;
}

/* Elementor's own copy of this rule loads after the popups, so without it their photos download on every page load. */
[data-elementor-type='popup']:not(.elementor-edit-area) {
	display: none;
}

/* Headings inside long text, such as the policies. A Text Editor widget has no spacing or size settings for them. */
.wv-long-text h2 {
	margin: 1.75em 0 0.5em;
	font-size: 1.75em;
}

.wv-long-text h3 {
	margin: 1.25em 0 0.4em;
	font-size: 1.25em;
}

.wv-long-text li {
	margin-bottom: 0.4em;
}

/* Elementor's inline lists have no gap between wrapped rows, which leaves the footer links too close to tap on phones. */
.elementor-icon-list-items.elementor-inline-items {
	row-gap: 8px;
}

/* Elementor's field padding also reaches the date picker's year box, which cuts the year off. */
.flatpickr-calendar .flatpickr-current-month input.cur-year {
	height: auto;
	padding: 0 0 0 0.5ch;
}

.flatpickr-calendar .flatpickr-current-month :is(input.cur-year, select):focus-visible {
	outline: 2px solid var(--e-global-color-secondary, #1d1d1d);
	outline-offset: 2px;
	box-shadow: none;
}

.flatpickr-calendar.open .flatpickr-day.selected {
	border-color: var(--e-global-color-accent, #e8a0b6);
	background: var(--e-global-color-accent, #e8a0b6);
}

/* The consent controls on the Cookie Policy page, which Complianz only styles inside its banner. */
.cmplz-manage-consent-container .cmplz-categories {
	width: 100%;
}

.cmplz-manage-consent-container .cmplz-banner-checkbox {
	display: flex;
}

.cmplz-manage-consent-container .cmplz-category {
	margin-bottom: 8px;
	background-color: var(--e-global-color-wvblush, #fcf5f7);
}

.cmplz-manage-consent-container .cmplz-category-header {
	display: grid;
	grid-template-columns: 1fr auto 24px;
	gap: 12px;
	align-items: center;
	padding: 12px 16px;
}

.cmplz-manage-consent-container .cmplz-category-title {
	font-weight: 700;
}

.cmplz-manage-consent-container .cmplz-consent-checkbox {
	display: block;
	width: 24px;
	height: 24px;
	margin: 0;
	accent-color: var(--e-global-color-accent, #e8a0b6);
}

.cmplz-manage-consent-container [data-category='cmplz_functional'] {
	display: none;
}

.cmplz-manage-consent-container .cmplz-description {
	padding: 0 16px 16px;
}

/* The Complianz cookie banner in the site's style. Its own settings can't reach the fonts or the white and pink on the dark panel without being lost on a plugin reset. */
/* stylelint-disable custom-property-pattern -- these are Complianz's own names. */
body .cmplz-cookiebanner {
	--cmplz_banner_background_color: var(--e-global-color-secondary, #1d1d1d);
	--cmplz_banner_border_color: var(--e-global-color-accent, #e8a0b6);
	--cmplz_banner_border_width: 3px;
	--cmplz_banner_border_radius: 0;
	--cmplz_text_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_hyperlink_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_text_font_size: var(--e-global-typography-wvsmall-font-size, 15px);
	--cmplz_link_font_size: var(--e-global-typography-wvfine-font-size, 13px);
	--cmplz_title_font_size: var(--e-global-typography-wvh4-font-size, 22px);
	--cmplz_category_body_font_size: var(--e-global-typography-wvsmall-font-size, 15px);
	--cmplz_category_header_title_font_size: var(--e-global-typography-wvsmall-font-size, 15px);
	--cmplz_category_header_active_font_size: var(--e-global-typography-wvfine-font-size, 13px);
	--cmplz_category_header_always_active_color: var(--e-global-color-accent, #e8a0b6);
	--cmplz_button_font_size: var(--e-global-typography-wvsmall-font-size, 15px);
	--cmplz_button_border_radius: 0;
	--cmplz_button_accept_background_color: var(--e-global-color-accent, #e8a0b6);
	--cmplz_button_accept_border_color: var(--e-global-color-accent, #e8a0b6);
	--cmplz_button_accept_text_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_button_deny_background_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_button_deny_border_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_button_deny_text_color: var(--e-global-color-secondary, #1d1d1d);
	--cmplz_button_settings_background_color: transparent;
	--cmplz_button_settings_border_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_button_settings_text_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_slider_active_color: var(--e-global-color-accent, #e8a0b6);
	--cmplz_slider_inactive_color: rgb(255 255 255 / 50%);

	font-family: var(--e-global-typography-text-font-family, Montserrat), sans-serif;
}

body .cmplz-cookiebanner .cmplz-btn:hover {
	--cmplz_button_accept_background_color: transparent;
	--cmplz_button_deny_background_color: transparent;
	--cmplz_button_deny_text_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_button_settings_background_color: var(--e-global-color-wvwhite, #fff);
	--cmplz_button_settings_text_color: var(--e-global-color-secondary, #1d1d1d);
}
/* stylelint-enable custom-property-pattern */

body .cmplz-cookiebanner .cmplz-title {
	font-family: var(--e-global-typography-primary-font-family, Gloock), serif;
	font-weight: 400;
}

body .cmplz-cookiebanner .cmplz-close {
	color: var(--e-global-color-wvwhite, #fff);
}

body .cmplz-cookiebanner .cmplz-close:hover {
	color: var(--e-global-color-accent, #e8a0b6);
}

/* Complianz puts the focus on the X as the page opens, and the site's square ring makes it look like a ticked box. */
body .cmplz-cookiebanner .cmplz-close:focus-visible {
	border-radius: 50%;
	outline-color: var(--e-global-color-accent, #e8a0b6);
	outline-offset: 3px;
	box-shadow: none;
}

body .cmplz-cookiebanner .cmplz-categories .cmplz-category {
	background-color: var(--e-global-color-wvtile, #303030);
}

body .cmplz-cookiebanner .cmplz-category-toggle svg {
	fill: var(--e-global-color-wvwhite, #fff);
}

body
	.cmplz-cookiebanner
	.cmplz-categories
	.cmplz-category
	.cmplz-banner-checkbox
	input.cmplz-consent-checkbox:focus
	+ .cmplz-label::before {
	box-shadow: 0 0 0 2px var(--e-global-color-wvwhite, #fff);
}

/* Complianz hides the title on phones and leaves it too little room on larger ones, though the close button's row has space for it. */
@media (width <= 767px) {
	body .cmplz-cookiebanner .cmplz-header {
		grid-template-columns: 20px 1fr 20px;
	}

	body .cmplz-cookiebanner .cmplz-header .cmplz-title {
		display: block;
	}
}

/* On short screens, such as a phone on its side, Complianz shrinks everything to 60% and stretches the banner to the screen's height. */
@media (height <= 400px) {
	body .cmplz-cookiebanner {
		height: auto;
		zoom: 1;
	}

	body .cmplz-cookiebanner .cmplz-header {
		max-height: none;
	}

	/* Complianz sets these with !important. */
	body .cmplz-cookiebanner :is(.cmplz-close, .cmplz-documents, .cmplz-information) {
		zoom: 1 !important;
	}

	body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
		height: 44px !important;
		font-size: var(--e-global-typography-wvsmall-font-size, 15px) !important;
		zoom: 1 !important;
	}
}

/* Elementor has no alignment setting for the words inside a form. */
@media (width <= 767px) {
	.elementor-form .elementor-field-type-html,
	.elementor-form .elementor-field-textual {
		text-align: center;
	}

	.elementor-form select.elementor-field-textual {
		text-align-last: center;
	}

	.elementor-form input[type='date']::-webkit-date-and-time-value {
		text-align: center;
	}

	/* Phones swap the date field for their own date picker, which drops its placeholder, so its label shows instead. */
	.elementor-field-group:has(> input[type='date']) > .elementor-field-label {
		position: static;
		width: 100%;
		height: auto;
		margin: 0 0 8px;
		overflow: visible;
		clip: auto;
		color: var(--e-global-color-accent);
		font-weight: 700;
		text-align: center;
	}
}

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