/* Comodex — supplementary styles for things theme.json cannot express. */

/* ---------- Block style: Card ---------- */
.wp-block-group.is-style-comodex-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: var(--wp--preset--shadow--card);
	height: 100%;
	transition: box-shadow .18s ease, transform .18s ease;
}
.wp-block-group.is-style-comodex-card:hover {
	box-shadow: var(--wp--preset--shadow--lift);
	transform: translateY(-2px);
}

/* ---------- Block style: accent rule on top ---------- */
.wp-block-group.is-style-comodex-rule-top {
	border-top: 4px solid var(--wp--preset--color--cyan);
	padding-top: var(--wp--preset--spacing--30);
}

/* ---------- Block style: eyebrow heading ---------- */
.is-style-comodex-eyebrow {
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--cyan) !important;
	margin-bottom: var(--wp--preset--spacing--10);
}

/* ---------- Block style: tick list ---------- */
.wp-block-list.is-style-comodex-ticks {
	list-style: none;
	padding-left: 0;
}
.wp-block-list.is-style-comodex-ticks li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: .6rem;
}
.wp-block-list.is-style-comodex-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .45em;
	width: 1rem;
	height: .55rem;
	border-left: 2.5px solid var(--wp--preset--color--cyan);
	border-bottom: 2.5px solid var(--wp--preset--color--cyan);
	transform: rotate(-45deg);
}

/* ---------- Block style: FAQ details ---------- */
.wp-block-details.is-style-comodex-faq {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--preset--spacing--30) 0;
}
.wp-block-details.is-style-comodex-faq summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--navy);
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.wp-block-details.is-style-comodex-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-comodex-faq summary::after {
	content: "+";
	font-weight: 400;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--wp--preset--color--cyan);
	flex: 0 0 auto;
}
.wp-block-details.is-style-comodex-faq[open] summary::after { content: "\2013"; }
.wp-block-details.is-style-comodex-faq > *:not(summary) { margin-top: var(--wp--preset--spacing--20); }

/* ---------- Header ---------- */
.comodex-header { position: sticky; top: 0; z-index: 100; }
.comodex-header .wp-block-site-logo img { max-height: 62px; width: auto; }
.comodex-header .wp-block-navigation a { text-decoration: none; }
.comodex-header .wp-block-navigation a:hover,
.comodex-header .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--cyan);
}
@media (max-width: 781px) {
	.comodex-header .wp-block-site-logo img { max-height: 46px; }
}

/* ---------- Skip link ---------- */
.skip-link:focus {
	background: var(--wp--preset--color--navy);
	color: #fff;
	padding: .75rem 1.25rem;
	z-index: 1000;
}

/* ---------- Course tables ---------- */
.comodex-course-table table { border-collapse: collapse; width: 100%; }
.comodex-course-table th {
	background: var(--wp--preset--color--navy);
	color: #fff;
	text-align: left;
	font-family: var(--wp--preset--font-family--heading);
	font-size: .78rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .8rem .9rem;
	border: none;
}
.comodex-course-table td {
	padding: .75rem .9rem;
	border: none;
	border-top: 1px solid var(--wp--preset--color--line);
	vertical-align: top;
}
.comodex-course-table tbody tr:nth-child(even) td { background: var(--wp--preset--color--bone); }
.comodex-course-table td:nth-child(2),
.comodex-course-table td:nth-child(3) { white-space: nowrap; color: var(--wp--preset--color--muted); }
@media (max-width: 700px) {
	.comodex-course-table thead { display: none; }
	.comodex-course-table tr { display: block; border-top: 1px solid var(--wp--preset--color--line); padding: .75rem 0; }
	.comodex-course-table td { display: block; border: none; padding: .15rem 0; }
	.comodex-course-table tbody tr:nth-child(even) td { background: none; }
	.comodex-course-table td:first-child { font-weight: 600; color: var(--wp--preset--color--navy); }
}

/* ---------- Utility ---------- */
.comodex-stat .wp-block-heading { margin-bottom: 0; }
.has-navy-background-color :where(h1,h2,h3,h4,h5,h6),
.has-navy-deep-background-color :where(h1,h2,h3,h4,h5,h6),
.has-navy-cyan-gradient-background :where(h1,h2,h3,h4,h5,h6) { color: #fff; }
.has-navy-background-color a:not(.wp-element-button),
.has-navy-deep-background-color a:not(.wp-element-button) { color: #9BD9F0; }

/* Never let a section overflow the viewport horizontally. */
html, body { overflow-x: clip; }


/* ---------- Cards must never inherit light text from a dark parent ---------- */
/* A card can sit inside a cover or navy band, which sets colour: #fff on its
   children. The card has a white background, so it has to reassert its own. */
.wp-block-group.is-style-comodex-card,
.has-navy-background-color .wp-block-group.is-style-comodex-card,
.has-navy-deep-background-color .wp-block-group.is-style-comodex-card,
.has-navy-cyan-gradient-background .wp-block-group.is-style-comodex-card,
.wp-block-cover .wp-block-group.is-style-comodex-card {
	color: var(--wp--preset--color--body);
}
.wp-block-group.is-style-comodex-card :where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--navy);
}
.wp-block-group.is-style-comodex-card a:not(.wp-element-button),
.wp-block-cover .wp-block-group.is-style-comodex-card a:not(.wp-element-button) {
	color: var(--wp--preset--color--cyan-deep);
}
.wp-block-group.is-style-comodex-card .is-style-comodex-eyebrow {
	color: var(--wp--preset--color--cyan) !important;
}

/* ---------- Eyebrow needs a lighter tone on dark backgrounds ---------- */
/* #008CBA on navy fails contrast; lift it on dark sections only. */
.wp-block-cover .is-style-comodex-eyebrow,
.has-navy-background-color .is-style-comodex-eyebrow,
.has-navy-deep-background-color .is-style-comodex-eyebrow,
.has-navy-cyan-gradient-background .is-style-comodex-eyebrow {
	color: #8FD6F2 !important;
}

/* ---------- Cover text legibility ---------- */
.wp-block-cover .wp-block-cover__inner-container > * { position: relative; }
