/* ==========================================================================
   JSON Comparison Table — Frontend
   Compact, clean table matching the reference images exactly.
   ========================================================================== */

.jct-table-wrapper {
    margin: 1.5em 0;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
}

/* ─── Title ─── */
.jct-table-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px 0;
    padding: 0;
    line-height: 1.3;
}

/* ─── Table ─── */
.jct-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    background: #fff;
    table-layout: auto;
}

/* ─── Header ─── */
.jct-table thead th {
    padding: 7px 12px;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    text-align: left;
    border-right: 1px solid rgba(255,255,255,0.18);
    border-bottom: 1px solid #999;
    white-space: nowrap;
}

.jct-table thead th:last-child {
    border-right: none;
}

/* ─── Body cells ─── */
.jct-table tbody td {
    padding: 6px 12px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
    vertical-align: middle;
}

.jct-table tbody td:last-child {
    border-right: none;
}

.jct-table tbody tr:last-child td {
    border-bottom: none;
}

/* ─── First column bold (label) ─── */
.jct-col-label {
    font-weight: 600;
    color: #111;
}

/* ─── Comparison style: first column background ─── */
.jct-style-comparison .jct-col-label {
    background-color: #f6f7f8;
}

/* ─── Auto highlight ─── */
.jct-hl-best {
    background-color: #e7f5ea !important;
    color: #1a7f37;
}

.jct-hl-worst {
    background-color: #fdf0ef !important;
    color: #c33;
}

/* ─── Source / footnote ─── */
.jct-source {
    font-size: 11px;
    color: #888;
    margin: 4px 0 0 0;
    padding: 0;
    line-height: 1.4;
}

/* ─── Error states ─── */
.jct-no-data,
.jct-error {
    padding: 12px 16px;
    background: #fef3f2;
    border: 1px solid #fca5a5;
    border-radius: 3px;
    color: #b91c1c;
    font-size: 13px;
}

/* ─── Responsive ─── */
@media screen and (max-width: 768px) {
    .jct-table-wrapper {
        overflow-x: auto;
    }
    .jct-table thead th,
    .jct-table tbody td {
        padding: 5px 8px;
        font-size: 12px;
    }
}
