/* =============================================================================================
   Canvas CLO Tools — app styles.

   Rewritten from scratch. The plugin previously carried a much larger stylesheet inherited
   wholesale from Outcomes Ledger (the bigger product this was split out of) — dashboards,
   landing pages, KPI tiles, course rosters, none of which this three-tab tool ever renders.
   This file only styles the classes app.js actually outputs: three tabs, a five-step wizard,
   cards, forms, tables, buttons, and banners. (The old file is kept alongside this one as
   app.css.old-outcomesledger-fork.bak for reference, not enqueued.)

   Design direction: this is accreditation record-keeping, not a marketing app — instructors
   are entering data that ends up in a CLO/PLO attainment report. The look aims for "official
   ledger" rather than "startup dashboard": ink and paper instead of gradients, a serif face for
   headings the way a transcript or report header would use one, and a single brass accent used
   sparingly (the active step, links, focus rings) rather than spread across every element.
   ============================================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

#cct-app-root {
	--ink: #1E2A44;         /* primary: headings, primary buttons, active states */
	--ink-dark: #141D30;    /* hover/pressed state of ink */
	--brass: #A97D2A;       /* the one accent: links, focus rings, active step/tab */
	--brass-dark: #8C6620;
	--paper: #F7F5EF;       /* page background — warm, not stark white */
	--card: #FFFFFF;
	--line: #E5E0D2;        /* hairline borders */
	--text: #26293A;        /* body text */
	--muted: #6E6A5C;       /* secondary text */
	--success: #2F6B4F;
	--success-bg: #EAF3ED;
	--danger: #9E3B33;
	--danger-bg: #FBEDEB;
	--warning: #93631C;
	--warning-bg: #FBF2E1;
	--radius: 8px;
	--ol-bg: var(--paper);  /* alias: a couple of inline styles in app.js still reference --ol-bg directly */
	--font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	display: block;
	font-family: var(--font-body);
	font-size: 16px;
	color: var(--text);
	background: var(--paper);
	line-height: 1.55;
	min-height: 400px;

	/* Breaks the app out of whatever narrow content column the active WordPress theme centers
	   its pages in — this is a desktop working tool, not an article. Standard full-bleed trick:
	   stretch to the viewport, then pull back by exactly the parent's own centering offset. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	overflow-x: clip;
}

#cct-app-root * { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
	#cct-app-root * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* :where() zeroes out the ID's specificity contribution so plain element rules below (h1, a,
   table…) stay easily overridable by ordinary classes, instead of an ID selector silently
   beating every class-based rule in this file regardless of source order. */
:where(#cct-app-root) a { color: var(--brass-dark); text-decoration-thickness: 1px; }
:where(#cct-app-root) a:hover { color: var(--brass); }
:where(#cct-app-root) h1, :where(#cct-app-root) h2, :where(#cct-app-root) h3, :where(#cct-app-root) h4 {
	font-family: var(--font-display); color: var(--ink); margin: 0 0 12px; letter-spacing: -0.01em;
}
:where(#cct-app-root) h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 6px; }
:where(#cct-app-root) h2 { font-size: 1.35rem; font-weight: 700; }
:where(#cct-app-root) h3 { font-size: 1.05rem; font-weight: 600; margin: 18px 0 8px; font-family: var(--font-body); }
:where(#cct-app-root) h4 { font-size: 0.95rem; font-weight: 700; margin: 10px 0 6px; font-family: var(--font-body); }
:where(#cct-app-root) p { margin: 0 0 10px; font-size: 0.97rem; }
:where(#cct-app-root) ul { margin: 0 0 10px; padding-left: 20px; font-size: 0.95rem; }

:where(#cct-app-root) :focus-visible {
	outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 3px;
}

.ol-app { max-width: none; margin: 0; padding: 0; }
.ol-main, #cct-app-root > .ol-main { max-width: 1180px; margin: 0 auto; padding: 0 28px 60px; }
.ol-muted { color: var(--muted); }

/* ---- Header (a quiet letterhead, not a gradient banner) --------------------------------- */
#cct-app-root .cct-header {
	max-width: 1180px; margin: 0 auto 22px; padding: 22px 28px 18px;
	border-bottom: 3px solid var(--brass);
}
#cct-app-root .cct-header__title {
	font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
	letter-spacing: -0.01em; margin: 0 0 4px; color: var(--ink);
}
#cct-app-root .cct-header__credit {
	font-size: 0.82rem; font-weight: 500; margin: 0; color: var(--muted);
}
@media (max-width: 640px) {
	#cct-app-root .cct-header { padding: 16px 18px 14px; }
	#cct-app-root .cct-header__title { font-size: 1.35rem; }
}

#cct-work { max-width: 1180px; margin: 0 auto; padding: 0 28px 60px; }

/* ---- Tool tabs — document-section tabs, not filled pill buttons ------------------------- */
.ol-tabs {
	display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line);
	margin-bottom: 22px;
}
.ol-tab {
	appearance: none; background: none; border: none; cursor: pointer; font: inherit;
	padding: 11px 16px 12px; font-size: 0.92rem; font-weight: 600; color: var(--muted);
	border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color .12s ease, border-color .12s ease;
}
.ol-tab:hover { color: var(--ink); }
.ol-tab--active { color: var(--ink); border-bottom-color: var(--brass); }
@media (max-width: 640px) {
	.ol-tabs { gap: 0; }
	.ol-tab { padding: 9px 11px 10px; font-size: 0.85rem; }
}

/* ---- Step tracker (five-step wizards) ---------------------------------------------------
   Content really is a sequence here, so numbered markers earn their place. A filled circle for
   the current/completed step, a thin connecting line, outline circles for what's ahead. */
.ol-steps { display: flex; align-items: flex-start; margin-bottom: 24px; }
.ol-step {
	display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative;
	font-size: 0.78rem; font-weight: 600; color: var(--muted); text-align: center;
}
.ol-step:not(:last-child)::after {
	content: ''; position: absolute; top: 13px; left: calc(50% + 20px); right: calc(-50% + 20px);
	height: 1px; background: var(--line);
}
.ol-step--done:not(:last-child)::after, .ol-step--active:not(:last-child)::after { background: var(--brass); }
.ol-step__num {
	width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--card); border: 1.5px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 700;
	font-family: var(--font-body); position: relative; z-index: 1; flex-shrink: 0;
}
.ol-step--active .ol-step__num { background: var(--ink); border-color: var(--ink); color: #fff; }
.ol-step--done .ol-step__num { background: var(--brass); border-color: var(--brass); color: #fff; }
.ol-step--active .ol-step__label { color: var(--ink); }
.ol-step--done .ol-step__label { color: var(--brass-dark); }
@media (max-width: 720px) {
	.ol-step__label { display: none; }
	.ol-step:not(:last-child)::after { left: calc(50% + 15px); right: calc(-50% + 15px); }
}

/* ---- Cards -------------------------------------------------------------------------------- */
.ol-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px 26px; margin-bottom: 18px;
	box-shadow: 0 1px 2px rgba(30, 42, 68, 0.04);
}
.ol-card--wide { max-width: none; }
.ol-picker { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.ol-picker .ol-field { margin-bottom: 0; min-width: 220px; }

/* ---- Forms & fields ------------------------------------------------------------------------ */
.ol-form { display: flex; flex-direction: column; gap: 14px; }
.ol-form--inline { flex-direction: row; flex-wrap: wrap; gap: 14px; }
.ol-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.ol-form--inline > .ol-field { margin-bottom: 0; }
.ol-field label {
	font-size: 0.8rem; font-weight: 600; color: var(--ink); font-family: var(--font-body);
}

.ol-input, .ol-select,
#cct-app-root input[type="text"], #cct-app-root input[type="number"],
#cct-app-root input[type="file"], #cct-app-root select, #cct-app-root textarea {
	font-family: var(--font-body); font-size: 0.94rem; color: var(--text); background: var(--card);
	border: 1.5px solid var(--line); border-radius: 6px; padding: 9px 11px; line-height: 1.3;
	width: 100%; transition: border-color .12s ease;
}
#cct-app-root input[type="number"] { font-variant-numeric: tabular-nums; }
.ol-input:focus, .ol-select:focus,
#cct-app-root input:focus, #cct-app-root select:focus, #cct-app-root textarea:focus {
	outline: none; border-color: var(--brass);
}
#cct-app-root input[type="checkbox"], #cct-app-root input[type="radio"] {
	accent-color: var(--ink); width: 16px; height: 16px; flex-shrink: 0;
}
#cct-app-root input[type="file"] { padding: 7px 9px; cursor: pointer; }
#cct-app-root label:has(> input[type="checkbox"]), #cct-app-root label:has(> input[type="radio"]) {
	display: flex; align-items: center; gap: 7px; font-weight: 500; cursor: pointer;
}

/* ---- Buttons --------------------------------------------------------------------------------
   One filled ink primary action per view; everything else is a ghost outline or a plain danger
   variant. No brass-filled buttons — brass is reserved for the step tracker, tabs, and links, so
   it keeps meaning "where you are" rather than becoming just a second button color. */
.ol-btn {
	appearance: none; cursor: pointer; font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
	border-radius: 6px; padding: 10px 18px; border: 1.5px solid transparent; transition: background-color .12s ease, border-color .12s ease, color .12s ease;
	display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
}
.ol-btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.ol-btn--primary:hover { background: var(--ink-dark); border-color: var(--ink-dark); }
.ol-btn--primary:disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.ol-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.ol-btn--ghost:hover { border-color: var(--ink); background: var(--paper); }
.ol-btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.ol-btn--danger:hover { background: var(--danger-bg); }
.ol-btn--small { padding: 7px 13px; font-size: 0.85rem; }
.ol-btn--tiny { padding: 5px 10px; font-size: 0.8rem; border-radius: 5px; }

.ol-dl-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Banners / notices -----------------------------------------------------------------
   A left-border notice strip rather than a fully tinted rounded block — reads as an annotation
   on the page (like a margin note on a report) rather than a UI chrome element competing with
   the content it's about. */
.ol-banner {
	border-left: 3px solid var(--muted); background: var(--paper); padding: 10px 14px;
	border-radius: 4px; font-size: 0.9rem; margin-bottom: 14px; line-height: 1.5;
}
.ol-banner ul { margin: 6px 0 0; padding-left: 18px; }
.ol-banner--success { border-left-color: var(--success); background: var(--success-bg); color: #1E4230; }
.ol-banner--error { border-left-color: var(--danger); background: var(--danger-bg); color: #6B2820; }
.ol-banner--warning { border-left-color: var(--warning); background: var(--warning-bg); color: #6B4A14; }
.ol-banner--info { border-left-color: var(--brass); background: #FBF7EE; color: var(--ink); }

/* ---- Tables --------------------------------------------------------------------------------
   Lined like a ledger rather than boxed like a data-grid: no vertical rules, a slightly heavier
   header rule, alternating rows dropped in favor of plain hairlines so nothing distracts from
   the CLO/weight values themselves. */
.ol-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.ol-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ol-table th, .ol-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ol-table th {
	font-family: var(--font-body); font-weight: 700; font-size: 0.78rem; color: var(--muted);
	text-transform: none; letter-spacing: 0.01em; background: var(--paper); border-bottom: 2px solid var(--line);
	white-space: nowrap;
}
.ol-table tbody tr:last-child td { border-bottom: none; }
.ol-table tbody tr:hover { background: var(--paper); }
.ol-table input[type="number"], .ol-table select { min-width: 70px; }

@media (max-width: 640px) {
	.ol-card { padding: 18px 16px; }
	/* !important: several inline "align-items:flex-end" styles are set directly by app.js for
	   the desktop layout of these rows, which an ordinary stylesheet rule can't outrank. */
	.ol-form--inline { flex-direction: column !important; align-items: stretch !important; }
	.ol-form--inline > .ol-field { width: 100% !important; }
}
