/*
 * Üle PRahi ligipääsetavus – WCAG 2.2 AA
 * Leidude numbrid (#) viitavad Ligipääsuke OÜ auditile 09.10.2026.
 * Värvid: tume #22223B = rgb(34,34,59), lilla #B696EE = rgb(182,150,238).
 */

/* ==========================================================================
   1. FOOKUS (#15 #18 #41 #42 #47 #48 #68)
   Valge raam + tume rõngas: nähtav nii tumedal kui heledal taustal.
   ========================================================================== */

:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="radio"]):focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #22223B !important;
}

/* #66 Montonio pangad on heledal paneelil: tume raam */
.montonio-bank-item:focus-visible {
	outline: 3px solid #22223B !important;
	box-shadow: 0 0 0 5px #fff !important;
}

/* #18 Blogi kaardid: konteiner on overflow:hidden, raam joonistatakse lingi sisse */
.jet-smart-tiles__box-link:focus-visible {
	outline-offset: -5px !important;
	box-shadow: inset 0 0 0 2px #22223B !important;
}

/* #41 #48 Tootepildid: pilt katab lingi raami, raam joonistatakse pildi peale */
.jet-woo-product-thumbnail,
.jet-woo-category-thumbnail,
.woocommerce-product-gallery__image {
	position: relative;
}
.jet-woo-product-thumbnail:has(a:focus-visible)::after,
.jet-woo-category-thumbnail:has(a:focus-visible)::after,
.woocommerce-product-gallery__image:has(a:focus-visible)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	box-shadow: inset 0 0 0 4px rgb(137, 102, 200), inset 0 0 0 6px #fff;
	pointer-events: none;
}
.jet-woo-product-thumbnail a:focus-visible,
.jet-woo-category-thumbnail a:focus-visible,
.woocommerce-product-gallery__image a:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/* ==========================================================================
   2. SKIP-LINK JA PÜSIV PÄIS (#33 #14)
   ========================================================================== */

/* Astra :focus reegel taastab clip, aga mitte clip-path */
.screen-reader-text:focus,
.skip-link:focus {
	clip-path: none !important;
	z-index: 100000;
}

/* Fookustatud element ei jää päise alla */
html {
	scroll-padding-top: 180px;
}
@media (max-width: 767px) {
	html {
		scroll-padding-top: 230px;
	}
}

/* ==========================================================================
   3. POSTITUSE SISU (#26 #27)
   ========================================================================== */

/* #26 Plokiredaktoriga postituste pealkirjad on Astra globaalse värviga rgb(30,41,59) tumedal taustal */
.elementor-widget-theme-post-content :is(h2, h3, h4) {
	color: rgb(182, 150, 238); /* 6,81:1 taustal rgb(29,29,42) */
}

/* #27 Lingid tekstis ei tohi eristuda ainult värviga */
.elementor-widget-theme-post-content :is(p, li, td, blockquote) a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

/* ==========================================================================
   4. LILLA TAUST + VALGE TEKST → TUME TEKST (#11 #43 #44 #52 #54 #63 jm)
   Tume tekst lillal: 6,31:1 (rgb 182,150,238), 7,29:1 (rgb 193,165,240).
   ========================================================================== */

/* #11 Lillad vahepealkirjad (Elementori Heading, element-ID järgi) */
.elementor-element-f58a0bd .elementor-heading-title, /* avaleht: „väikeettevõtjale …“ */
.elementor-element-b7b3762 .elementor-heading-title, /* „Kuidas saame (veel) abiks olla?“ */
.elementor-element-ed22eab .elementor-heading-title, /* „PRaktiline kraam“ */
.elementor-element-985d8e6 .elementor-heading-title, /* blogi: „Viimatised postitused“ (h1) */

/* Lillad Elementori nupud (element-ID järgi) */
.elementor-element-175eddb .elementor-button,        /* avaleht: „Tee audit ja saad teada!“ */
.elementor-element-336173f .elementor-button,        /* teenused: „Haaran spikri“ */
.elementor-element-5925bae .elementor-button,        /* blogi: „Tee audit ja saad teada!“ */

/* Elementor Pro vormide saatmisnupud (teenused: „Saada“, „Telli!“) */
.elementor-widget-form .elementor-button[type="submit"],

/* #52 Ostukorvi külgpaneeli „Kassasse“ */
.elementor-menu-cart__footer-buttons .elementor-button--checkout,

/* #43 Poe „Lae rohkem“ */
.jet-filters-pagination__load-more .jet-filters-pagination__link,

/* Poe tootekaartide „Vali“ / „Lisa korvi“ (auditis puudus, sama viga) */
.jet-woo-products .jet-woo-product-button .button,

/* #44 Tootelehe „Lisa korvi“ */
.single_add_to_cart_button,

/* #54 Ostukorvi „Edasi kassasse“ */
.wc-proceed-to-checkout .checkout-button,

/* #63 Kassa „Esita tellimus“ */
#place_order {
	color: #22223B !important;
}
.elementor-widget-form .elementor-button[type="submit"] .elementor-button-text,
.elementor-element-175eddb .elementor-button-text,
.elementor-element-336173f .elementor-button-text,
.elementor-element-5925bae .elementor-button-text,
.elementor-menu-cart__footer-buttons .elementor-button--checkout .elementor-button-text {
	color: #22223B !important;
}
/* Nupu ikoonid (SVG) sama värvi kui tekst */
.elementor-element-175eddb .elementor-button svg,
.elementor-element-336173f .elementor-button svg,
.elementor-widget-form .elementor-button[type="submit"] svg {
	fill: #22223B !important;
}

/* #22 Postituse CTA-nupp „Tasuta: PR-eesmärgid ja mõju →“: taust tumedamaks, valge tekst 4,95:1 */
.elementor-element-75a41de .elementor-button {
	background-color: rgb(118, 96, 196) !important;
}

/* ==========================================================================
   5. PLACEHOLDERID, SILDID, TEATED (#31 #45 #57 #58 #61 #62)
   ========================================================================== */

/* #31 Teenuste vormide placeholder: 5,03:1 */
.elementor-field-group ::placeholder {
	color: rgb(124, 88, 190) !important;
	opacity: 1 !important;
}

/* Teenuste vormide sisestatud tekst oli sama lilla (4,18:1) – tumedaks (axe, auditis puudus) */
.elementor-field-group .elementor-field-textual,
.elementor-field-group .elementor-upload-field {
	color: #22223B !important;
}

/* #57 Sooduskoodi placeholder: 6,48:1 */
#coupon_code::placeholder {
	color: rgb(90, 90, 105) !important;
	opacity: 1 !important;
}

/* #45 Tootelehe „Puhasta“: valge 15,44:1 */
.reset_variations {
	color: #fff !important;
}

/* #58 Ostukorvi tarneviisi tekst: valge */
#shipping_method label {
	color: #fff !important;
}

/* Saadetise sisu rida („T-särk … × 1“) – auditis puudus, rgb(51,65,85) tumedal = 1,49:1 */
.woocommerce-shipping-contents,
.woocommerce-shipping-contents small {
	color: rgb(203, 213, 225) !important; /* ~10:1 */
}

/* #61 Transpordikalkulaatori sildid ja tärn */
.woocommerce-shipping-calculator label {
	color: #fff !important;
}
.woocommerce-shipping-calculator label .required {
	color: rgb(255, 150, 150) !important; /* 7,39:1 */
}

/* #62 Kassa „Kas sul on sooduskood?“ teade helehallil taustal */
.woocommerce-form-coupon-toggle .woocommerce-info {
	color: #22223B !important; /* 10,4:1 */
}
.woocommerce-form-coupon-toggle .showcoupon {
	color: rgb(80, 50, 150) !important; /* 6,32:1 */
	text-decoration: underline;
}

/* ==========================================================================
   6. OSTUKORV (#3 #55)
   ========================================================================== */

/* #3 Toodete arv ja peidetud tekst samale reale, et ekraanilugeja loeks ühe fraasina */
.elementor-menu-cart__toggle .elementor-button-icon-qty {
	display: inline-block;
}

/* #55 Sooduskoodi väljale lisatud silt (lisab a11y.js).
   Elementori Cart widgetis on väli nupuga sama kõrge; silt lükkas välja kastist välja.
   Lahendus: silt + väli veeruna, väli täidab ülejäänud kõrguse, nupp joondub alla. */
.ya11y-coupon-label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
}
.e-cart-section.coupon .coupon-col-start:has(.ya11y-coupon-label) {
	display: flex;
	flex-direction: column;
}
.e-cart-section.coupon .coupon-col-start:has(.ya11y-coupon-label) #coupon_code {
	height: auto !important;
	flex: 1 1 auto;
}
@media (min-width: 768px) {
	.e-cart-section.coupon .coupon-col:has(.ya11y-coupon-label) {
		align-items: flex-end;
	}
	.e-cart-section.coupon .coupon-col:has(.ya11y-coupon-label) .coupon-col-start {
		align-self: stretch;
	}
}

/* Ekraanilugejale mõeldud tekst */
.ya11y-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   7. LIGHTBOX (#24) – natiivne <dialog>, asendab Elementori lightboxi postitustes
   ========================================================================== */

html.ya11y-lb-open {
	overflow: hidden;
}
.ya11y-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 56px 72px;
	border: 0;
	background: rgba(20, 20, 32, 0.96);
	color: #fff;
	box-sizing: border-box;
}
.ya11y-lightbox::backdrop {
	background: rgba(20, 20, 32, 0.6);
}
.ya11y-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}
.ya11y-lb-figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.ya11y-lb-img {
	max-width: 100%;
	max-height: calc(100vh - 160px);
	object-fit: contain;
}
.ya11y-lb-caption {
	font-size: 16px;
	text-align: center;
	color: #fff;
}
.ya11y-lb-counter {
	position: absolute;
	top: 16px;
	left: 20px;
	margin: 0;
	font-size: 16px;
	color: #fff;
}
.ya11y-lb-btn {
	position: absolute;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #22223B;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.ya11y-lb-btn:focus,
.ya11y-lb-btn:active {
	background: #22223B !important; /* teema annab fookuses türkiisi tausta */
	color: #fff !important;
}
.ya11y-lb-btn:hover {
	background: rgb(182, 150, 238) !important;
	color: #22223B !important;
}
.ya11y-lb-close {
	top: 12px;
	right: 16px;
}
.ya11y-lb-prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}
.ya11y-lb-next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}
.ya11y-lb-btn[hidden] {
	display: none;
}
@media (max-width: 767px) {
	.ya11y-lightbox {
		padding: 64px 12px 72px;
	}
	.ya11y-lb-prev,
	.ya11y-lb-next {
		top: auto;
		bottom: 12px;
		transform: none;
	}
}

/* Kassa privaatsuspoliitika ja tingimuste lingid tekstis (axe link-in-text-block, auditis puudus) */
.woocommerce-privacy-policy-text a,
.woocommerce-terms-and-conditions-wrapper a {
	text-decoration: underline !important;
	text-underline-offset: 0.15em;
}

/* Varuvariant: a11y.js märgib klassiga pealkirjad ja nupud, millel on valge tekst lillal taustal
   (uued lehed / widgetid, mille ID-d pole ülal loetletud) */
.ya11y-on-lilac,
.ya11y-on-lilac .elementor-button-text,
.ya11y-on-lilac .elementor-heading-title {
	color: #22223B !important;
}
.ya11y-on-lilac svg {
	fill: #22223B !important;
}

/* ==========================================================================
   8. ASTRA NUPPUDE HOVER JA FOOKUS
   Astra globaalne stiil: türkiis rgb(98,202,165) + valge tekst ≈ 2:1.
   Asendus: helelilla #B696EE + tume tekst #22223B = 6,31:1.
   Sama spetsiifilisus nagu Astra reeglil (laeb hiljem → võidab), Elementori ja
   Crocoblocki widgetite omad (spetsiifilisemad) jäävad kehtima.
   ========================================================================== */
:is(.ast-button, .button, button, input[type="button"], input[type="reset"], input[type="submit"]):is(:hover, :focus):not(.ya11y-lb-btn) {
	background-color: #B696EE;
	border-color: #B696EE;
	color: #22223B;
}

/* ==========================================================================
   9. POE TOOTEKAARDID (JetWooBuilder Products Grid, preset 4) – kasutaja leid, auditis puudus
   Hiirega ilmuv lühikirjeldus oli rgb(51,65,85) tumedal taustal = 1,49:1 (1.4.3).
   Hiirega ilmuv sisu (kirjeldus + nupp „Vali“) oli klaviatuuriga kättesaamatu,
   sest visibility:hidden elementi ei saa fokuseerida (2.1.1) → näita ka :focus-within puhul.
   ========================================================================== */
.jet-woo-products .jet-woo-product-excerpt {
	color: rgb(203, 213, 225) !important; /* ~10:1 */
}
.jet-woo-products--preset-4 .jet-woo-products__item:focus-within .jet-woo-products__item-content .hovered-content {
	opacity: 1;
	visibility: visible;
}

/* Koguse välja nooled: Ultimate Addons for Elementor peidab kõigi numbriväljade nooled
   Chrome'is/Edge'is/Safaris (input::-webkit-inner-spin-button { appearance: none }).
   Taastame need koguse väljadel (Firefoxis on need niigi olemas). */
.quantity input.qty::-webkit-inner-spin-button,
.quantity input.qty::-webkit-outer-spin-button {
	-webkit-appearance: inner-spin-button;
	appearance: auto;
	opacity: 1;
}
.quantity input.qty {
	min-width: 64px;
}
