/*
 * TOTUM+ student discounts page (design: study247-totum-bootstrap5). Loaded on that page only (inc/totum.php).
 * Layout, type and colours are Elementor widget settings (build/elementor/totum_v2.py); this file holds what Elementor can't express.
 * Prefixed with `body.s247-totum` / `body` where an Elementor widget rule would otherwise win.
 */

/* The pack's own orange (#ff510a) and blue (#0757f7); the rest of the site keeps #ff6500 / #075bef */
body.s247-totum { --s247-orange: #ff510a; --s247-orange-hover: #e94908; --s247-blue: #0757f7; }

/* The pack's header sits in the same 1240px container as its hero (1216px of content); the shared header is 1140px elsewhere */
body.s247-totum .elementor-location-header .e-con.e-parent { --content-width: 1216px !important; }

/* Eyebrow: 37x2 blue rule, 12px gap (the shared .s247-eyebrow draws 38x3 / 18px); stays on one line on phones too */
body.s247-totum .s247-teb .elementor-heading-title { gap: 12px; white-space: nowrap; }
body.s247-totum .s247-teb .elementor-heading-title::after { width: 37px; height: 2px; }

/* "How to apply": numbered circles joined by an orange line (the pack's .steps:before). ::after, because Elementor owns ::before on containers */
.s247-tsteps { position: relative; }
.s247-tsteps::after { content: ""; position: absolute; left: 19px; right: calc(16.66% - 3px); top: 18px; height: 2px; background: var(--s247-orange); }
.s247-tnum { position: relative; z-index: 1; }
@media (max-width: 767px) {
	.s247-tsteps::after { left: 18px; right: auto; top: 15px; bottom: 15px; width: 2px; height: auto; }
}

/* The pack limits these paragraphs with max-width (not a fixed width), at every viewport */
.elementor.elementor .e-con > .elementor-widget.s247-mw235 { max-width: 235px; }
.elementor.elementor .e-con > .elementor-widget.s247-mw315 { max-width: 315px; }
.elementor.elementor .e-con > .elementor-widget.s247-mw330 { max-width: 330px; }
.elementor.elementor .e-con > .elementor-widget.s247-mw370 { max-width: 370px; }
.elementor.elementor .e-con > .elementor-widget.s247-mw540 { max-width: 540px; }

/* Rule above the NUS note: Divider widget without its own 2px padding, so the pack's 48px / 22px spacing is exact */
body .s247-hr .elementor-divider { padding-block: 0 !important; }

/* ---------- Course cards (Loop Grid + "Card: TOTUM course") ---------- */
.s247-tcourses .e-loop-item, .s247-tcourses .s247-tcard { height: 100%; }
.s247-tcard .elementor-widget-theme-post-featured-image { line-height: 0; }
.s247-tcard .elementor-widget-theme-post-featured-image a { display: block; }
.s247-tcard .s247-ttitle .elementor-heading-title { min-height: 31px; transition: color .2s ease; }
@media (hover: hover) {
	.s247-tcard:hover .s247-ttitle.elementor-widget .elementor-heading-title { color: var(--s247-blue); }
}
.s247-tfoot { margin-top: auto !important; flex-wrap: nowrap; }
.s247-tcard .price { margin: 0 !important; font-weight: 800; }
.s247-tcard .price del { display: none !important; }
.s247-tcard .price ins { text-decoration: none; }
.s247-tcard .price .screen-reader-text { position: absolute; }
.s247-tcard .woocommerce-Price-amount { font-weight: 800; }

/* Add to Basket: the pack's .btn-sm (11px, 8px 9px, radius 10) with the basket + plus icon of its .bi-basket2 / .bi-plus */
.s247-tcard .s247-atc a.button, .woocommerce .s247-tcard .s247-atc a.button {
	font-size: 14px !important; font-weight: 800 !important; padding: 8px 9px !important; border: 1px solid var(--s247-orange) !important;
	border-radius: 10px !important; gap: 5px !important; line-height: 1.5 !important;
}
.s247-tcard .s247-atc .button::before {
	width: 15.5px !important; height: 13.4px !important;
	-webkit-mask: var(--s247-totum-basket) center / contain no-repeat; mask: var(--s247-totum-basket) center / contain no-repeat;
}
:root {
	--s247-totum-basket: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -3.5 22.5 19.5'%3E%3Cpath d='M5.757 1.071a.5.5 0 0 1 .172.686L3.383 6h9.234L10.07 1.757a.5.5 0 1 1 .858-.514L13.783 6H15.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H15v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8H.5a.5.5 0 0 1-.5-.5v-1A.5.5 0 0 1 .5 6h1.717L5.07 1.243a.5.5 0 0 1 .686-.172zM2 9v4a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V9zM4 10a1 1 0 0 1 2 0v2a1 1 0 0 1-2 0zm3 0a1 1 0 0 1 2 0v2a1 1 0 0 1-2 0zm3 0a1 1 0 1 1 2 0v2a1 1 0 0 1-2 0z'/%3E%3Cpath d='M15.3 -2.5v8M11.3 1.5h8' stroke='%23000' stroke-width='1.3' fill='none'/%3E%3C/svg%3E");
}
