/* ==========================================================================
   TAOC Outcomes Framework guide -- rendered under the TC Outcomes tab
   (resources/views/vendor/articles/committees/boardLevel/taoc/outcomes-guide.blade.php)

   Colours and type come from the --ed-* tokens in issmge-2026.css so the guide
   follows the official ISSMGE red. Every rule is prefixed .taoc- and resets the
   Bootstrap 3 margins it would otherwise inherit inside .tab-content.
   ========================================================================== */

.taoc-widget {
    font-family: var(--ed-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ed-body);
    width: 100% !important;
}
.taoc-widget *,
.taoc-widget *::before,
.taoc-widget *::after { box-sizing: border-box; }
.taoc-widget p,
.taoc-widget h2,
.taoc-widget h3,
.taoc-widget ul { margin-top: 0; }

/* Header */
.taoc-header {
    background: var(--ed-navy);
    border-radius: 10px;
    padding: 36px 32px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.taoc-header::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(ellipse 60% 80% at 90% 50%, rgba(177,43,50,0.55) 0%, transparent 70%);
    pointer-events: none;
}
.taoc-header > * { position: relative; }
.taoc-header-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.taoc-widget .taoc-header-title {
    font-family: var(--ed-serif);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 500;
    color: var(--ed-white);
    line-height: 1.15;
    margin-bottom: 10px;
    text-transform: none;
}
.taoc-header-title em {
    font-style: italic;
    color: rgba(255,255,255,0.75);
}
.taoc-header-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    max-width: 460px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.taoc-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}
.taoc-header-badge .taoc-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ed-blush);
    flex-shrink: 0;
}

/* Prose sections */
.taoc-section { margin-bottom: 32px; }
.taoc-section p {
    margin-bottom: 12px;
    line-height: 1.7;
}
.taoc-section p:last-child { margin-bottom: 0; }
.taoc-section strong { color: var(--ed-ink); }
.taoc-widget .taoc-section-title {
    font-family: var(--ed-serif);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--ed-navy);
    text-transform: none;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ed-line);
}

/* Callout */
.taoc-callout {
    background: var(--ed-blue-tint);
    border-left: 4px solid var(--ed-navy);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}
.taoc-section .taoc-callout strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ed-navy);
    margin-bottom: 4px;
}

/* Activities -> Outcomes -> Impact arrow diagram: light to dark brand red */
.taoc-arrow-row {
    display: flex;
    margin: 20px 0 4px;
    border-radius: 8px;
    overflow: hidden;
}
.taoc-arrow-cell {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 18px 14px 22px;
    min-height: 72px;
    overflow: hidden;
}
.taoc-arrow-cell:first-child { padding-left: 18px; }
.taoc-arrow-shape {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}
.taoc-arrow-a .taoc-arrow-shape polygon { fill: var(--ed-blush); }
.taoc-arrow-b .taoc-arrow-shape polygon { fill: var(--ed-crimson); }
.taoc-arrow-c .taoc-arrow-shape polygon { fill: var(--ed-navy-d); }
.taoc-arrow-eyebrow,
.taoc-arrow-label {
    position: relative;
    z-index: 1;
    display: block;
}
.taoc-arrow-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.taoc-arrow-label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}
.taoc-arrow-a .taoc-arrow-eyebrow { color: var(--ed-crimson); }
.taoc-arrow-a .taoc-arrow-label   { color: var(--ed-navy-d); }
.taoc-arrow-b .taoc-arrow-eyebrow,
.taoc-arrow-c .taoc-arrow-eyebrow { color: rgba(255,255,255,0.75); }
.taoc-arrow-b .taoc-arrow-label,
.taoc-arrow-c .taoc-arrow-label   { color: var(--ed-white); }

/* Progress -- only shown once the script has taken over the accordion */
.taoc-steps-label {
    font-size: 13px;
    color: var(--ed-slate);
    margin-bottom: 14px;
}
.taoc-progress {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.taoc-progress-track {
    flex: 1;
    height: 4px;
    background: var(--ed-line);
    border-radius: 2px;
    overflow: hidden;
}
.taoc-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--ed-crimson), var(--ed-navy-d));
    border-radius: 2px;
    transition: width 0.4s ease;
}
.taoc-progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ed-slate);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}
.taoc-js .taoc-progress { display: flex; }

/* Steps */
.taoc-widget .taoc-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.taoc-step {
    border: 1px solid var(--ed-line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--ed-white);
    transition: border-color 0.2s;
}
.taoc-step.taoc-active { border-color: var(--ed-navy); }
.taoc-step.taoc-done   { border-color: var(--ed-crimson); }

.taoc-step-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 15px;
}
.taoc-step-btn:focus { outline: none; }
.taoc-step-btn:focus-visible {
    outline: 2px solid var(--ed-crimson);
    outline-offset: -2px;
}

.taoc-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--ed-line);
    color: var(--ed-slate);
    background: var(--ed-white);
    transition: all 0.2s;
}
.taoc-active .taoc-num {
    background: var(--ed-navy);
    border-color: var(--ed-navy);
    color: var(--ed-white);
}
.taoc-done .taoc-num {
    background: var(--ed-blush);
    border-color: var(--ed-crimson);
    color: var(--ed-crimson);
}

.taoc-step-titles { flex: 1; min-width: 0; }
.taoc-step-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ed-slate);
}
.taoc-step-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ed-ink);
}
.taoc-active .taoc-step-name { color: var(--ed-navy); }

.taoc-chevron {
    flex-shrink: 0;
    color: var(--ed-slate);
    transition: transform 0.25s ease;
}
.taoc-active .taoc-chevron { transform: rotate(180deg); color: var(--ed-navy); }

/* Accordion body -- collapsed only when the script runs, so the steps still read without JS */
.taoc-js .taoc-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}
.taoc-js .taoc-active .taoc-body {
    max-height: 1200px;
    opacity: 1;
}
.taoc-body-inner {
    margin: 0 18px;
    padding: 14px 0 18px;
    border-top: 1px solid var(--ed-line);
}
.taoc-desc {
    font-size: 14px;
    margin-bottom: 12px;
}
.taoc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.taoc-tag {
    padding: 3px 10px;
    background: var(--ed-paper);
    border: 1px solid var(--ed-line);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ed-body);
}
.taoc-tag-hi {
    background: var(--ed-blue-tint);
    border-color: var(--ed-blue-tint);
    color: var(--ed-navy);
}
.taoc-tip {
    background: var(--ed-blush);
    border-left: 3px solid var(--ed-crimson);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.55;
}
.taoc-tip strong {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ed-crimson);
    margin-bottom: 3px;
}

/* Questions */
.taoc-questions {
    border: 1px solid var(--ed-line);
    border-radius: 10px;
    padding: 22px 22px 18px;
    margin-bottom: 24px;
}
.taoc-questions-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ed-crimson);
    margin-bottom: 8px;
}
.taoc-questions-title {
    font-family: var(--ed-serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--ed-ink);
    margin-bottom: 16px;
}
.taoc-widget .taoc-q-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.taoc-q-list li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.55;
}
.taoc-q-n {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ed-blush);
    font-size: 11px;
    font-weight: 700;
    color: var(--ed-crimson);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Full framework document card */
.taoc-doc-link,
.taoc-doc-link:visited {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--ed-paper);
    border: 1px solid var(--ed-line);
    border-radius: 10px;
    margin-bottom: 24px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.taoc-doc-link:hover,
.taoc-doc-link:focus {
    border-color: var(--ed-navy);
    background: var(--ed-blue-tint);
    color: inherit;
    text-decoration: none;
}
.taoc-doc-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--ed-navy);
    color: var(--ed-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.taoc-doc-icon svg { display: block; }
.taoc-doc-text { flex: 1; min-width: 0; }
.taoc-doc-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ed-slate);
    margin-bottom: 2px;
}
.taoc-doc-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ed-navy);
}
.taoc-doc-arrow {
    flex-shrink: 0;
    color: var(--ed-navy);
    transition: transform 0.2s;
}
.taoc-doc-link:hover .taoc-doc-arrow { transform: translateX(3px); }

/* Contact */
.taoc-contact {
    background: var(--ed-paper);
    border: 1px solid var(--ed-line);
    border-radius: 10px;
    padding: 18px 22px;
    font-size: 14px;
    line-height: 1.6;
}
.taoc-contact strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ed-navy);
    margin-bottom: 4px;
}
.taoc-contact a {
    color: var(--ed-crimson);
    font-weight: 600;
}

/* The arrows stack as plain blocks on narrow screens */
@media (max-width: 520px) {
    .taoc-arrow-row { flex-direction: column; gap: 3px; overflow: visible; }
    .taoc-arrow-cell,
    .taoc-arrow-cell:first-child { border-radius: 6px; padding: 12px 14px; min-height: 56px; }
    .taoc-arrow-shape { display: none; }
    .taoc-arrow-a { background: var(--ed-blush); }
    .taoc-arrow-b { background: var(--ed-crimson); }
    .taoc-arrow-c { background: var(--ed-navy-d); }
}

@media (max-width: 480px) {
    .taoc-header { padding: 28px 20px 24px; }
    .taoc-step-btn { padding: 12px 14px; gap: 10px; }
    .taoc-body-inner { margin: 0 14px; padding-top: 12px; }
    .taoc-questions, .taoc-contact { padding: 16px 14px; }
    .taoc-doc-link { gap: 10px; padding: 14px; }
}

/* Print every step expanded */
@media print {
    .taoc-js .taoc-body { max-height: none !important; opacity: 1 !important; }
    .taoc-progress, .taoc-chevron { display: none !important; }
    .taoc-step, .taoc-questions, .taoc-contact { page-break-inside: avoid; break-inside: avoid; }
    .taoc-header,
    .taoc-arrow-row { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
