/* Tongue Assessment module; the report styles are shared with the questionnaire and history modules */
.tongue-module,
.assessment-module {
    --tongue-brand: #006666;
    --tongue-high: #c0392b;
    --tongue-mid: #d68910;
    --tongue-low: #138d75;
}

.tongue-preview {
    max-height: 220px;
    object-fit: cover;
}

/* Automated AI Report label */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tongue-brand);
    background-color: rgba(0, 102, 102, 0.08);
    border: 1px solid rgba(0, 102, 102, 0.25);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
}

/* Run progress */
.tongue-steps li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
    color: #6c757d;
}

.tongue-steps li.active,
.tongue-steps li.done {
    color: #212529;
}

.tongue-steps li.failed {
    color: var(--tongue-high);
}

.tongue-step-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tongue-steps li.pending .tongue-step-icon::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    border: 2px solid #ced4da;
    border-radius: 50%;
}

/* Pattern dashboard */
.pattern-chip {
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    text-align: left;
    line-height: 1.25;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pattern-chip:hover {
    border-color: var(--tongue-brand);
}

.pattern-chip.active {
    border-color: var(--tongue-brand);
    box-shadow: 0 0 0 2px rgba(0, 102, 102, 0.2);
}

.pattern-chip .chip-meta {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.tongue-chart-wrap {
    position: relative;
    height: 260px;
}

/* Severity colours */
.sev-high { --sev: var(--tongue-high); }
.sev-mid { --sev: var(--tongue-mid); }
.sev-low { --sev: var(--tongue-low); }
.sev-none { --sev: #6c757d; }

.pattern-badge {
    background-color: transparent;
    color: var(--sev);
    border: 1px solid var(--sev);
    font-weight: 500;
}

.pattern-row .progress-bar {
    background-color: var(--sev);
}

/* Report feed */
.tongue-report-header {
    cursor: pointer;
}

.tongue-report-header .min-w-0 {
    min-width: 0;
}

.tongue-report.expanded {
    box-shadow: 0 0 0 2px rgba(0, 102, 102, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tongue-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background-color: #f0f2f5;
}

.tongue-report-detail {
    border-top: 1px solid #eef0f2;
    margin-top: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .tongue-report-header {
        flex-wrap: wrap;
    }

    .tongue-report-header .btn-group {
        width: 100%;
    }
}

.tongue-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

/* How these patterns may affect you */
.tongue-effect {
    height: 100%;
    border: 1px solid #eef0f2;
    border-left: 3px solid var(--sev);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.tongue-effect ul {
    padding-left: 1.1rem;
}

.tongue-effect li {
    margin-bottom: 0.2rem;
}

.tongue-advice ul {
    padding-left: 1.1rem;
    margin-bottom: 0.75rem;
}

.tongue-advice li {
    margin-bottom: 0.25rem;
}

/* Rendered AI reading (matches the public tongue demo) */
.tongue-module .markdown-body,
.assessment-module .markdown-body {
    line-height: 1.6;
    color: #24292e;
}

.tongue-module .markdown-body h1,
.tongue-module .markdown-body h2,
.assessment-module .markdown-body h1,
.assessment-module .markdown-body h2 {
    font-size: 1.15rem;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
    margin-top: 1.25rem;
}

.tongue-module .markdown-body h3,
.assessment-module .markdown-body h3 {
    font-size: 1.05rem;
}

.tongue-module .markdown-body ul,
.assessment-module .markdown-body ul {
    padding-left: 1.5em;
    margin-bottom: 1rem;
}

.tongue-module .markdown-body strong,
.assessment-module .markdown-body strong {
    font-weight: 600;
}
