/* Digiasema osaamispolku – tulossivu (leiska v3) */

.digiasema-llm-result #digiasema-llm-loading,
.digiasema-llm-result #digiasema-llm-loading-animation {
    text-align: center;
}
.learning-path-wrapper {
    /* Colours sampled from osaamispolku_tulossivu_v3.pdf */
    --lp-purple: #722984;
    --lp-pink: #e60067;
    --lp-blue: #1281aa;
    --lp-light: #dbeaf2;
    --lp-circle: #a6cadc;
    --lp-shadow: #b390c1;
    --lp-badge-bg: #fdd3e1;
    --lp-text: #1f2937;
    --lp-text-muted: #6b7280;
    color: var(--lp-text);
    font-size: 0.9rem;
    line-height: 1.5;
}
.learning-path-wrapper h2,
.learning-path-wrapper h3 {
    margin: 0;
    line-height: 1.3;
}
.learning-path-wrapper h3.priorities-label,
.learning-path-wrapper h3.process-label {
    font-size: 1rem !important;
}
.learning-path-wrapper h3.profile-name {
    font-size: 1.1rem !important;
}
.learning-path-wrapper h3.update-label {
    font-size: 0.9rem !important;
}
.learning-path-wrapper h2.learning-path-title {
    font-size: 1.1rem !important;
}
.learning-path-wrapper ul {
    margin: 0;
    padding-left: 1.2rem;
}
.learning-path-wrapper ul li {
    margin-bottom: 0.2rem;
}

/* Full-bleed bands
 * Content stays inside the theme container; only the background is drawn
 * to the viewport edges with a pseudo-element. Works with any container width.
 */
body.has-learning-path {
    overflow-x: hidden;
}
.lp-band {
    position: relative;
    isolation: isolate;
}
.lp-band::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    background-color: var(--lp-band-bg, transparent);
    z-index: -1;
}
.lp-band-light {
    --lp-band-bg: var(--lp-light);
}
.lp-band-blue {
    --lp-band-bg: var(--lp-blue);
}
/* Bars that reach the left viewport edge and end after their label.
 * The block spans the container; the pseudo-element fills the gap between
 * the viewport edge and the container, and the inner span draws the rest.
 */
.lp-bleed-left {
    display: block;
    position: relative;
    isolation: isolate;
}
.lp-bleed-left::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 50vw);
    right: 100%;
    background-color: var(--lp-bleed-bg, var(--lp-pink));
    z-index: -1;
}
.lp-bleed-left > span {
    display: inline-block;
    /* All bars end at the same right edge: a fixed share of the container,
       growing only if a label would not fit. Narrower on wide screens. */
    width: var(--lp-bar-width, 40%);
    min-width: max-content;
    box-sizing: border-box;
    background-color: var(--lp-bleed-bg, var(--lp-pink));
    border-radius: 0 8px 8px 0;
}

/* Section header bars: pink for the profile, blue for recommendations */
.section-bar {
    --lp-bleed-bg: var(--lp-pink);
    color: #FFFFFF;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}
.section-bar-pink {
    --lp-bleed-bg: var(--lp-pink);
}
.section-bar-blue {
    --lp-bleed-bg: var(--lp-blue);
}
.section-bar > span {
    padding: 0.6rem 1.25rem 0.6rem 0;
}

/* Hero / header */
.learning-path-hero {
    padding: 0;
    margin-bottom: 2rem;
}
.learning-path-title {
    color: #FFFFFF;
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem !important;
}
.learning-path-title > span {
    display: inline-block;
}
.learning-path-beta {
    display: inline-block;
    font-size: 0.7em;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 0.6rem;
    padding: 0.25em 0.6em;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    opacity: 1;
}
.learning-path-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.company-name {
    font-weight: bold;
    font-size: 1rem;
}
.evaluation-date {
    font-size: 0.85rem;
}
.learning-path-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.learning-path-actions a,
.learning-path-actions div,
.print-pdf {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem !important;
    font-weight: bold;
    border-radius: 999px;
    text-decoration: none !important;
    white-space: nowrap;
}
.update-self-evaluation {
    border: 1px solid var(--lp-purple);
    color: var(--lp-purple) !important;
    background-color: #FFFFFF;
}
.download-pdf,
.print-pdf {
    border: 1px solid var(--lp-purple);
    color: var(--lp-purple) !important;
    background-color: #FFFFFF;
    cursor: pointer;
}
.reserve-spar {
    border: 1px solid var(--lp-purple);
    background-color: var(--lp-purple);
    color: #FFFFFF !important;
}
.learning-path-notice {
    margin: 0;
    padding: 0.25rem 0.75rem;
    border-left: 3px solid var(--lp-pink);
    font-size: 0.9rem;
}
.learning-path-notice.learning-path-by {
    display: none;
}
.download-pdf-info {
    display: none;
}
.download-pdf-info.is-visible {
    display: flex;
    border: 1px solid var(--lp-purple);
}
.download-pdf-info div.column {
    padding: 0.5rem;
}
.download-pdf-info div.column-1 {
    flex: 1;
    display: flex;
    align-items: center;
}
.download-pdf-info div.column-1 div {
    width: 80%;
    text-align: center;
    margin: 0 auto;
    cursor: pointer;
}
.download-pdf-info div.column-2 {
    flex: 2;
}

/* Profile */
.profile-section {
    margin-bottom: 2rem;
}
.profile {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    padding: 0 1rem;
}
.profile-left {
    flex: 0 0 320px;
    text-align: center;
}
.profile-image {
    max-width: 320px;
    width: 100%;
    height: auto;
}
.profile-right {
    flex: 1 1 300px;
}
.profile-name {
    color: var(--lp-purple);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem !important;
}
.profile-description {
    margin: 0 0 1rem;
}
.profile-lists {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.profile-strength,
.profile-development {
    flex: 1 1 200px;
}
.profile-strength-label {
    color: var(--lp-blue);
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.profile-development-label {
    color: var(--lp-pink);
    font-weight: bold;
    margin-bottom: 0.25rem;
}

/* Priorities */
.priorities {
    padding: 2rem 1rem 2.5rem;
    margin-bottom: 2.5rem;
}
.priorities-label {
    text-align: center;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1.25rem !important;
}
.priorities-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.priority {
    flex: 1 1 220px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.priority-number {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    text-align: center;
    color: var(--lp-blue);
    font-weight: bold;
    background-color: #FFFFFF;
}
.priority-label {
    font-weight: bold;
    margin-bottom: 0.35rem;
}
.priority-description {
    font-size: 0.85rem;
}

/* Recommendations */
.recommendations {
    margin-bottom: 2rem;
}
.recommendations-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1rem;
}
.recommendations-empty {
    margin: 0;
    font-style: italic;
}
.service-recommendation-lead {
    flex: 1 1 100%;
}
.recommendation-item-wrapper {
    flex: 1 1 260px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--lp-purple);
    box-shadow: 6px 6px 0 var(--lp-shadow);
    padding: 1.25rem;
    background-color: #FFFFFF;
    margin-right: 6px;
    margin-bottom: 6px;
}
.recommendation-type-badge {
    align-self: flex-start;
    color: var(--lp-pink);
    background-color: var(--lp-badge-bg);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.75rem;
}
.recommendation-label {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.recommendation-text {
    font-size: 0.85rem;
    color: var(--lp-text-muted);
    margin-bottom: 1rem;
}
.recommendation-excerpt {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.recommendation-excerpt p {
    margin: 0 0 0.5rem;
}
.recommendation-excerpt p:last-child {
    margin-bottom: 0;
}
.recommendation-reason {
    background-color: var(--lp-light);
    padding: 0.75rem 1.25rem;
    margin: 0 -1.25rem 1rem;
    font-size: 0.85rem;
}
.reason-label {
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.link-to-recommendation {
    margin-top: auto;
    align-self: flex-start;
    text-decoration: none !important;
    color: var(--lp-purple) !important;
    border: 1px solid var(--lp-purple);
    background-color: #FFFFFF;
    font-size: 0.8rem !important;
    font-weight: bold;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border-width: 2px;
}
.link-to-recommendation:hover {
    background-color: var(--lp-purple);
    color: #FFFFFF !important;
}

/* Disclaimer */
.learning-path-disclaimer {
    margin: 0 1rem 2.5rem;
    padding: 0.25rem 0.75rem;
    border-left: 3px solid var(--lp-pink);
    font-size: 0.9rem;
}

/* Footer */
.learning-path-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 0;
    margin-bottom: 2rem;
}
.learning-path-process {
    flex: 2 1 320px;
}
.process-label {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem !important;
}
.learning-path-process-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.learning-path-process-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.process-step-number {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    text-align: center;
    color: var(--lp-blue);
    font-weight: bold;
    background-color: var(--lp-circle);
}
.process-step-label {
    font-weight: bold;
}
.process-step-text {
    font-size: 0.85rem;
}
.learning-path-update {
    flex: 1 1 260px;
    background-color: #FFFFFF;
    border: 2px solid var(--lp-purple);
    box-shadow: 6px 6px 0 var(--lp-shadow);
    padding: 1.5rem;
    margin-right: 6px;
    margin-bottom: 6px;
}
.update-label {
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.75rem !important;
}
.update-text {
    color: var(--lp-text-muted);
}
.update-text p {
    margin: 0 0 0.5rem;
}
.update-text ul li {
    font-size: 0.85rem;
}
.update-link {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none !important;
    color: #FFFFFF !important;
    background-color: var(--lp-purple);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.8rem !important;
    font-weight: bold;
}

/* Test phase debug output */
.learning-path-debug {
    margin: 3rem 0 2rem;
    padding: 1rem;
    border: 2px dashed #999999;
    border-radius: 8px;
    font-size: 0.8rem;
    background-color: #fafafa;
}
.learning-path-debug .debug-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.learning-path-debug .debug-block {
    margin-bottom: 0.75rem;
}
.learning-path-debug summary {
    cursor: pointer;
    font-weight: bold;
    padding: 0.25rem 0;
}
.learning-path-debug pre {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 600px;
    overflow: auto;
    background-color: #FFFFFF;
    border: 1px solid #DDDDDD;
    padding: 0.75rem;
    font-size: 0.75rem;
}
.learning-path-debug .debug-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
}
.learning-path-debug .debug-table th,
.learning-path-debug .debug-table td {
    border: 1px solid #DDDDDD;
    padding: 0.3rem 0.5rem;
    text-align: left;
    vertical-align: top;
}
.learning-path-debug .debug-table th {
    width: 30%;
    font-weight: bold;
    background-color: #f2f2f2;
}

/* Desktop: narrower section bars */
@media (min-width: 992px) {
    .learning-path-wrapper {
        --lp-bar-width: 40%;
    }
}
@media (min-width: 1200px) {
    .learning-path-wrapper {
        --lp-bar-width: 30%;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .learning-path-footer {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .learning-path-title {
        padding: 1rem 0;
    }
    .profile,
    .recommendations-wrapper,
    .learning-path-disclaimer {
        padding-left: 0;
        padding-right: 0;
    }
    .learning-path-disclaimer {
        margin-left: 0;
        margin-right: 0;
    }
    .profile-left {
        flex-basis: 100%;
    }
    .learning-path-actions a {
        white-space: normal;
    }
    .lp-bleed-left > span {
        width: 100%;
        border-radius: 0;
    }
}
