/* Text Similarity Checker - tool-specific styles. */

:root {
    --ts-accent: #0d9488;
    --ts-accent-dark: #0f766e;
    --ts-shared-bg: #ccfbf1;
    --ts-shared-fg: #115e59;
}

.page-hero h1 .ts-hero-mark {
    width: 1em;
    height: 1em;
    vertical-align: -0.12em;
    margin-right: 0.4rem;
    color: var(--ts-accent);
}

/* ---- Inputs ---- */
.ts-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ts-col { display: flex; flex-direction: column; min-width: 0; }
.ts-field-label { font-weight: 600; font-size: 0.92rem; color: #333; margin-bottom: 6px; }
.ts-textarea {
    width: 100%;
    box-sizing: border-box;
    /* flex: 0 0 auto neutralises the shared .text-input flex-basis, which
     * would otherwise force a 320px height inside this column-flex column. */
    flex: 0 0 auto;
    min-height: 170px;
    resize: vertical;
    line-height: 1.55;
}
.ts-box-count { margin-top: 5px; font-size: 0.78rem; color: #94a3b8; text-align: right; }
.ts-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.ts-submit-hint { font-size: 0.82rem; color: #94a3b8; }

/* ---- Results ---- */
.ts-results-body { padding: 18px 22px 20px; }
.ts-score-row { display: flex; align-items: center; gap: 16px; }
.ts-score {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ts-accent-dark);
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}
.ts-meter {
    flex: 1 1 auto;
    height: 12px;
    border-radius: 999px;
    background: #eef1f4;
    overflow: hidden;
}
.ts-meter-fill { height: 100%; width: 0; border-radius: 999px; background: var(--ts-accent); transition: width 0.25s ease-out; }
.ts-meter-fill--identical { background: #dc2626; }
.ts-meter-fill--high { background: #ea580c; }
.ts-meter-fill--medium { background: #d97706; }
.ts-meter-fill--low { background: var(--ts-accent); }

.ts-verdict { font-size: 0.85rem; font-weight: 700; color: #64748b; }
.ts-verdict--identical { color: #dc2626; }
.ts-verdict--high { color: #ea580c; }
.ts-verdict--medium { color: #d97706; }
.ts-verdict--low { color: var(--ts-accent-dark); }

.ts-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0 6px;
}
.ts-stat {
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.ts-stat-num { font-size: 1.4rem; font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums; }
.ts-stat-label { font-size: 0.72rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }

.ts-legend { font-size: 0.85rem; color: #64748b; margin: 6px 0 14px; }
.ts-legend-mark, .ts-out mark.ke-shared {
    background: var(--ts-shared-bg);
    color: var(--ts-shared-fg);
    border-radius: 3px;
    padding: 0 4px;
    font-weight: 600;
}

.ts-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ts-pane { min-width: 0; }
.ts-pane-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; margin: 0 0 8px; }
.ts-out {
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    background: #fff;
    padding: 12px 14px;
    line-height: 1.65;
    color: #1f2937;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 380px;
    overflow-y: auto;
}
.ts-out mark.ke-shared { white-space: pre-wrap; }

.ts-note {
    margin: 16px 0 0;
    font-size: 0.84rem;
    color: #64748b;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
}

@media (max-width: 640px) {
    .ts-cols { grid-template-columns: 1fr; }
    .ts-stats { grid-template-columns: repeat(2, 1fr); }
    .ts-panes { grid-template-columns: 1fr; }
    .ts-score { font-size: 2.1rem; }
}
