/* Basic reset */
body.wsi-training {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050812;
    color: #e5ecf5;
}

/* App shell */
.wt-app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.wt-header {
    background: #ffffff;
    border-bottom: 1px solid #d4d4d8;
}

.wt-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px; /* header gap is fine */
}

/* Brand area */
.wt-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wt-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wt-logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.wt-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wt-brand-tagline {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4b5563;
    white-space: nowrap;
}

.wt-brand-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

/* Module name on right */
.wt-module-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    text-align: right;
}

/* Main layout */
.wt-main {
    flex: 1;
}

.wt-main-inner {
    max-width: 1200px;
    margin: 24px auto 32px;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ===========================
   Panels – unified style
   =========================== */

.wt-panel {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.98));
    border-radius: 24px;
    padding: 20px 24px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.65);
    display: flex;
    flex-direction: column;
}

/* Just color tweaks per section */
.wt-panel--intro {
    border-color: rgba(148, 163, 184, 0.5);
}

.wt-panel--slides {
    border-color: rgba(59, 130, 246, 0.8);
}

.wt-panel--test {
    border-color: rgba(239, 68, 68, 0.8);
}

/* Centered section titles: Overview / Training Content / Knowledge Check */
.wt-panel .wt-panel-title {
    flex: 0 0 auto;
    width: 100%;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e5ecf5;
    text-align: center;
}

/* Belt-and-suspenders override */
.wt-panel.wt-panel--intro > .wt-panel-title,
.wt-panel.wt-panel--slides > .wt-panel-title,
.wt-panel.wt-panel--test > .wt-panel-title {
    text-align: center !important;
}

/* Content areas inside panels */
.wt-panel .ccm-area {
    width: 100%;
    margin: 0;
}

/* Default block text styling */
.wt-panel .ccm-block-content,
.wt-panel .ccm-block-html {
    font-size: 14px;
    color: #e5ecf5;
    line-height: 1.5;
}

/* Simple helpers for overview text */
.module-section-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.module-section-text {
    margin: 0;
    line-height: 1.6;
}

/* Footer */
.wt-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    background: #020617;
}

.wt-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 14px;
    font-size: 12px;
    color: #9ca3af;
}
/* ===========================
   Home page module cards
   =========================== */

.wt-module-card {
    background: #0b1120; /* deep navy to match training panels */
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.7);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.wt-module-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* WSI red accent bar across the top */
.wt-module-card-bar {
    height: 4px;
    background: #c01c2b; /* WSI red */
}

/* Card body */
.wt-module-card-body {
    padding: 16px 18px 18px;
}

/* Title */
.wt-module-card-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #e5ecf5;
}

/* Description */
.wt-module-card-text {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(229, 236, 245, 0.85);
}

/* CTA line */
.wt-module-card-cta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: #f97373; /* lighter red accent */
}

/* Hover state for active cards */
.wt-module-card:hover {
    transform: translateY(-3px);
    border-color: #c01c2b;
    box-shadow: 0 18px 40px rgba(192, 28, 43, 0.45);
}

/* Disabled / coming-soon cards */
.wt-module-card--disabled {
    opacity: 0.75;
}

.wt-module-card--disabled:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.7);
}

.wt-module-card--disabled .wt-module-card-cta {
    color: #9ca3af;
}
.wt-module-card-icon {
    margin-bottom: 18px;            /* better spacing */
    display: flex;
    justify-content: center;
}

.wt-module-card-icon svg {
    width: 85px;
    height: 85px;
    opacity: 0.95;                  /* crisper white */
    stroke-width: 1.6;              /* sharpens thin-line icons */
    filter: drop-shadow(0 0 6px rgba(192, 28, 43, 0.18)); /* subtle WSI glow */
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .wt-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .wt-module-name {
        text-align: left;
        font-size: 15px;
    }

    .wt-main-inner {
        padding: 0 14px 28px;
    }

    .wt-panel {
        border-radius: 18px;
        padding: 14px 16px;
    }
}

/* ===========================
   Lesson layout – Training Content
   =========================== */

.wt-panel--slides .wt-lesson-layout {
    display: flex;
    align-items: flex-start;
}

/* Image side */
.wt-lesson-figure {
    flex: 0 0 auto;        /* size based on the image itself */
    min-width: 280px;
    margin-right: 24px;    /* spacing between columns */
}

.wt-lesson-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 0; /* don't auto-center; we want it snug left */
}

/* Text side */
.wt-lesson-notes {
    flex: 1 1 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(229, 236, 245, 0.95);
}

.wt-lesson-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.wt-lesson-intro {
    margin: 0 0 16px;
    color: rgba(229, 236, 245, 0.8);
}

/* Callout groups */
.wt-callout-group {
    margin-bottom: 16px;
}

.wt-callout-heading {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 6px;
    color: rgba(229, 236, 245, 0.75);
}

.wt-callout-list {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.wt-callout-list li {
    margin-bottom: 4px;
}

/* Stack lesson layout on mobile */
@media (max-width: 900px) {
    .wt-panel--slides .wt-lesson-layout {
        flex-direction: column;
    }

    .wt-lesson-figure,
    .wt-lesson-notes {
        flex: 1 1 auto;
        margin-right: 0;
    }
}

/* ===========================
   Image handling
   =========================== */

/* Generic: don't let images blow out the layout */
.wt-panel img {
    max-width: 100%;      /* prevents overflow */
    height: auto;         /* keeps aspect ratio */
    display: block;
    margin: 0 auto;       /* center images by default */
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* No forced sizing on training content images.
   You control size per lesson in the HTML. */
.wt-panel--slides img {
    /* intentionally empty — HTML controls sizing */
}

/* Don’t indent Training Content / Knowledge Check */
.wt-panel--slides .ccm-area,
.wt-panel--test .ccm-area {
    margin: 0;
}

/* ===========================
   Knowledge Check layout – side-by-side
   =========================== */

.wt-panel--test .wt-quiz-layout {
    display: flex;
    align-items: flex-start;
}

/* Left column: numbered diagram */
.wt-quiz-figure {
    flex: 0 0 auto;
    max-width: 420px;        /* tweak if needed */
    margin-right: 28px;      /* spacing between image and dropdowns */
}

.wt-quiz-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Right column: dropdown questions */
.wt-quiz-questions {
    flex: 1 1 0;
    font-size: 14px;
}

.wt-quiz-intro {
    margin: 0 0 12px;
    color: rgba(229, 236, 245, 0.85);
}

/* Question list */
.wt-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wt-check-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.wt-check-number {
    width: 32px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: rgba(229, 236, 245, 0.85);
}

/* The dropdown itself */
.wt-check-select {
    flex: 1 1 auto;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 4px;
    color: #e5ecf5;
    font-size: 13px;
}

/* make native select text visible on focus */
.wt-check-select:focus {
    outline: 2px solid rgba(59, 130, 246, 0.9);
    outline-offset: 1px;
}

/* Quiz button + feedback */
.wt-quiz-button {
    margin-top: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: #e5ecf5;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.wt-quiz-button:hover {
    background: rgba(30, 64, 175, 0.95);
}

.wt-quiz-feedback {
    margin-top: 8px;
    font-size: 13px;
    color: #5ee5c5;      /* success */
}

.wt-quiz-feedback--error {
    color: #fca5a5;      /* error text if you ever need it */
}

/* Stack image and quiz on small screens */
@media (max-width: 900px) {
    .wt-panel--test .wt-quiz-layout {
        flex-direction: column;
    }

    .wt-quiz-figure {
        max-width: 100%;
        margin: 0 0 20px;
    }
}

/* ===========================
   Lesson accordion UI
   =========================== */

.wt-lesson-accordion {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    margin-bottom: 18px;
    overflow: hidden;
}

/* Header button */
.wt-lesson-toggle {
    width: 100%;
    padding: 12px 18px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: #e5ecf5;
    text-align: left;
}

.wt-lesson-toggle:hover {
    background: rgba(15, 23, 42, 0.9);
}

.wt-lesson-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.8;
}

.wt-lesson-title-short {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

/* Chevron icon */
.wt-lesson-toggle-icon::before {
    content: "▼";
    font-size: 11px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.wt-lesson-accordion--open .wt-lesson-toggle-icon::before {
    transform: rotate(-180deg);
}

/* Collapsible panel */
.wt-lesson-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
}

/* When open, expand to content height */
.wt-lesson-accordion--open .wt-lesson-panel {
    /* JS will set max-height to scrollHeight; this just ensures animation */
    transition: max-height 0.25s ease;
    padding-bottom: 12px;
}

/* ===================================
   Make lesson content visible in edit mode
   =================================== */

body.ccm-edit-mode .wt-lesson-accordion {
    overflow: visible !important;
}

body.ccm-edit-mode .wt-lesson-panel {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Don't act like a clickable toggle while editing */
body.ccm-edit-mode .wt-lesson-toggle {
    cursor: default;
    pointer-events: none;
}
/* ===========================
   Home page layout (no pills)
   =========================== */

.wt-main-inner--home {
    max-width: 960px;
    margin: 24px auto 40px;
}

.wt-home-section {
    margin-bottom: 32px;
}

.wt-home-heading {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 10px;
    color: #e5ecf5;
}
/* ===========================
   Header navigation (WSI styled Auto-Nav)
   =========================== */

.wt-header-nav {
    display: flex;
    align-items: center;
    font-size: 14px;
}

/* Top-level list */
.wt-header-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
}

/* Reset nested lists */
.wt-header-nav ul ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Top-level items */
.wt-header-nav > ul > li {
    position: relative;
}

/* Base link style */
.wt-header-nav a {
    text-decoration: none;
    font-weight: 500;
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #0b1120; /* deep navy */
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

/* Hover (top-level) */
.wt-header-nav > ul > li > a:hover {
    background: rgba(192, 28, 43, 0.06);   /* soft WSI red tint */
    border-color: #c01c2b;                 /* WSI red */
    color: #0b1120;
}

/* Current / active page pill */
.wt-header-nav > ul > li.nav-selected > a,
.wt-header-nav > ul > li.nav-path-selected > a {
    background: #c01c2b;                   /* WSI red */
    border-color: #c01c2b;
    color: #f9fafb;
    box-shadow: 0 6px 18px rgba(192, 28, 43, 0.35);
}

/* Make non-clickable label (Training Modules) look like a label */
.wt-header-nav .wt-nav-label {
    pointer-events: none;
    cursor: default;
    font-weight: 600;
    background: transparent;
    border-color: transparent;
    color: #0b1120;
    box-shadow: none;
}

/* ===========================
   Dropdown styles (WSI)
   =========================== */

.wt-header-nav li > ul {
    position: absolute;
    top: 100%;              /* sits directly under the pill, no hover gap */
    left: 0;
    margin-top: 0;          /* IMPORTANT: no gap, fixes the "have to aim perfectly" issue */
    padding: 8px 0 10px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
    min-width: 260px;
    display: none;
    flex-direction: column;
    z-index: 100;
    border-top: 3px solid #c01c2b;    /* WSI red accent bar */
}

/* Show dropdown on hover */
.wt-header-nav li:hover > ul {
    display: flex;
}

/* Dropdown list items */
.wt-header-nav li > ul > li {
    width: 100%;
}

/* Dropdown links */
.wt-header-nav li > ul a {
    display: block;
    width: 100%;
    padding: 8px 18px;
    border-radius: 0;
    background: transparent;
    color: #0b1120;
    border: none;
    box-shadow: none;
    font-weight: 500;
}

/* Dropdown hover – simple, clean, no side bar */
.wt-header-nav li > ul a:hover {
    background: #f3f4f6;
    color: #0b1120;
}

/* ===========================
   Mobile tweaks
   =========================== */
@media (max-width: 768px) {
    .wt-header-nav > ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Dropdowns become simple stacked lists on mobile */
    .wt-header-nav li > ul {
        position: static;
        box-shadow: none;
        margin-top: 4px;
        border-radius: 10px;
        min-width: 0;
    }

    .wt-header-nav li:hover > ul {
        display: block;
    }
}

/* FIX HEADER HIDING IN EDIT MODE */
.wt-header {
    position: relative !important;
    top: 0 !important;
    z-index: 9999 !important;
}
.ccm-toolbar-visible .wt-app-shell {
    margin-top: 55px !important;
}

/* Make "Training Modules" act like a label, not a link */
.wt-header-nav > ul > li > a[href$="/training-modules"] {
    pointer-events: none;
    cursor: default;
    font-weight: 600;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
.wt-header-nav > ul > li > a[href$="/training-modules"]:hover {
    background: transparent;
    color: #0b1120;
    box-shadow: none;
}
/* ===========================================
   FIX TOP-LEVEL HOVER BLEED BEHIND DROPDOWN
   =========================================== */

/* Remove pill hover effect on any item that has a submenu */
.wt-header-nav li.has-submenu > a:hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: #0b1120 !important;
}

/* Ensure dropdown hover is clean and readable */
.wt-header-nav li > ul a:hover {
    background: #f9fafb !important;
    color: #c01c2b !important; /* WSI red */
    padding-left: 18px !important;
    border-left: none !important;
}

/* Clean up weird gray backgrounds from inherited styles */
.wt-header-nav li > ul a {
    background: transparent !important;
}
/* Force Training Modules label to ALWAYS be visible */
.wt-header-nav ul > li > a[href*="training-modules"] {
    background: transparent !important;
    color: #0b1120 !important;   /* deep navy */
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Also: prevent the red pill highlight when path-selected */
.wt-header-nav ul > li.nav-path-selected > a[href*="training-modules"],
.wt-header-nav ul > li.nav-selected > a[href*="training-modules"] {
    background: transparent !important;
    color: #0b1120 !important;
    box-shadow: none !important;
    border-color: transparent !important;
}
.wt-lesson-notes {
    padding: 20px;
}
