/*
 * Inner pages – the old Divi content that now sits between the new header and footer (body.dz-inner).
 * Fixes from the QA pass (2026-10-02): no WordPress sidebar, Nunito body text, readable colours on the old lime and
 * yellow cards, visible keyboard focus, wider invitation-form fields on phones and the WooCommerce payment / thank-you
 * pages. No Divi module settings or page content were changed; delete a rule here when its page is rebuilt.
 * Colours: ink #12280F, jungle #244623, leaf link #2F5F1C, bark #552112, warning #5C0E04 – all ≥5:1 on their cards.
 */

/* ---------------------------------------------------------------------------------------------------- layout */

/* Legal pages, the 404 page and the WooCommerce pages used Divi's right sidebar with WordPress's default widgets
 * (search, empty "Naujausi komentarai", "Metainformacija" …): content takes the full width instead. */
body.dz-inner #sidebar { display: none !important; }
body.dz-inner #left-area { float: none !important; width: 100% !important; padding-right: 0 !important; padding-left: 0 !important; }
body.dz-inner #main-content .container::before { display: none !important; }

/* 404 page and empty search results (child theme includes/no-results.php). */
body.dz-inner .dz-noresults { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 0 88px; }
body.dz-inner .dz-noresults__title { margin: 0; padding: 0; color: #244623; font-family: Atma, ui-rounded, system-ui, sans-serif; font-size: clamp(38px, 26px + 3vw, 64px); font-weight: 700; line-height: 1.05; }
body.dz-inner .dz-noresults__text { max-width: 640px; padding: 0; color: #2E3A2D; font-size: 18px; line-height: 1.6; }
body.dz-inner .dz-noresults__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
body.dz-inner .dz-noresults__more { padding: 0; color: #5E6B5C; font-size: 16px; }

/* ----------------------------------------------------------------------------------------------- typography */

/* Body text in the new design's text face (headings keep their Divi fonts, e.g. Atma). */
body.dz-inner #main-content { color: #2E3A2D; }
body.dz-inner #main-content :is(p, li, td, th, dd, dt, blockquote, label, input, textarea, select, figcaption) {
	font-family: Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Keyboard focus on old content links and form controls (Divi removes the outline). */
body.dz-inner #main-content :is(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid #0B5F86 !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 6px rgba(255, 255, 255, .9) !important;
}

/* ------------------------------------------------------------------------------------- old lime content cards */

/* Taisyklės (504), Kainoraštis (299), Pakviesk draugą (573): white / yellow / orange / red text on the lime #82B02C
 * column measured 1.2–2.6:1. Dark text keeps the green card and reads at 5.5:1 or more. */
body.page-id-504 #main-content .et_pb_column_1 :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, b, em, td, th, a),
body.page-id-299 #main-content :is(.et_pb_column_1, .et_pb_column_2) :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, b, em, td, th, a),
body.page-id-573 #main-content .et_pb_column_1 :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, b, em, td, th, a) {
	color: #12280F !important;
	text-shadow: none !important;
}
/* Section titles that were orange, yellow notes ("* Šventinė diena") → bark brown. */
body.page-id-504 #main-content .et_pb_column_1 :is([style*="ff9900"], [style*="ff9900"] *),
body.page-id-299 #main-content :is(.et_pb_column_1, .et_pb_column_2) :is([style*="f9eb27"], [style*="f9eb27"] *, [style*="f9ec31"], [style*="f9ec31"] *) {
	color: #552112 !important;
}
/* Warnings that were pure red → dark red (5.5:1 on lime). */
body.page-id-504 #main-content .et_pb_column_1 :is([style*="ff0000"], [style*="ff0000"] *),
body.page-id-573 #main-content :is([style*="color:red"], [style*="color:red"] *, [style*="color: red"], [style*="color: red"] *) {
	color: #5C0E04 !important;
}

/* ----------------------------------------------------------------------------------- links on light backgrounds */

/* Kontaktai (321): lime links on the yellow cards (2.1:1) → jungle green. */
body.page-id-321 #main-content :is(.et_pb_column_1, .et_pb_column_2) a:not(.et_pb_button):not(.icon) {
	color: #244623 !important;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
/* Legal pages: lime links on white (2.6:1) → dark leaf green (7.6:1). */
body:is(.page-id-1088, .page-id-1086, .page-id-1080, .page-id-1084, .page-id-201) #main-content a:not(.et_pb_button) {
	color: #2F5F1C !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------------- Pakviesk draugą: the form */

/* Typed text and placeholders were lime on cream (2.4:1). */
body.page-id-573 #main-content .et_pb_contact_form :is(input, textarea) { color: #12280F !important; }
body.page-id-573 #main-content .et_pb_contact_form :is(input, textarea)::placeholder { color: #5E6B5C !important; opacity: 1; }

/* The fields were 212 px wide on phones (50 px card padding in an 80 % row) and cut their placeholders. */
@media (max-width: 980px) {
	body.page-id-573 #main-content .et_pb_row_1 { width: 90% !important; }
	body.page-id-573 #main-content .et_pb_column_1 { padding-right: 20px !important; padding-left: 20px !important; }
	body.page-id-573 #main-content .et_pb_contact_form .et_pb_contact_field {
		width: 100% !important;
		max-width: none !important;
		margin-left: 0 !important;
		padding-left: 0 !important;
		float: none !important;
	}
	body.page-id-573 #main-content .et_pb_contact_form :is(input, textarea) { width: 100% !important; }
	body.page-id-573 #main-content .et_pb_contact_form :is(input, textarea)::placeholder { font-size: 14px; }
}
@media (max-width: 400px) {
	body.page-id-573 #main-content .et_pb_contact_form :is(input, textarea) { padding-right: 10px !important; padding-left: 12px !important; }
	body.page-id-573 #main-content .et_pb_contact_form :is(input, textarea)::placeholder { font-size: 13px; }
}

/* ------------------------------------------------------------------------------ WooCommerce payment pages */

/* "Apmokėti": lime text on light grey (2.1:1) with no focus ring → the site's yellow call-to-action. */
body.dz-inner.woocommerce-checkout #place_order {
	min-height: 54px;
	padding: 14px 30px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #FCD236 !important;
	color: #552112 !important;
	font-family: Nunito, ui-rounded, system-ui, sans-serif !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	box-shadow: 0 12px 24px -10px rgba(252, 210, 54, .65), inset 0 -3px 0 rgba(85, 33, 18, .14) !important;
	transition: transform .2s, box-shadow .2s;
}
body.dz-inner.woocommerce-checkout #place_order::after { display: none !important; } /* Divi's hover arrow */
body.dz-inner.woocommerce-checkout #place_order:hover { transform: translateY(-2px); background: #FDDA4F !important; }
body.dz-inner.woocommerce-checkout #place_order:focus-visible { outline: 3px solid #0B5F86 !important; outline-offset: 3px !important; }

/* Thank-you page: the order sat in the left half of the checkout layout with the right half empty, and its details
 * broke mid-word ("DZPUQ / 4CA"). Show it as one centred column. */
body.woocommerce-order-received #main-content .et_pb_row:has(.woocommerce-order) > .et_pb_column:not(:has(.woocommerce-order)) {
	display: none !important;
}
body.woocommerce-order-received #main-content .et_pb_row:has(.woocommerce-order) > .et_pb_column:has(.woocommerce-order) {
	float: none !important;
	width: 100% !important;
	max-width: 820px;
	margin-right: auto !important;
	margin-left: auto !important;
}
body.woocommerce-order-received .woocommerce-order :is(td, th, li, p) {
	word-break: normal !important;
	overflow-wrap: break-word;
}
