/*
Theme Name: Sky Pilot Child - England Training Division
Template: sky-pilot
Description: England Training Division brand skin for Sky Pilot. Design tokens mirrored from the ibcode.com marketing site Elementor kit (colors, Oswald/Inter typography, fluid heading scale).
Version: 1.0.0
Author: Click Web Works
*/

/* Catalog hero search */
.etd-course-search {
	display: flex;
	gap: 0.6rem;
	max-width: 560px;
	margin-top: 1.25rem;
}
.etd-course-search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 0.7rem 1.1rem;
	border: 1px solid var(--wp--preset--color--secondary, #4081B4);
	border-radius: 6px;
	font-family: var(--wp--preset--font-family--open-sans, Inter, sans-serif);
	font-size: 1rem;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #080808);
}
.etd-course-search button {
	padding: 0.7rem 1.5rem;
	border: none;
	border-radius: 6px;
	background: var(--wp--preset--color--tertiary, #FE8426);
	color: var(--wp--preset--color--primary-darkest, #122032);
	font-family: var(--wp--preset--font-family--open-sans, Inter, sans-serif);
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
}
.etd-course-search button:hover {
	background: var(--wp--preset--color--tertiary-darker, #E06F14);
}

/* Catalog card polish: keep card titles compact */
.llms-loop-title {
	font-size: 1.35rem !important;
	line-height: 1.25 !important;
}

/* LifterLMS loop author box uses full-bleed margins that overflow narrow cards */
.llms-loop-item-content .llms-author {
	margin-left: 0;
	margin-right: 0;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
}

/* ==========================================================================
   Mobile pass
   ========================================================================== */

/* never allow sideways scroll from a stray full-bleed element */
body {
	overflow-x: clip;
}

@media (max-width: 781px) {
	/* compact header: smaller logo, single CTA (login lives in the menu + dashboard) */
	header .wp-block-image img {
		width: 54px !important;
	}
	header .wp-block-buttons .wp-block-button:first-child {
		display: none;
	}
	header .wp-block-group {
		row-gap: 0.5rem;
	}

	/* single course: buy box (sidebar) above the description on phones */
	.etd-course-cols {
		flex-direction: column-reverse;
	}

	/* quiz action buttons: easy thumb targets, Next/Complete stacked on top */
	.llms-quiz-nav {
		flex-direction: column;
		align-items: stretch;
	}
	.llms-quiz-nav .llms-button-action {
		order: 1;
	}
	.llms-quiz-nav .llms-button-secondary {
		order: 2;
	}
	.llms-quiz-nav .llms-quiz-counter,
	.llms-quiz-nav #llms-quiz-counter {
		order: 3;
		text-align: center;
	}
	.llms-quiz-buttons,
	.llms-quiz-buttons form {
		display: block;
		width: 100%;
	}
	.llms-quiz-nav .llms-button-action,
	.llms-quiz-nav .llms-button-secondary,
	.llms-quiz-buttons .llms-start-quiz-button {
		width: 100% !important;
		display: block !important;
		text-align: center;
		margin-bottom: 0.5rem;
		box-sizing: border-box;
	}
}

/* Course hero: drop the core block's "Posted in" prefix */
.etd-course-hero .wp-block-post-terms__prefix {
	display: none;
}

/* Live-classes archive: the injected hero carries its own H1; hide the template's duplicate title */
body.etd-live-hero h1.page-title {
	display: none;
}

/* Search results: the course-archive template bakes in the Practice Quizzes hero, which
   stacks with the injected Live Classes hero on live-class searches. When the live hero is
   present (body.etd-live-hero), hide the template's quiz hero; quiz-only searches keep it. */
body.search.etd-live-hero .wp-block-group.alignfull.has-primary-darkest-background-color {
	display: none;
}
body.search.etd-live-hero .wp-block-group.etd-live-hero-block {
	display: block !important;
}

/* Footer: WCAG contrast - light blue links on the dark footer (13.7:1), orange on hover (9.2:1).
   The site footer renders as footer.wp-block-template-part (the className on the template-part
   block reference does not output). Card footers are .llms-loop-item-footer, unaffected. */
footer.wp-block-template-part a,
footer.site-footer a,
.site-footer a {
	color: var(--wp--preset--color--etd-light-blue, #AADBFF);
}
footer.wp-block-template-part a:hover,
footer.site-footer a:hover,
.site-footer a:hover {
	color: var(--wp--preset--color--etd-orange-2, #FF9340);
}

/* Syllabus row meta (favorites counter, Has Quiz badge): WCAG contrast on white */
.llms-favorite-wrapper,
.llms-favorite-wrapper .llms-favorites-count,
.llms-lesson-meta .llms-lesson-has-quiz,
.llms-lesson-meta {
	color: var(--wp--preset--color--contrast-medium, #525252) !important;
}

/* Pagination: WCAG contrast on white (nav.llms-pagination sits outside main) */
.llms-pagination .page-numbers a,
.llms-pagination a.page-numbers,
.llms-pagination span.page-numbers {
	color: var(--wp--preset--color--contrast-medium, #525252) !important;
}
.llms-pagination .page-numbers.current,
.llms-pagination span.page-numbers.current {
	color: var(--wp--preset--color--primary-darkest, #122032) !important;
	font-weight: 700;
}
.llms-pagination a.page-numbers:hover,
.llms-pagination .page-numbers a:hover {
	color: var(--wp--preset--color--primary, #2A4F7D) !important;
}

/* Homepage gateway cards: equal heights regardless of content, link pinned to bottom */
body.home .wp-block-columns .wp-block-column {
	display: flex;
}
body.home .wp-block-columns .wp-block-column > .wp-block-group {
	display: flex;
	flex-direction: column;
	flex: 1;
}
body.home .wp-block-columns .wp-block-column > .wp-block-group > p:last-child {
	margin-top: auto;
}

/* Course hero: terms render as links; keep them on-brand against navy */
.etd-course-hero a {
	color: inherit;
	text-decoration: none;
}
.etd-course-hero a:hover {
	text-decoration: underline;
}
.etd-course-hero .wp-block-post-title {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
}

/* Pricing table: brand the access plan card + buy button */
.llms-access-plans .llms-access-plan {
	border-radius: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--etd-gray-blue, #E0E9F5);
}
.llms-access-plan .llms-access-plan-title {
	background: var(--wp--preset--color--primary-darkest, #122032);
	color: #fff;
	font-family: var(--wp--preset--font-family--montserrat, Oswald, sans-serif);
}
.llms-access-plan .llms-access-plan-content {
	background: transparent;
	margin: 0;
}
.llms-access-plan .llms-access-plan-price {
	color: var(--wp--preset--color--primary-darkest, #122032);
}
/* button area: sits on the card's continuous light blue surface */
.llms-access-plan .llms-access-plan-footer {
	background: transparent;
	margin: 0;
	padding-top: 1rem;
	padding-bottom: 1.25rem;
}
.llms-access-plan .llms-button-action,
.llms-button-primary {
	background: var(--wp--preset--color--tertiary, #FE8426) !important;
	border: none;
	color: var(--wp--preset--color--primary-darkest, #122032) !important;
	font-family: var(--wp--preset--font-family--open-sans, Inter, sans-serif);
	font-weight: 600;
	border-radius: 6px;
}
.llms-access-plan .llms-button-action:hover,
.llms-button-primary:hover {
	background: var(--wp--preset--color--tertiary-darker, #E06F14) !important;
	color: var(--wp--preset--color--primary-darkest, #122032) !important;
}

/* ==========================================================================
   Checkout facelift (Purchase page - primary landing target from ibcode.com)
   ========================================================================== */

.llms-checkout-wrapper {
	max-width: 1140px;
	margin: 0 auto;
}

/* logged-in / info notice */
.llms-checkout-wrapper .llms-notice {
	background: var(--wp--preset--color--etd-gray-blue, #E0E9F5);
	border: none;
	border-left: 4px solid var(--wp--preset--color--primary, #2A4F7D);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	font-size: 1rem;
}

/* two-column layout: form left, sticky summary right */
form.llms-checkout.llms-checkout-cols-2 {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 2rem;
	align-items: start;
}
form.llms-checkout .llms-checkout-col {
	width: 100% !important;
	float: none !important;
}
.llms-checkout-col.llms-col-2 {
	position: sticky;
	top: 2rem;
}
@media (max-width: 920px) {
	form.llms-checkout.llms-checkout-cols-2 {
		grid-template-columns: 1fr;
	}
	.llms-checkout-col.llms-col-2 {
		position: static;
		order: -1; /* order summary first on mobile so buyers see what they're getting */
	}
}

/* sections as cards */
.llms-checkout-section {
	background: #fff;
	border: 1px solid var(--wp--preset--color--contrast-lightest, #E6E6E6);
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 3px rgba(18, 32, 50, 0.06);
}
h4.llms-form-heading,
.llms-checkout-section h4.llms-form-heading,
.llms-checkout-section.order-summary h4.llms-form-heading {
	background: var(--wp--preset--color--primary-darkest, #122032);
	color: #fff !important;
	font-family: var(--wp--preset--font-family--montserrat, Oswald, sans-serif);
	font-size: 1.2rem;
	letter-spacing: 0.02em;
	margin: 0;
	padding: 0.9rem 1.4rem;
}
.llms-checkout-section-content {
	padding: 1.5rem 1.4rem;
	margin: 0;
}

/* 12-column field grid (LifterLMS emits llms-cols-N wrappers with no CSS in block themes) */
.llms-checkout-section-content.llms-form-fields {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 1.1rem 1rem;
}
/* non-field children (confirm wrapper, gateway list, notices) span the full row */
.llms-checkout-section-content.llms-form-fields > * {
	grid-column: 1 / -1;
}
.llms-form-field {
	float: none !important;
	width: auto !important;
	padding: 0 !important;
	grid-column: span 12;
}
.llms-form-field.llms-cols-1 { grid-column: span 1; }
.llms-form-field.llms-cols-2 { grid-column: span 2; }
.llms-form-field.llms-cols-3 { grid-column: span 3; }
.llms-form-field.llms-cols-4 { grid-column: span 4; }
.llms-form-field.llms-cols-6 { grid-column: span 6; }
.llms-form-field.llms-cols-8 { grid-column: span 8; }
.llms-form-field.llms-cols-9 { grid-column: span 9; }
@media (max-width: 640px) {
	.llms-form-field[class*="llms-cols-"] {
		grid-column: span 12;
	}
}

/* labels + inputs */
.llms-form-field label {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--wp--preset--color--primary-darkest, #122032);
	margin-bottom: 0.3rem;
	display: inline-block;
}
.llms-form-field .llms-required {
	color: var(--wp--preset--color--tertiary, #FE8426);
}
.llms-form-field input[type="text"],
.llms-form-field input[type="email"],
.llms-form-field input[type="password"],
.llms-form-field input[type="tel"],
.llms-form-field input[type="number"],
.llms-form-field select,
.llms-form-field textarea {
	width: 100%;
	padding: 0.7rem 0.95rem;
	border: 1px solid var(--wp--preset--color--contrast-lighter, #9C9C9C);
	border-radius: 6px;
	font-family: inherit;
	font-size: 1rem;
	background: #fff;
	color: var(--wp--preset--color--contrast, #080808);
	box-sizing: border-box;
}
.llms-form-field input:focus,
.llms-form-field select:focus,
.llms-form-field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--secondary, #4081B4);
	box-shadow: 0 0 0 3px rgba(64, 129, 180, 0.18);
}
.llms-checkout .select2-container .select2-selection--single {
	height: auto;
	padding: 0.55rem 0.95rem;
	border: 1px solid var(--wp--preset--color--contrast-lighter, #9C9C9C);
	border-radius: 6px;
}
.llms-checkout .select2-container {
	width: 100% !important;
}

/* order summary */
.llms-checkout-section.order-summary .llms-checkout-section-content {
	background: var(--wp--preset--color--etd-gray-blue, #E0E9F5);
}
ul.llms-order-summary {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.llms-order-summary li {
	padding: 0.55rem 0;
	border-bottom: 1px solid rgba(18, 32, 50, 0.12);
	font-size: 1rem;
}
ul.llms-order-summary li:last-child {
	border-bottom: none;
}
ul.llms-order-summary li .llms-label {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #2A4F7D);
	font-weight: 600;
}
ul.llms-order-summary li.llms-payment-due,
ul.llms-order-summary li.total {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary-darkest, #122032);
}

/* payment gateways */
ul.llms-payment-gateways {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.llms-payment-gateways li.llms-payment-gateway {
	padding: 0.4rem 0;
}
ul.llms-payment-gateways label {
	font-weight: 600;
}
.llms-gateway-description {
	color: var(--wp--preset--color--contrast-medium, #525252);
	font-size: 0.92rem;
}

/* buy button: full-width, unmissable */
.llms-checkout .llms-form-field.type-submit,
.llms-checkout .llms-form-field.type-button {
	display: block;
	width: 100% !important;
	grid-column: span 12;
}
.llms-checkout .llms-button-primary,
.llms-checkout .llms-form-field.type-submit .llms-field-button {
	width: 100%;
	padding: 1rem 1.5rem;
	font-size: 1.15rem;
	border-radius: 8px;
	text-align: center;
}
.llms-checkout .llms-field-button.llms-button-action {
	background: var(--wp--preset--color--tertiary, #FE8426);
	color: #fff;
	border: none;
	font-weight: 600;
	cursor: pointer;
}
.llms-checkout .llms-field-button.llms-button-action:hover {
	background: var(--wp--preset--color--tertiary-darker, #E06F14);
}
.llms-checkout .llms-field-button.llms-button-secondary {
	background: transparent;
	color: var(--wp--preset--color--primary, #2A4F7D);
	border: 1px solid var(--wp--preset--color--primary, #2A4F7D);
	border-radius: 6px;
	padding: 0.6rem 1.2rem;
	font-weight: 600;
	cursor: pointer;
}
.llms-checkout .llms-field-button.llms-button-secondary:hover {
	background: var(--wp--preset--color--primary-lightest, #2A4F7D11);
}

/* coupon link */
.llms-coupon-wrapper a,
.llms-checkout-wrapper a {
	color: var(--wp--preset--color--primary, #2A4F7D);
}

/* ==========================================================================
   Quiz-taking UI
   ========================================================================== */

/* progress bars (quiz nav, course progress) */
.llms-progress .progress-bar-complete {
	background-color: var(--wp--preset--color--tertiary, #FE8426);
}

/* answer choices as selectable cards */
.llms-question-wrapper .llms-choice label {
	border: 1px solid var(--wp--preset--color--contrast-lightest, #E6E6E6);
	border-radius: 8px;
	padding: 0.8rem 1rem;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.llms-question-wrapper .llms-choice label:hover {
	border-color: var(--wp--preset--color--secondary, #4081B4);
	background-color: #F7FAFD;
}
.llms-question-wrapper .llms-choice input:checked + label {
	border-color: var(--wp--preset--color--primary, #2A4F7D);
	background-color: var(--wp--preset--color--etd-gray-blue, #E0E9F5);
}
.llms-question-wrapper .llms-choice label::before {
	background: var(--wp--preset--color--primary-darkest, #122032) !important;
	color: #fff !important;
}
.llms-question-wrapper .llms-choice input:checked + label::before {
	background: var(--wp--preset--color--tertiary, #FE8426) !important;
	color: #fff !important;
}

/* action buttons everywhere (Take Quiz, Start Quiz, Next, Complete, Mark Complete...):
   WCAG contrast - navy text on brand orange (5.8:1) */
.llms-button-action,
a.llms-button-action,
button.llms-button-action {
	background: var(--wp--preset--color--tertiary, #FE8426) !important;
	color: var(--wp--preset--color--primary-darkest, #122032) !important;
	font-weight: 600;
}
.llms-button-action:hover,
a.llms-button-action:hover,
button.llms-button-action:hover {
	background: var(--wp--preset--color--tertiary-darker, #E06F14) !important;
	color: var(--wp--preset--color--primary-darkest, #122032) !important;
}
.llms-quiz-nav .llms-button-secondary,
.llms-quiz-wrapper .llms-button-secondary {
	background: var(--wp--preset--color--primary-darkest, #122032) !important;
	border: none;
	color: #fff !important;
	font-weight: 600;
}
.llms-quiz-nav .llms-button-secondary:hover,
.llms-quiz-wrapper .llms-button-secondary:hover {
	background: var(--wp--preset--color--primary-darker, #192F4B) !important;
	color: #fff !important;
}

/* quiz nav: Previous left, counter center, Next/Complete right (LifterLMS default puts Next first) */
.llms-quiz-nav {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.llms-quiz-nav .llms-button-secondary {
	order: 1;
}
.llms-quiz-nav .llms-quiz-counter,
.llms-quiz-nav #llms-quiz-counter {
	order: 2;
	margin: 0 auto;
}
.llms-quiz-nav .llms-button-action {
	order: 3;
}

/* enrolled students: prominent continue button above the syllabus */
.etd-continue-wrap .llms-button-primary {
	display: block;
	width: 100%;
	text-align: center;
	padding: 0.9rem 1rem;
	font-size: 1.1rem;
}

/* quiz timer + counter */
.llms-quiz-timer {
	border-color: var(--wp--preset--color--primary, #2A4F7D);
	color: var(--wp--preset--color--primary-darkest, #122032);
}

/* results: per-question score must not shrink (LifterLMS ships flex:0 1 auto, which
   collapses "0 / 1 points" into a one-character-per-line column) */
.llms-quiz-attempt-question .toggle-answer .llms-points {
	flex: 0 0 auto;
	white-space: nowrap;
	margin-left: 0.9rem;
	color: var(--wp--preset--color--contrast-medium, #525252);
	font-size: 0.9rem;
}

/* results: grade donuts + clarifications */
.llms-donut {
	color: var(--wp--preset--color--primary, #2A4F7D);
}
.llms-donut.passing {
	color: var(--wp--preset--color--success, #18A957);
}
.llms-quiz-attempt-results .llms-quiz-attempt-question-clarification,
.llms-question-wrapper .clarification {
	background: var(--wp--preset--color--etd-gray-orange, #FFEDDE);
	border-left: 4px solid var(--wp--preset--color--tertiary, #FE8426);
	border-radius: 6px;
	padding: 0.9rem 1.1rem;
}

/* ==========================================================================
   Student dashboard
   ========================================================================== */

.llms-sd-nav ul li a {
	font-weight: 600;
	color: var(--wp--preset--color--primary, #2A4F7D);
}
.llms-sd-nav ul li.current a,
.llms-sd-nav ul li a:hover {
	color: var(--wp--preset--color--tertiary, #FE8426);
}

/* secondary buttons: navy outline (dashboard "View All", etc.) */
.llms-button-secondary {
	background: transparent;
	border: 1px solid var(--wp--preset--color--primary, #2A4F7D);
	color: var(--wp--preset--color--primary, #2A4F7D);
	border-radius: 6px;
	font-weight: 600;
}
.llms-button-secondary:hover {
	background: var(--wp--preset--color--primary-lightest, #2A4F7D11);
	color: var(--wp--preset--color--primary-darker, #192F4B);
}

/* login / registration forms (logged-out dashboard) */
.llms-person-form-wrapper .llms-form-field input {
	width: 100%;
	padding: 0.7rem 0.95rem;
	border: 1px solid var(--wp--preset--color--contrast-lighter, #9C9C9C);
	border-radius: 6px;
	font-size: 1rem;
	box-sizing: border-box;
}
.llms-person-form-wrapper .llms-form-field input:focus {
	outline: none;
	border-color: var(--wp--preset--color--secondary, #4081B4);
	box-shadow: 0 0 0 3px rgba(64, 129, 180, 0.18);
}
