/*!
 * SmartSchool Core 0.8.5: the whole site look, slice 1 (docs/design-style.md version 2).
 * Poppins from this site, the school's colours (printed inline as --ss-* by SiteLook), the fixed neutral and
 * status colours, and base rules for the theme, Elementor, WooCommerce and the My Account kit.
 * Only applies under body.ss-look, so switching the look off on the School page puts everything back.
 * Page layouts (title bands, home cards, listings, shop cards) are later slices.
 */

/* Poppins, Latin, three weights. Light text uses 400, bold uses 600, so no faux bold. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 100 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }

:root {
	--ss-font: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--ss-page: #f2f2f4;
	--ss-card: #ffffff;
	--ss-ink: #1f2430;
	--ss-muted: #5a6070;
	--ss-line: #e6e8ec;
	--ss-line-2: #f0f1f4;
	--ss-field: #c9cdd6;
	--ss-orange: #e08a3a; --ss-orange-bg: #fdf0e3; --ss-orange-ink: #a35a17;
	--ss-green: #1f8f4e;  --ss-green-bg: #e7f4ec;  --ss-green-ink: #1f6b3e;
	--ss-red: #c8463d;    --ss-red-bg: #fbe9e7;    --ss-red-ink: #a5322a;
	--ss-info-bg: #eaf1fc; --ss-info-ink: #2f5fae;
	--ss-radius: 6px;
	--ss-shadow: 0 1px 2px rgba(20, 30, 60, .06);
}

/* ---------- Every page ---------- */

html body.ss-look {
	--accent: var(--ss-main);
	font-family: var(--ss-font);
	color: var(--ss-ink);
	background-color: var(--ss-page) !important;
}

/* Elementor's global colours and fonts (staging still has Elementor's own defaults). */
html body.ss-look[class*="elementor-kit-"] {
	--e-global-color-primary: var(--ss-main);
	--e-global-color-secondary: var(--ss-muted);
	--e-global-color-text: var(--ss-ink);
	--e-global-color-accent: var(--ss-accent);
	--e-global-typography-primary-font-family: "Poppins";
	--e-global-typography-secondary-font-family: "Poppins";
	--e-global-typography-text-font-family: "Poppins";
	--e-global-typography-accent-font-family: "Poppins";
}

/* One font. Words only: icon fonts, code, the admin bar and the Newspaper keep their own. */
html body.ss-look :is(h1, h2, h3, h4, h5, h6, p, a, li, dt, dd, td, th, caption, label, legend, button, input, select, textarea, option, span, strong, b, em, small, blockquote, figcaption, cite, div, section, article, nav, header, footer, aside, main):not([class*="icon"]):not([class*="fa-"]):not(.fa):not(.fab):not(.fas):not(.far):not(.fal):not(.mi):not(.material-icons):not([class*="eicon"]):not([class*="dashicons"]):not([class*="mono"]):not([class*="star"]):not(code):not(pre):not(#wpadminbar):not(#wpadminbar *):not(.ssn-paper *) {
	font-family: var(--ss-font) !important;
}

/* Fields */
html body.ss-look :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"], input[type="password"], input[type="url"], input[type="date"], select, textarea):not(#wpadminbar *) {
	border-radius: var(--ss-radius);
}
html body.ss-look :is(input, select, textarea):focus-visible:not(#wpadminbar *) {
	outline: 2px solid var(--ss-accent);
	outline-offset: 0;
}

/* Buttons: 6 px corners on the theme's, WooCommerce's and Elementor's buttons. Round icon buttons keep theirs. */
html body.ss-look :is(.elementor-button, .woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .wc-block-components-button, .buttons.button-2, .buttons.button-5, .buttons.button-1):not([class*="circle"]):not([class*="round"]) {
	border-radius: var(--ss-radius) !important;
}

/* Links in written content: the accent's link colour, no underline (Core 0.8.4). */
html body.ss-look :is(.elementor-widget-text-editor, .entry-content, .woocommerce-product-details__short-description, .eael-grid-post-excerpt) a:not([class*="button"]):not([class*="btn"]):not(.elementor-button),
html body.ss-look a.eael-post-elements-readmore-btn {
	color: var(--ss-link) !important;
	text-decoration: none;
}
html body.ss-look a.eael-post-elements-readmore-btn { font-weight: 600; }

/* WooCommerce notices and prices in the school colours. */
html body.ss-look .woocommerce-message, html body.ss-look .woocommerce-info { border-top-color: var(--ss-accent); }
html body.ss-look .woocommerce-error { border-top-color: var(--ss-red); }

/* ---------- My Account: the kit's tokens follow the look ---------- */

html body.ss-look.sx-ui, html body.ss-look.sx-admin {
	--sx-teal: var(--ss-main);
	--sx-ink: var(--ss-ink);
	--sx-muted: var(--ss-muted);
	--sx-bg: var(--ss-page);
	--sx-blue: var(--ss-main);
	--sx-blue-2: var(--ss-main-2);
	--sx-green: var(--ss-green-ink); --sx-green-bg: var(--ss-green-bg);
	--sx-amber: var(--ss-orange-ink); --sx-amber-bg: var(--ss-orange-bg);
	--sx-red: var(--ss-red-ink); --sx-red-bg: var(--ss-red-bg);
	--sx-radius: var(--ss-radius);
	--sx-font: var(--ss-font);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	html body.ss-look.sx-ui, html body.ss-look.sx-admin {
		--sx-line: var(--ss-line);
		--sx-line-2: var(--ss-line-2);
		--sx-chip: color-mix(in srgb, var(--ss-accent) 12%, #fff);
		--sx-ring: color-mix(in srgb, var(--ss-accent) 22%, transparent);
	}
}

/* Screen head: eyebrow, title, one line. */
html body.ss-look.sx-ui .sx-kicker { font-size: 12px !important; font-weight: 600 !important; letter-spacing: .12em !important; text-transform: uppercase; color: var(--ss-muted) !important; }
html body.ss-look.sx-ui .sx-title { font-size: 34px !important; font-weight: 600 !important; letter-spacing: -.01em; line-height: 1.15; color: var(--ss-ink) !important; }
html body.ss-look.sx-ui .sx-sub { color: var(--ss-muted); font-size: 15px; }
@media (max-width: 640px) { html body.ss-look.sx-ui .sx-title { font-size: 26px !important; } }

/* Cards and tiles. */
html body.ss-look.sx-ui :is(.sx-card, .sx-tile) { border-color: var(--ss-line); box-shadow: var(--ss-shadow); }
html body.ss-look.sx-ui .sx-card-title, html body.ss-look.sx-ui .sx-card > h3 { color: var(--ss-ink) !important; font-weight: 600 !important; }
html body.ss-look.sx-ui .sx-tile .sx-v { font-weight: 500 !important; }
/* Up to four tiles: the tile colours with white words. Rows with more keep the first one dark only. */
html body.ss-look.sx-ui .sx-tiles:not(:has(> .sx-tile:nth-child(5))) > .sx-tile:nth-child(-n+4) { border-color: transparent; color: #fff; }
html body.ss-look.sx-ui .sx-tiles:not(:has(> .sx-tile:nth-child(5))) > .sx-tile:nth-child(-n+4) * { color: #fff !important; }
html body.ss-look.sx-ui .sx-tiles:not(:has(> .sx-tile:nth-child(5))) > .sx-tile:nth-child(1) { background: var(--ss-t1); }
html body.ss-look.sx-ui .sx-tiles:not(:has(> .sx-tile:nth-child(5))) > .sx-tile:nth-child(2) { background: var(--ss-t2); }
html body.ss-look.sx-ui .sx-tiles:not(:has(> .sx-tile:nth-child(5))) > .sx-tile:nth-child(3) { background: var(--ss-t3); }
html body.ss-look.sx-ui .sx-tiles:not(:has(> .sx-tile:nth-child(5))) > .sx-tile:nth-child(4) { background: var(--ss-t4); }

/* Buttons: the main one in the school's main colour; white ones with a grey edge and main colour words. */
html body.ss-look.sx-ui .sx-btn:not(.is-primary):not(.is-dark):not(.is-bad):not(.is-danger) { border-color: var(--ss-field) !important; color: var(--ss-main) !important; }
html body.ss-look.sx-ui .sx-btn.is-primary { color: var(--ss-on-main) !important; }

/* Links in My Account content. */
html body.ss-look.sx-ui .woocommerce-MyAccount-content a:not(.sx-btn):not(.button):not([class*="btn"]):not([role="tab"]):not(.sx-tile) { color: var(--ss-link); }

/* Status chips in the soft status colours. */
html body.ss-look.sx-ui .sx-chip.is-ok { background: var(--ss-green-bg) !important; color: var(--ss-green-ink) !important; }
html body.ss-look.sx-ui .sx-chip.is-warn { background: var(--ss-orange-bg) !important; color: var(--ss-orange-ink) !important; }
html body.ss-look.sx-ui .sx-chip.is-bad { background: var(--ss-red-bg) !important; color: var(--ss-red-ink) !important; }
html body.ss-look.sx-ui .sx-chip.is-off { background: var(--ss-line-2) !important; color: var(--ss-muted) !important; }

/* Tabs: the open tab in the main colour. */
html body.ss-look.sx-ui .sx-tabs { border-bottom-color: var(--ss-main) !important; }

/* ---------- Slice 3 (0.8.6): the same header on every page, page banners as the title band ---------- */

/* Header: the school's main colour on every page, at the top and while scrolling. */
html body.ss-look header.c27-main-header .header-skin { background-color: var(--ss-main) !important; opacity: 1 !important; }
html body.ss-look header.c27-main-header { box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }

/* Page banners (Site Tools) become the title band: eyebrow, 42 px title, one line, main colour. */
html body.ss-look .kpb-banner {
	--kpb-fg: var(--ss-on-main) !important;
	--kpb-muted: color-mix(in srgb, var(--ss-on-main) 78%, transparent) !important;
	--kpb-btn-bg: var(--ss-on-main) !important;
	--kpb-btn-fg: var(--ss-main) !important;
	background: linear-gradient(90deg, var(--ss-main), color-mix(in srgb, var(--ss-main) 84%, #fff)) !important;
	border-radius: var(--ss-radius) !important;
	box-shadow: var(--ss-shadow);
}
@media (min-width: 768px) { html body.ss-look .kpb-banner { padding: 36px 40px 40px !important; } }
html body.ss-look .kpb-banner .kpb-above { font-size: 12px !important; font-weight: 600 !important; letter-spacing: .12em !important; text-transform: uppercase; }
html body.ss-look .kpb-banner .kpb-crumb a { color: inherit !important; text-decoration: none; }
html body.ss-look .kpb-banner .kpb-crumb a:hover, html body.ss-look .kpb-banner .kpb-crumb a:focus-visible { color: var(--kpb-fg) !important; }
html body.ss-look .kpb-banner .kpb-headline { font-size: clamp(28px, 4vw, 42px) !important; font-weight: 600 !important; letter-spacing: -.01em; line-height: 1.12 !important; }
html body.ss-look .kpb-banner .kpb-below { font-size: 15px !important; margin-top: 6px !important; }
html body.ss-look .kpb-banner .kpb-button { font-weight: 600 !important; padding: 12px 20px !important; border-radius: var(--ss-radius) !important; font-size: 14px; }

/* News stories: title 42 px semibold, easy reading body. */
html body.ss-look.single-post .elementor-location-single h1.elementor-heading-title { font-size: clamp(30px, 4vw, 42px) !important; font-weight: 600 !important; line-height: 1.15 !important; letter-spacing: -.01em; }
html body.ss-look.single-post .elementor-location-single :is(h2, h3).elementor-heading-title { font-weight: 600 !important; }
html body.ss-look.single-post .elementor-widget-theme-post-content { font-size: 17px; line-height: 1.7; }

/* School TV keeps its dark player look; the title on the same scale as every other page. */
html body.ss-look .sstv-hero__title { font-size: clamp(30px, 4.4vw, 42px) !important; font-weight: 600 !important; line-height: 1.12 !important; }

/* ---------- Slice 4 (0.8.7): home cards, listings, news cards, shop cards ---------- */

/* Home: four white cards that lift over the bottom of the photo. */
.ss-home-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1140px; width: calc(100% - 30px); margin: -64px auto 32px; position: relative; z-index: 3; box-sizing: border-box; }
.ss-home-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: var(--ss-radius); padding: 20px 22px; box-shadow: 0 6px 18px rgba(20, 30, 60, .12); text-decoration: none !important; color: var(--ss-ink) !important; transition: transform .15s, box-shadow .15s; min-width: 0; }
a.ss-home-card:hover, a.ss-home-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 30, 60, .16); }
a.ss-home-card:focus-visible { outline: 2px solid var(--ss-accent); outline-offset: 2px; }
.ss-home-card__k { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ss-muted); }
.ss-home-card__t { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ss-home-card__m { font-size: 13px; color: var(--ss-link); font-weight: 500; }
@media (max-width: 960px) { .ss-home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -40px; } }
@media (max-width: 560px) { .ss-home-cards { grid-template-columns: 1fr; gap: 12px; margin: 16px auto 24px; } }
@media (prefers-reduced-motion: reduce) { .ss-home-card { transition: none; } a.ss-home-card:hover { transform: none; } }

/* Listings (MyListing): round crest with a white ring, blocks as cards, the open tab marked, 6 px buttons. */
html body.ss-look.single-job_listing .profile-avatar { border-radius: 50% !important; border: 4px solid #fff !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
html body.ss-look.single-job_listing .listing-main-info h1 { font-weight: 600 !important; letter-spacing: -.01em; }
html body.ss-look.single-job_listing .listing-tabs .element, html body.ss-look.single-job_listing .tab-content .element { border-radius: var(--ss-radius) !important; box-shadow: var(--ss-shadow) !important; border: 1px solid var(--ss-line); }
html body.ss-look.single-job_listing .element .title-style-1__heading { font-size: 18px !important; font-weight: 600 !important; color: var(--ss-ink) !important; }
html body.ss-look.single-job_listing .element .title-style-1 > i { color: var(--ss-main) !important; }
html body.ss-look.single-job_listing .profile-header ul.cts-carousel > li > a { font-weight: 600 !important; }
html body.ss-look.single-job_listing .profile-header ul.cts-carousel > li.active > a { color: var(--ss-main) !important; box-shadow: inset 0 -3px 0 var(--ss-accent); }
html body.ss-look.single-job_listing :is(.listing-main-buttons, .quick-listing-actions) ul > li > a { border-radius: var(--ss-radius) !important; font-weight: 600 !important; }
html body.ss-look.single-job_listing .listing-main-buttons ul > li.lmb-calltoaction > a { background: var(--ss-main) !important; color: var(--ss-on-main) !important; }

/* News cards (Essential Addons post grid): white card, 6 px corners, a clear title, muted excerpt. */
html body.ss-look .eael-grid-post-holder { background: #fff !important; border: 1px solid var(--ss-line) !important; border-radius: var(--ss-radius) !important; overflow: hidden; box-shadow: var(--ss-shadow) !important; }
html body.ss-look .eael-grid-post .eael-entry-title, html body.ss-look .eael-grid-post .eael-entry-title a { font-size: 16px !important; font-weight: 600 !important; line-height: 1.3 !important; color: var(--ss-ink) !important; }
html body.ss-look .eael-grid-post .eael-grid-post-excerpt p { font-size: 14px !important; color: var(--ss-muted) !important; line-height: 1.55; }
html body.ss-look .eael-grid-post .eael-entry-wrapper { padding: 16px 18px 18px !important; }

/* Shop: product cards, photo on top, the price in the main colour (the shop's own filter column stays). */
html body.ss-look ul.products li.product { background: #fff !important; border-radius: var(--ss-radius) !important; overflow: hidden; box-shadow: var(--ss-shadow) !important; border: 1px solid var(--ss-line); padding: 0 0 16px !important; display: flex !important; flex-direction: column !important; align-items: stretch !important; }
html body.ss-look ul.products li.product > a.woocommerce-LoopProduct-link { display: block !important; width: 100% !important; }
html body.ss-look ul.products li.product a.woocommerce-LoopProduct-link img { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0 !important; margin: 0 0 12px !important; }
html body.ss-look ul.products li.product .woocommerce-loop-product__title { font-size: 15px !important; font-weight: 600 !important; color: var(--ss-ink) !important; padding: 0 16px !important; }
html body.ss-look ul.products li.product .price { color: var(--ss-main) !important; font-weight: 600 !important; padding: 0 16px; font-size: 15px !important; }
html body.ss-look ul.products li.product .button { margin: auto 16px 0 !important; align-self: flex-start; width: auto !important; display: inline-flex !important; border-radius: var(--ss-radius) !important; background: #fff !important; color: var(--ss-main) !important; border: 1px solid var(--ss-field) !important; font-weight: 600 !important; font-size: 13px !important; padding: 8px 14px !important; }
html body.ss-look ul.products li.product .button:hover { background: var(--ss-main) !important; color: var(--ss-on-main) !important; border-color: var(--ss-main) !important; }
html body.ss-look .woocommerce-ordering select { border-radius: var(--ss-radius); border-color: var(--ss-field); }

/* ---------- Slice 5 (0.8.8): long lists of buttons become rows with text links ---------- */

/* Coach links (Sport, and Coach Console while it is still on): one row per link, name and use on the left,
 * the actions as text links on the right; they wrap under the name when there is no room. */
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-row, .scc-lrow) { display: flex !important; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; padding: 12px 0 !important; border-bottom: 1px solid var(--ss-line-2); }
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-row, .scc-lrow):last-of-type { border-bottom: 0; }
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-row, .scc-lrow) > :first-child { flex: 1 1 220px; min-width: 0; display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 2px !important; margin: 0 !important; }
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-linkrow, .scc-linkrow) { flex: 0 1 auto; display: flex !important; flex-wrap: wrap; align-items: center; gap: 2px 16px; margin: 0 !important; }
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-linkrow, .scc-linkrow) form { display: inline; margin: 0; }

/* Row actions as text links (coach links and the partner playbook). */
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-linkrow, .scc-linkrow, .ss-pb-item) .sx-btn:not(.is-primary):not(.is-dark):not(.is-bad):not(.is-danger) { background: none !important; border: 0 !important; box-shadow: none !important; padding: 4px 0 !important; min-height: 0 !important; height: auto !important; color: var(--ss-link) !important; font-weight: 600 !important; font-size: 13px !important; }
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-linkrow, .scc-linkrow, .ss-pb-item) .sx-btn:not(.is-primary):not(.is-dark):not(.is-bad):not(.is-danger):is(:hover, :focus-visible) { background: none !important; color: var(--ss-link-2) !important; }
html body.ss-look.sx-ui .woocommerce-MyAccount-content .ss-pb-item .sx-btn:not(.is-primary):not(.is-dark):not(.is-bad):not(.is-danger)::after { content: " \203A"; }
html body.ss-look.sx-ui .woocommerce-MyAccount-content :is(.ss-spt-linkrow, .scc-linkrow) .sx-btn:is(.ss-spt-off, .scc-b-off):not(.is-primary):not(.is-dark):not(.is-bad):not(.is-danger) { color: var(--ss-red-ink) !important; }

/* 0.9.3: with the My Account side menu on, the theme's fixed-width page body sat beside the menu and ran past the
 * right edge on screens narrower than about 1450 px. It now fills the space left of the menu. */
@media (min-width: 768px) { html body.ss-look.smm-side-on .container.section-body { width: auto !important; max-width: min(1170px, calc(100vw - 250px)) !important; margin-right: auto !important; box-sizing: border-box; } }

@media (prefers-reduced-motion: reduce) { html body.ss-look * { scroll-behavior: auto !important; } }
