/* Native, Elementor and custom-widget rich-text output. */
:root {
	--okcid-rich-text-link-color: var(--blue-dark, var(--e-global-color-cfb89e5, #0d5be2));
	--okcid-rich-text-link-surface: var(--neutral-0, var(--e-global-color-4756d5c, #fff));
	--okcid-rich-text-link-underline-size: 1px;
	--okcid-rich-text-list-indent: 1.25em;
	--okcid-rich-text-list-item-gap: 4px;
	--okcid-rich-text-list-before: 8px;
	--okcid-rich-text-list-after: 16px;
}

body:has(.okcid-page-hero--color-amber) {
	--okcid-rich-text-link-color: color-mix(in srgb, var(--amber-dark, var(--e-global-color-29fbbbb, #cc8d00)) 70%, #000);
}

body:has(.okcid-page-hero--color-teal) {
	--okcid-rich-text-link-color: color-mix(in srgb, var(--teal-dark, var(--e-global-color-31132d2, #00a188)) 70%, #000);
}

/* Preserve inherited light text links on dark component surfaces. */
.okcid-tabs-info__description,
.okcid-form--surface-dark {
	--okcid-rich-text-link-color: inherit;
}

.okcid-form--surface-dark,
.elementor-location-footer {
	--okcid-rich-text-link-surface: var(--neutral-900, var(--e-global-color-text, #2d2d2f));
}

/* Contact details share the prose link effect on their dark sidebar card. */
#contact-form-section .okcid-supporting-card--dark {
	--okcid-rich-text-link-color: currentColor;
	--okcid-rich-text-link-surface: var(--okcid-supporting-card-dark);
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) {
	color: var(--e-global-color-text, #2d2d2f);
	font-family: var(--e-global-typography-text-font-family, "Raleway"), sans-serif;
	font-size: var(--e-global-typography-text-font-size, 16px);
	font-weight: var(--e-global-typography-text-font-weight, 600);
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) :where(p, blockquote, figure, .wp-block-video, .wp-block-embed) {
	margin-block: 0 var(--space-lg, 20px);
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) :where(h1, h2, h3, h4, h5, h6) {
	color: inherit;
	margin-block: var(--space-xl, 40px) var(--space-md, 16px);
}

/* Shared prose lists; retain native bullets, numbering, and inherited typography. */
:is(
	.okcid-rich-text,
	.elementor-widget-text-editor,
	.elementor-widget-theme-post-content,
	.okcid-single-entry__body,
	.okcid-information-bar__body,
	.okcid-information-bar__value,
	.okcid-sidebar-layout__main-content,
	.okcid-supporting-card__body,
	.okcid-supporting-detail__value,
	:where(body:not(.elementor-page) .site-main > .page-content)
) :where(ul, ol) {
	margin-block: var(--okcid-rich-text-list-before) var(--okcid-rich-text-list-after);
	margin-inline: 0;
	padding-inline: var(--okcid-rich-text-list-indent) 0;
	list-style-position: outside;
}

:is(
	.okcid-rich-text,
	.elementor-widget-text-editor,
	.elementor-widget-theme-post-content,
	.okcid-single-entry__body,
	.okcid-information-bar__body,
	.okcid-information-bar__value,
	.okcid-sidebar-layout__main-content,
	.okcid-supporting-card__body,
	.okcid-supporting-detail__value,
	:where(body:not(.elementor-page) .site-main > .page-content)
) :where(ul, ol) > li + li {
	margin-block-start: var(--okcid-rich-text-list-item-gap);
}

:is(
	.okcid-rich-text,
	.elementor-widget-text-editor,
	.elementor-widget-theme-post-content,
	.okcid-single-entry__body,
	.okcid-information-bar__body,
	.okcid-information-bar__value,
	.okcid-sidebar-layout__main-content,
	.okcid-supporting-card__body,
	.okcid-supporting-detail__value,
	:where(body:not(.elementor-page) .site-main > .page-content)
) :where(p):has(+ :where(ul, ol)) {
	margin-block-end: 0;
}

:is(
	.okcid-rich-text,
	.elementor-widget-text-editor,
	.elementor-widget-theme-post-content,
	.okcid-single-entry__body,
	.okcid-information-bar__body,
	.okcid-information-bar__value,
	.okcid-sidebar-layout__main-content,
	.okcid-supporting-card__body,
	.okcid-supporting-detail__value,
	:where(body:not(.elementor-page) .site-main > .page-content)
) :where(ul:first-child, ol:first-child) {
	margin-block-start: 0;
}

:is(
	.okcid-rich-text,
	.elementor-widget-text-editor,
	.elementor-widget-theme-post-content,
	.okcid-single-entry__body,
	.okcid-information-bar__body,
	.okcid-information-bar__value,
	.okcid-sidebar-layout__main-content,
	.okcid-supporting-card__body,
	.okcid-supporting-detail__value,
	:where(body:not(.elementor-page) .site-main > .page-content)
) :where(ul:last-child, ol:last-child) {
	margin-block-end: 0;
}

:is(
	.okcid-rich-text,
	.elementor-widget-text-editor,
	.elementor-widget-theme-post-content,
	.okcid-single-entry__body,
	.okcid-information-bar__body,
	.okcid-information-bar__value,
	.okcid-sidebar-layout__main-content,
	.okcid-supporting-card__body,
	.okcid-supporting-detail__value,
	:where(body:not(.elementor-page) .site-main > .page-content)
) :where(li) > :is(ul, ol) {
	margin-block: var(--okcid-rich-text-list-item-gap) 0;
}

#contact-form-section .okcid-supporting-card__body a:where(:not(.okcid-button__link)),
.okcid-rich-text :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
body:not(.elementor-page) .site-main > .page-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
.elementor-widget-text-editor > .elementor-widget-container :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
.elementor-widget-theme-post-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
.okcid-form .gform_wrapper :where(.gform_description, .gsection_description, .gfield_description, .gfield_consent_label, .gfield_consent_description, .gfield_html) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
.okcid-form .gform_confirmation_message a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
.okcid-faq .e-n-accordion-item > .e-con a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
.okcid-faq .elementor-tab-content a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)) {
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: left bottom;
	background-repeat: no-repeat;
	background-size: 0 var(--okcid-rich-text-link-underline-size);
	color: var(--okcid-rich-text-link-color);
	font-weight: 700;
	text-decoration: none;
	text-shadow:
		-0.09em 0 var(--okcid-rich-text-link-surface),
		-0.045em 0 var(--okcid-rich-text-link-surface),
		0.045em 0 var(--okcid-rich-text-link-surface),
		0.09em 0 var(--okcid-rich-text-link-surface);
	transition: background-size 220ms cubic-bezier(0.19, 1, 0.22, 1);
}

@media (hover: hover) and (pointer: fine) {
	#contact-form-section .okcid-supporting-card__body a:where(:not(.okcid-button__link)):hover,
	.okcid-rich-text :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	body:not(.elementor-page) .site-main > .page-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	.elementor-widget-text-editor > .elementor-widget-container :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	.elementor-widget-theme-post-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	.okcid-form .gform_wrapper :where(.gform_description, .gsection_description, .gfield_description, .gfield_consent_label, .gfield_consent_description, .gfield_html) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	.okcid-form .gform_confirmation_message a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	.okcid-faq .e-n-accordion-item > .e-con a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover,
	.okcid-faq .elementor-tab-content a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):hover {
		background-size: 100% var(--okcid-rich-text-link-underline-size);
	}
}

#contact-form-section .okcid-supporting-card__body a:where(:not(.okcid-button__link)):focus-visible,
.okcid-rich-text :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
body:not(.elementor-page) .site-main > .page-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
.elementor-widget-text-editor > .elementor-widget-container :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
.elementor-widget-theme-post-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
.okcid-form .gform_wrapper :where(.gform_description, .gsection_description, .gfield_description, .gfield_consent_label, .gfield_consent_description, .gfield_html) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
.okcid-form .gform_confirmation_message a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
.okcid-faq .e-n-accordion-item > .e-con a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible,
.okcid-faq .elementor-tab-content a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)):focus-visible {
	background-size: 100% var(--okcid-rich-text-link-underline-size);
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	#contact-form-section .okcid-supporting-card__body a:where(:not(.okcid-button__link)),
	.okcid-rich-text :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	body:not(.elementor-page) .site-main > .page-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	.elementor-widget-text-editor > .elementor-widget-container :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	.elementor-widget-theme-post-content :where(p, li, blockquote, figcaption) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	.okcid-form .gform_wrapper :where(.gform_description, .gsection_description, .gfield_description, .gfield_consent_label, .gfield_consent_description, .gfield_html) a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	.okcid-form .gform_confirmation_message a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	.okcid-faq .e-n-accordion-item > .e-con a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)),
	.okcid-faq .elementor-tab-content a:where(:not(.wp-element-button):not(.elementor-button):not(.okcid-button__link)) {
		transition: none;
	}
}

/* Reuse the animated underline on footer text links without overriding their configured colors. */
.elementor-location-footer :is(.elementor-widget-nav-menu a.elementor-item, .elementor-widget-text-editor a) {
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: left bottom;
	background-repeat: no-repeat;
	background-size: 0 var(--okcid-rich-text-link-underline-size);
	text-decoration: none;
	text-shadow:
		-0.09em 0 var(--okcid-rich-text-link-surface),
		-0.045em 0 var(--okcid-rich-text-link-surface),
		0.045em 0 var(--okcid-rich-text-link-surface),
		0.09em 0 var(--okcid-rich-text-link-surface);
	transition: background-size 220ms cubic-bezier(0.19, 1, 0.22, 1);
}

@media (hover: hover) and (pointer: fine) {
	.elementor-location-footer :is(.elementor-widget-nav-menu a.elementor-item, .elementor-widget-text-editor a):hover {
		background-size: 100% var(--okcid-rich-text-link-underline-size);
	}
}

.elementor-location-footer :is(.elementor-widget-nav-menu a.elementor-item, .elementor-widget-text-editor a):focus-visible {
	background-size: 100% var(--okcid-rich-text-link-underline-size);
}

@media (prefers-reduced-motion: reduce) {
	.elementor-location-footer :is(.elementor-widget-nav-menu a.elementor-item, .elementor-widget-text-editor a) {
		transition: none;
	}
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) blockquote {
	border-inline-start: var(--space-xs, 4px) solid var(--blue, var(--e-global-color-secondary, #3096ff));
	margin-inline: 0;
	padding-inline-start: var(--space-lg, 20px);
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) :where(img, video) {
	height: auto;
	max-width: 100%;
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) :where(figcaption, .wp-element-caption) {
	color: var(--e-global-color-ee6e0e1, #55585f);
	font-family: var(--e-global-typography-text-font-family, "Raleway"), sans-serif;
	margin-block-start: var(--space-sm, 8px);
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) :where(.wp-block-embed__wrapper, iframe) {
	max-width: 100%;
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) > :first-child {
	margin-block-start: 0;
}

:where(body:not(.elementor-page) .site-main > .page-content, .elementor-widget-theme-post-content) > :last-child {
	margin-block-end: 0;
}

/* Keep rental-space paragraph notes compact; lists use the shared prose rules. */
.okcid-rental-spaces-section .elementor-widget-text-editor > p,
.okcid-rental-spaces-section .elementor-widget-text-editor > .elementor-widget-container > p {
	margin: 0 !important;
}

.okcid-rental-spaces-section .elementor-widget-text-editor > p + p,
.okcid-rental-spaces-section .elementor-widget-text-editor > .elementor-widget-container > p + p {
	margin-block-start: 16px !important;
}

/* Keep every rental-space accordion panel on the same copy/media grid. */
.okcid-rental-spaces-section .okcid-rental-space-item {
	align-items: start;
	flex-direction: row !important;
	gap: 16px !important;
}

.okcid-rental-spaces-section :is(.okcid-rental-space-item__copy, .okcid-rental-space-item__media) {
	flex: 1 1 0 !important;
	min-width: 0;
	width: auto !important;
}

.okcid-rental-spaces-section .okcid-rental-space-item__actions {
	flex-wrap: wrap;
	gap: 12px 16px;
}

/* Let selected rental-space panels preview the intro/collage vertical layout. */
.okcid-rental-spaces-section .okcid-rental-space-item.okcid-rental-space-item--vertical {
	flex-direction: column !important;
	gap: 32px !important;
}

.okcid-rental-spaces-section .okcid-rental-space-item--vertical > :is(.okcid-rental-space-item__content, .okcid-rental-space-item__heading, .elementor-widget-okcid-information-bar, .okcid-rental-space-item__notes, .okcid-rental-space-item__actions, .okcid-rental-space-item__media),
.okcid-rental-spaces-section .okcid-rental-space-item__content > :is(.elementor-widget-okcid-information-bar, .okcid-rental-space-item__notes, .okcid-rental-space-item__media) {
	flex: 0 0 auto !important;
	max-width: none !important;
	width: 100% !important;
}

/* Share the nested Elementor container's gap across its cards and photo collage. */
.okcid-rental-spaces-section .okcid-rental-space-item__content {
	--okcid-rental-space-item-gap: var(--row-gap, 20px);
}

.okcid-rental-spaces-section .okcid-rental-space-item__content .okcid-information-bar__grid {
	gap: var(--okcid-rental-space-item-gap);
}

.okcid-rental-spaces-section .okcid-rental-space-item__media .okcid-photo-collage {
	--okcid-photo-collage-gap: var(--okcid-rental-space-item-gap, 20px);
}

.okcid-rental-spaces-section .okcid-rental-space-item--vertical :is(.okcid-information-bar__label, .okcid-information-bar__heading) {
	max-width: 28ch;
	text-wrap: balance;
}

@media (max-width: 1024px) {
	.okcid-rental-spaces-section .okcid-rental-space-item {
		gap: 28px !important;
	}

	.okcid-rental-spaces-section .okcid-rental-space-item__media .okcid-photo-collage {
		--okcid-photo-collage-height: 420px;
	}
}

@media (max-width: 767px) {
	.okcid-rental-spaces-section .okcid-rental-space-item {
		align-items: stretch;
		flex-direction: column !important;
		gap: 32px !important;
	}

	.okcid-rental-spaces-section :is(.okcid-rental-space-item__copy, .okcid-rental-space-item__media) {
		flex-basis: auto !important;
		max-width: none !important;
		width: 100% !important;
	}

	.okcid-rental-spaces-section .okcid-rental-space-item__media .okcid-photo-collage {
		--okcid-photo-collage-gap: var(--okcid-rental-space-item-gap, 12px);
		--okcid-photo-collage-height: clamp(320px, 105vw, 420px);
	}

	.okcid-rental-spaces-section .okcid-rental-space-item__actions {
		align-items: stretch;
		flex-direction: column !important;
	}

	.okcid-rental-spaces-section .okcid-rental-space-item__actions > .elementor-element {
		width: 100%;
	}

	.okcid-rental-spaces-section .okcid-rental-space-item__actions .okcid-button__link {
		justify-content: center;
		width: 100%;
	}
}
