/* VP Blocksy (plan 011a). Loaded after Blocksy's main styles and vp-home's brand.css (the fonts + the 010b :root tokens, --p-*).
   It maps the 010b system onto Blocksy's own variables (the palette itself is Blocksy's colorPalette mod, the one colour source, S3) and
   styles the WooCommerce and Tutor screens with scoped selectors. No element reset, nothing from the taste kit's system.css (M5).
   Fallbacks after each var() keep the page readable when vp-home (brand.css) is not active. */

/* ---------------------------------------------------------------- 1. tokens onto Blocksy */
/* on body as well: Blocksy prints its own :root values inline after this file, and body's win for everything inside it */
:root, body {
	--vpb-ink: var(--p-ink, #1a335c);
	--vpb-muted: var(--p-muted, #556887);
	--vpb-bg: var(--p-bg, #f5f3ee);
	--vpb-surface: var(--p-surface, #e9e9e7);
	--vpb-action: var(--p-action, #d9541a);
	--vpb-action-ink: var(--p-action-ink, #111111);
	--vpb-line: color-mix(in oklab, var(--vpb-ink) 18%, transparent);
	--vpb-r-sm: 8px;
	--vpb-r-md: 12px;
	--vpb-r-lg: 20px;
	--vpb-font: var(--font-text, "Schibsted Grotesk", system-ui, sans-serif);

	--theme-font-family: var(--vpb-font);
	--theme-text-color: var(--vpb-ink);
	--theme-headings-color: var(--vpb-ink);
	--theme-heading-color: var(--vpb-ink);
	--theme-link-initial-color: var(--vpb-ink);
	--theme-link-hover-color: var(--vpb-action);
	--theme-border-color: var(--vpb-line);
	--theme-table-border-color: var(--vpb-line);
	/* buttons: the 010b solid button (orange, near-black label, radius 8, 48px) */
	--theme-button-background-initial-color: var(--vpb-action);
	--theme-button-text-initial-color: var(--vpb-action-ink);
	--theme-button-background-hover-color: var(--vpb-ink);
	--theme-button-text-hover-color: var(--vpb-bg);
	--theme-button-border-radius: var(--vpb-r-sm);
	--theme-button-min-height: 48px;
	--theme-button-font-weight: 600;
	--theme-button-font-size: 16px;
	--theme-button-padding: 5px 22px;
	/* forms */
	--theme-form-field-border-initial-color: color-mix(in oklab, var(--vpb-ink) 35%, transparent);
	--theme-form-field-border-focus-color: var(--vpb-action);
	--theme-form-field-border-radius: var(--vpb-r-sm);
	--theme-form-field-height: 48px;
	--theme-form-selection-field-active-color: var(--vpb-action);
}
body { background-color: var(--vpb-bg); font-family: var(--vpb-font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .page-title, .entry-title { font-family: var(--font-display, var(--vpb-font)); letter-spacing: -0.02em; }
h1, .page-title { font-weight: var(--display-weight, 500); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 2px solid var(--vpb-action); outline-offset: 2px;
}
::selection { background: color-mix(in oklab, var(--vpb-action) 30%, transparent); }
.entry-content a:not(.wp-element-button):not(.button):not([class*="bt_bb"]):not([class*="tutor-btn"]) { text-underline-offset: 3px; }

/* ---------------------------------------------------------------- 2. the header (Blocksy's builder: logo, menu, the button) */
/* Blocksy free has no sticky header: the header stays on screen with CSS (M2) */
#header.ct-header { position: sticky; top: 0; z-index: 50; }
body.admin-bar #header.ct-header { top: var(--admin-bar, 32px); }
@media (max-width: 782px) { body.admin-bar #header.ct-header { top: 0; } }
.ct-header [data-row*="middle"] { background-color: var(--vpb-bg) !important; border-bottom: 1px solid var(--vpb-line); }
.ct-header [data-id="menu"] > ul > li > a { --theme-link-initial-color: var(--vpb-ink); --theme-link-hover-color: var(--vpb-action); text-transform: none; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.ct-header [data-id="menu"] > ul > li.current-menu-item > a, .ct-header [data-id="menu"] > ul > li.current-menu-ancestor > a { --theme-link-initial-color: var(--vpb-ink); text-decoration: underline; text-decoration-color: var(--vpb-action); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.ct-header [data-id="menu"] .sub-menu { background: var(--vpb-ink); border-radius: 0 0 var(--vpb-r-sm) var(--vpb-r-sm); }
.ct-header [data-id="menu"] .sub-menu .ct-menu-link { --theme-link-initial-color: var(--vpb-bg); --theme-link-hover-color: #ffb48f; font-size: 15px; }
.ct-header [data-id="button"] .ct-button { --theme-button-min-height: 44px; font-weight: 600; }
#offcanvas .ct-panel-inner { background-color: var(--vpb-ink) !important; }
#offcanvas [data-id="mobile-menu"] { --theme-link-initial-color: var(--vpb-bg); --theme-link-hover-color: #ffb48f; }
@media (max-width: 380px) { .ct-header [data-id="button"] .ct-button { padding-inline: 14px; font-size: 15px; } }

/* ---------------------------------------------------------------- 3. the footer (the child's, 011a S2) */
#footer.ct-footer { background: var(--vpb-surface); color: var(--vpb-ink); }
.vpb-footer { padding-block: 64px 24px; font-size: 15px; line-height: 1.55; }
.vpb-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px 48px; }
.vpb-footer__grid > * { min-width: 0; }
.vpb-footer__logo img { display: block; height: 32px; width: auto; }
.vpb-footer__logo--text { font-weight: 700; font-size: 20px; text-decoration: none; }
.vpb-footer__lede { margin: 16px 0 0; max-width: 36ch; color: var(--vpb-muted); }
.vpb-footer__h { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vpb-muted); margin: 0 0 12px; }
.vpb-footer ul { list-style: none; margin: 0; padding: 0; }
.vpb-footer li { margin: 0 0 8px; }
.vpb-footer a { color: var(--vpb-ink); text-decoration: none; }
.vpb-footer a:hover { color: var(--vpb-action); text-decoration: underline; text-underline-offset: 3px; }
.vpb-footer li a { display: inline-block; padding-block: 2px; }
.vpb-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--vpb-line); color: var(--vpb-muted); font-size: 14px; }
.vpb-footer__legal a { color: var(--vpb-muted); min-height: 24px; }
@media (max-width: 999px) { .vpb-footer__grid { grid-template-columns: 1fr 1fr; } .vpb-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 689px) { .vpb-footer { padding-block: 48px 24px; } .vpb-footer__grid { grid-template-columns: 1fr; gap: 28px; } .vpb-footer li a { padding-block: 10px; } .vpb-footer__legal a { padding-block: 10px; } }

/* ---------------------------------------------------------------- 4. content */
/* Bold Builder wraps EVERY page's content in .bt_bb_wrapper, also plain block content, which takes it out of Blocksy's constrained
   layout (the text ran to the screen's edge). Plain blocks inside the wrapper get the same column; real Bold Builder sections
   (bt_bb_*) are left alone (011b rebuilds them). Goes with Bold Builder in 011d. */
.entry-content.is-layout-constrained > .bt_bb_wrapper > :not([class*="bt_bb_"]):not(.alignfull) {
	width: var(--theme-container-width, min(1290px, calc(100% - 48px))); max-width: none; margin-left: auto; margin-right: auto;
}
.entry-content.is-layout-constrained > .bt_bb_wrapper > :is(p, ul, ol) { padding-right: max(0px, calc(var(--theme-container-width, 100%) - 72ch)); }
/* Plan 011c: with Bold Builder deactivated, deploy/mu-plugins/vp-bb-fallback.php prints each bt_bb_section as .vp-bb-section (the class
   exists only then). Blocksy shows those pages full width, so the section takes the theme's content column and gutter; inside a
   narrower parent (a Tutor lesson) it stays at 100%. Goes when the lessons and pages are rewritten. */
.vp-bb-section {
	width: var(--theme-container-width, min(100%, 90vw)); max-width: var(--theme-normal-container-max-width, 1290px);
	margin-left: auto; margin-right: auto; box-sizing: border-box;
}
.vp-bb-section + .vp-bb-section { margin-top: 2.5em; }
.vp-bb-section img { max-width: 100%; height: auto; }
/* Plan 013f (M1): with global styles parsing again, core centres every child of a constrained layout (auto margins, !important). The
   glossary hub's intro keeps its own 62ch measure (zodynas.css), so once Bold Builder is off it sat centred, 323 px right of the H1 at
   1440. It takes the column like every block, and the 62ch measure becomes a right padding (as section 4 does for 72ch). */
.entry-content.is-layout-constrained > .zgd-index-intro {
	max-width: var(--wp--style--global--content-size, 100%); box-sizing: border-box;
	padding-right: max(0px, calc(min(100%, var(--wp--style--global--content-size, 100%)) - 62ch));
}
.hero-section .page-title, .entry-header .page-title { color: var(--vpb-ink); }
.entry-content > p, .entry-content > ul, .entry-content > ol { color: var(--vpb-ink); }
.ct-breadcrumbs, .entry-meta { color: var(--vpb-muted); }
table { border-color: var(--vpb-line); }
.wp-block-button__link, .wp-element-button { border-radius: var(--vpb-r-sm); font-weight: 600; }
/* notices (WooCommerce, Tutor, core) in the system: the surface, a coloured edge */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
	background: #ffffff; color: var(--vpb-ink); border: 1px solid var(--vpb-line); border-left: 4px solid var(--vpb-ink); border-radius: var(--vpb-r-sm);
}
.woocommerce-message { border-left-color: #2e7d4f; }
.woocommerce-error { border-left-color: #b3261e; }
.woocommerce-info { border-left-color: var(--vpb-action); }

/* ---------------------------------------------------------------- 5. WooCommerce (shop, product, cart, checkout, account) */
.woocommerce .price, .woocommerce-Price-amount { color: var(--vpb-ink); font-weight: 600; }
.woocommerce del .woocommerce-Price-amount { color: var(--vpb-muted); font-weight: 400; }
.woocommerce span.onsale, .woocommerce .onsale { background: var(--vpb-ink); color: var(--vpb-bg); border-radius: 999px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product h2 { color: var(--vpb-ink); font-size: 17px; font-weight: 600; }
.woocommerce ul.products li.product figure, .woocommerce ul.products li.product .ct-media-container { border-radius: var(--vpb-r-md); overflow: hidden; }
.woocommerce div.product .product_title { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; }
.woocommerce div.product .woocommerce-product-gallery, .woocommerce div.product .ct-product-gallery-container { border-radius: var(--vpb-r-lg); overflow: hidden; }
.woocommerce div.product form.cart .variations select, .woocommerce div.product form.cart .variations td, .woocommerce div.product form.cart .variations th { font-size: 16px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--vpb-muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--vpb-ink); }
.woocommerce table.shop_table { border: 1px solid var(--vpb-line); border-radius: var(--vpb-r-md); background: #ffffff; }
.woocommerce table.shop_table th { color: var(--vpb-muted); font-weight: 600; }
.woocommerce-checkout #payment, .woocommerce-checkout-review-order { background: #ffffff; border: 1px solid var(--vpb-line); border-radius: var(--vpb-r-md); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--vpb-line); }
.woocommerce-checkout #payment div.payment_box { background: var(--vpb-bg); color: var(--vpb-ink); border-radius: var(--vpb-r-sm); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--vpb-bg); }
.woocommerce form .form-row label, .woocommerce-checkout label { color: var(--vpb-ink); font-weight: 500; }
.woocommerce form .form-row .required { color: #b3261e; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; border: 1px solid var(--vpb-line); border-radius: var(--vpb-r-md); background: #ffffff; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; color: var(--vpb-ink); text-decoration: none; }
.woocommerce-MyAccount-navigation li.is-active a { color: var(--vpb-action); font-weight: 600; }
.woocommerce .woocommerce-order-overview { color: var(--vpb-ink); }

/* ---------------------------------------------------------------- 6. Tutor LMS (course, lesson, quiz, dashboard) */
/* Tutor's Google Inter is dequeued (A12, functions.php): its screens take the site's family */
:root { --tutor-font-family-body: var(--vpb-font); --tutor-font-family-heading: var(--font-display, var(--vpb-font)); }
body[class*="tutor"], .tutor-wrap, .tutor-course-details-page, .tutor-dashboard {
	--tutor-color-primary: var(--vpb-ink);
	--tutor-color-primary-rgb: 26, 51, 92;
	--tutor-color-primary-hover: var(--vpb-action);
	--tutor-body-color: var(--vpb-ink);
	--tutor-border-color: color-mix(in oklab, var(--vpb-ink) 15%, transparent);
}
.tutor-btn-primary { --tutor-btn-bg: var(--vpb-action); background-color: var(--vpb-action); border-color: var(--vpb-action); color: var(--vpb-action-ink); border-radius: var(--vpb-r-sm); font-weight: 600; }
.tutor-btn-primary:hover, .tutor-btn-primary:focus { background-color: var(--vpb-ink); border-color: var(--vpb-ink); color: var(--vpb-bg); }
.tutor-btn-outline-primary { color: var(--vpb-ink); border-color: var(--vpb-ink); border-radius: var(--vpb-r-sm); }
.tutor-btn-outline-primary:hover { background-color: var(--vpb-ink); color: var(--vpb-bg); }
.tutor-card, .tutor-course-sidebar-card, .tutor-dashboard-content-inner .tutor-card { border-color: var(--vpb-line); border-radius: var(--vpb-r-md); }
.tutor-course-details-title, .tutor-course-content-title, .tutor-fs-4, .tutor-fs-5 { font-family: var(--font-display, var(--vpb-font)); }
.tutor-course-single-content-wrapper, .tutor-quiz-wrapper { font-family: var(--vpb-font); }
.tutor-course-single-sidebar-wrapper { background: #ffffff; }
.tutor-course-topic-item.is-active a, .tutor-course-topic-item a:hover { background: var(--vpb-bg); }
.tutor-dashboard-menu-item.active a, .tutor-dashboard-menu-item a:hover { color: var(--vpb-action); }

/* ---------------------------------------------------------------- 7. small fixes seen in the audit */
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding-left: 16px; padding-right: 16px; }
.woocommerce-checkout #payment { padding: 0; overflow: hidden; }
/* the taste gate (round 1): links and the current menu item in the ink (the orange is 3.6:1 on the ground, only for actions and
   underlines); the header button's label near-black on the orange (4.7:1) like every 010b button */
:root { --theme-link-active-color: var(--vpb-ink); }
.entry-content a:not(.wp-element-button):not(.button):not([class*="tutor-btn"]) { color: var(--vpb-ink); text-decoration: underline; text-decoration-color: var(--vpb-action); text-decoration-thickness: 1.5px; }
.entry-content a:not(.wp-element-button):not(.button):not([class*="tutor-btn"]):hover { color: var(--vpb-action); }
.ct-header [data-id="menu"] > ul > li > a, .ct-header [data-id="menu"] > ul > li.current-menu-item > a { color: var(--vpb-ink); }
.ct-header [data-id="button"] .ct-button, .ct-header [data-id="button"] .ct-button:visited { --theme-button-text-initial-color: var(--vpb-action-ink); color: var(--vpb-action-ink); }
.ct-header [data-id="button"] .ct-button:hover { color: var(--vpb-bg); }
/* plain lists inside Bold Builder's wrapper start on the text column at a phone's margin */
@media (max-width: 689px) { .entry-content.is-layout-constrained > .bt_bb_wrapper > :is(ul, ol) { padding-left: 1.1em; } }
/* plugins that remove the focus outline (Bold Builder's slick, Bold Timeline, Tutor's fields): the ring comes back on keyboard focus */
.slick-list:focus-visible, button.slick-arrow:focus-visible, .bold_timeline_container button.bold_timeline_slick_arrow:focus-visible,
.tutor-option-field textarea:focus-visible, .tutor-form-group textarea:focus-visible, .tutor-option-field input:focus-visible, .tutor-form-group input:focus-visible {
	outline: 2px solid var(--vpb-action) !important; outline-offset: 2px;
}
/* the taste gate (product page, round 1): the breadcrumbs in the muted ink (the orange is 3.6:1 on the ground); one visible focus
   ring for every control, whatever a plugin or Blocksy set */
.ct-breadcrumbs a, .ct-breadcrumbs a span { color: var(--vpb-muted); }
.ct-breadcrumbs a:hover, .ct-breadcrumbs a:hover span { color: var(--vpb-ink); }
:focus-visible { outline: 2px solid var(--vpb-action) !important; outline-offset: 2px; }
/* Tutor's login box (a guest on a lesson, the dashboard): a white card on the ground, the system's fields */
.tutor-login-wrap, #tutor-login-form { background: #ffffff; border: 1px solid var(--vpb-line); border-radius: var(--vpb-r-md); padding: 32px; }
#tutor-login-form .tutor-form-control { min-height: 48px; border-radius: var(--vpb-r-sm); border-color: color-mix(in oklab, var(--vpb-ink) 35%, transparent); }
/* review round 1 (L5): the labels added to Tutor's login fields (functions.php) and a ring on Tutor's dashboard menu, whose links
   Tutor styles without one */
.vpb-login-label { display: block; margin: 0 0 6px; font-size: 15px; font-weight: 500; color: var(--vpb-ink); }
.tutor-dashboard-menu-item a:focus-visible, .tutor-dashboard-menu-item-link:focus-visible, .tutor-dashboard-left-menu a:focus-visible,
.tutor-dashboard-permalinks a:focus-visible { outline: 2px solid var(--vpb-action) !important; outline-offset: -2px; border-radius: var(--vpb-r-sm); }
/* review round 1 (M2): the cart, checkout and account pages lose their Bold Builder demo hero (functions.php); the form starts under the title */
body.woocommerce-cart .entry-content, body.woocommerce-checkout .entry-content, body.woocommerce-account .entry-content { margin-top: 0; }
/* D29: the header keeps room for one more top-level item ("Mokykis savarankiškai", 011b) beside Mokymai, Naudinga, Žodynas,
   Prisijungti and Kontaktai: below 1280 the items sit closer and a step smaller (tests/011a-blocksy-ui.js measures 1000-1440) */
@media (min-width: 1000px) and (max-width: 1279px) {
	.ct-header [data-id="menu"] { --menu-items-spacing: 14px; }
	.ct-header [data-id="menu"] > ul > li > a { font-size: 14px; }
	.ct-header [data-id="button"] .ct-button { padding-inline: 14px; font-size: 15px; }
	.ct-header [data-id="logo"] .site-logo-container { --logo-max-height: 36px; }
}
/* 011b1: the formal "Mokykitės savarankiškai" is longer; at 1000-1099 the items sit one step closer still */
@media (min-width: 1000px) and (max-width: 1099px) {
	.ct-header [data-id="menu"] { --menu-items-spacing: 10px; }
}
