/* DeChatura Text Compare Tool */
.text-compare-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    color: #263247
}

.text-compare-header {
    margin: 0 0 12px
}

    .text-compare-header h1 {
        margin: 0 0 6px;
        font-size: clamp(1.6rem,3vw,2.2rem);
        font-weight: 750;
        color: #253b70
    }

    .text-compare-header p {
        max-width: 850px;
        margin: 0;
        color: #5b6475;
        line-height: 1.5
    }

.tc-editor-section {
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #d9e0ec;
    border-radius: 8px;
    overflow: visible
}

.tc-diff-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #d9e0ec;
    box-shadow: 0 2px 5px rgba(25,45,80,.08)
}

.tc-diff-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0
}

.tc-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 110px;
    padding: 9px 12px;
    border: 1px solid #cbd5e5;
    border-radius: 6px;
    background: #fff;
    color: #253b70;
    font-size: .9rem;
    font-weight: 650;
    cursor: pointer
}

    .tc-nav-button:hover {
        background: #eef3ff;
        border-color: #8299d8
    }

    .tc-nav-button:focus-visible {
        outline: 3px solid #9bb5ff;
        outline-offset: 2px
    }

    .tc-nav-button:disabled {
        opacity: .5;
        cursor: not-allowed
    }

#tcDiffPosition {
    min-width: 130px;
    color: #344054;
    font-size: .88rem;
    font-weight: 650;
    text-align: center
}

.tc-whitespace-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #475467;
    font-size: .88rem;
    white-space: nowrap
}

    .tc-whitespace-option input {
        margin: 0
    }

.tc-editor-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 8px;
    padding: 8px
}

.tc-editor-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9e0ec;
    border-radius: 6px;
    background: #fff
}

.tc-editor-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    background: #f3f6fb;
    border-bottom: 1px solid #d9e0ec
}

    .tc-editor-heading label {
        margin: 0;
        color: #263e68;
        font-size: .95rem;
        font-weight: 700
    }

.tc-clear-button {
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    padding: 4px 8px;
    background: #fff;
    color: #475467;
    font-size: .82rem;
    cursor: pointer
}

    .tc-clear-button:hover {
        background: #fef2f2;
        border-color: #e5a3a3
    }

.tc-editor {
    box-sizing: border-box;
    height: min(65vh,680px);
    min-height: 280px;
    overflow: auto;
    padding: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    tab-size: 4;
    font-family: Consolas,"Cascadia Code","Courier New",monospace;
    font-size: 14px;
    line-height: 1.55;
    background: #fff;
    outline: none;
    scroll-behavior: auto;
    unicode-bidi: plaintext
}

    .tc-editor:empty::before {
        content: attr(data-placeholder);
        color: #98a2b3;
        pointer-events: none
    }

    .tc-editor:focus {
        box-shadow: inset 0 0 0 2px #a6bdf8
    }

.tc-diff-anchor {
    display: inline-block;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    vertical-align: top;
    border: 0;
    line-height: 0
}

.tc-change {
    border-radius: 2px;
    padding: 0;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone
}

    .tc-change.tc-added {
        background: #d8f5df;
        color: #164e2a;
        text-decoration: none
    }

    .tc-change.tc-removed {
        background: #ffe1e1;
        color: #7f1d1d;
        text-decoration: line-through;
        text-decoration-thickness: 1px
    }

    .tc-change.tc-whitespace {
        background: #e5eaff;
        color: #344da0;
        outline: 1px dashed #aab8f1;
        text-decoration: none
    }

    .tc-change.tc-current-diff {
        outline: 2px solid #4169cf;
        border-radius: 2px;
        box-shadow: 0 0 0 2px rgba(65,105,207,.12);
        position: relative;
        z-index: 1
    }

.tc-space-mark {
    display: inline;
    color: #596da9;
    background: #e5eaff;
    border-radius: 2px;
    font-weight: 700;
    white-space: pre
}

.tc-newline-mark {
    padding: 0 1px
}

.tc-summary {
    margin: 0 8px 8px;
    padding: 8px 10px;
    border-radius: 5px;
    background: #f1f5fb;
    color: #263e68;
    font-size: .9rem;
    font-weight: 600
}

.tc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 8px 8px
}

.tc-action-button {
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    padding: 6px 10px;
    background: #fff;
    color: #344054;
    font-size: .86rem;
    cursor: pointer
}

    .tc-action-button:hover {
        background: #eef3ff;
        border-color: #8299d8
    }

.tc-help-section {
    margin-top: 14px;
    padding: 0;
    line-height: 1.6
}

    .tc-help-section h2 {
        margin: 12px 0 6px;
        font-size: 1.1rem;
        font-weight: 700
    }

    .tc-help-section ol, .tc-help-section p {
        margin-bottom: 8px
    }

@media(max-width:767px) {
    .tc-diff-toolbar {
        gap: 6px;
        padding: 6px
    }

    .tc-diff-navigation {
        width: 100%;
        justify-content: space-between;
        gap: 5px
    }

    .tc-nav-button {
        min-width: 0;
        flex: 1;
        padding: 8px 5px;
        font-size: .84rem
    }

    #tcDiffPosition {
        min-width: 100px;
        font-size: .8rem
    }

    .tc-whitespace-option {
        width: 100%;
        justify-content: center;
        padding: 2px 0
    }

    .tc-editor-grid {
        grid-template-columns: minmax(0,1fr);
        gap: 8px;
        padding: 6px
    }

    .tc-editor {
        height: 42vh;
        min-height: 220px;
        max-height: 420px;
        padding: 8px;
        font-size: 13px
    }

    .tc-summary {
        margin: 0 6px 6px
    }

    .tc-actions {
        padding: 0 6px 6px
    }
}
