/* ========================================
   ярпюмхжю япюбмемхъ днйслемрнб
======================================== */

.compare-page {
    min-height: calc(100vh - 160px);
    padding: 42px 28px 60px;
    background: #f5f7fa;
}


/* ========================================
   нямнбмни йнмреимеп
======================================== */

.compare-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}


/* ========================================
   гюцнкнбнй ярпюмхжш
======================================== */

.compare-header {
    text-align: center;
    margin-bottom: 32px;
}

    .compare-header h1 {
        margin: 0 0 10px;
        font-size: 32px;
        line-height: 1.2;
        font-weight: 700;
        color: #245a9f;
    }

    .compare-header p {
        max-width: 800px;
        margin: 0 auto;
        font-size: 15px;
        line-height: 1.55;
        color: #626d79;
    }


/* ========================================
   дбю днйслемрю
======================================== */

.compare-files {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}


/* ========================================
   йюпрнвйю днйслемрю
======================================== */

.compare-file-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}


/* ========================================
   гюцнкнбнй йюпрнвйх
======================================== */

.compare-file-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

    .compare-file-title > i {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border-radius: 9px;
        background: #eef4fb;
        color: #2d61a4;
        font-size: 21px;
    }

    .compare-file-title h2 {
        margin: 0 0 3px;
        font-size: 19px;
        line-height: 1.25;
        color: #242424;
    }

    .compare-file-title p {
        margin: 0;
        font-size: 13px;
        line-height: 1.4;
        color: #737d88;
    }


/* ========================================
   гнмю бшанпю тюикю
======================================== */

.compare-upload-zone {
    min-height: 165px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px;
    border: 2px dashed #b7c6d9;
    border-radius: 10px;
    background: #fafcff;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

    .compare-upload-zone:hover {
        border-color: #2d61a4;
        background: #f3f7fc;
    }

    .compare-upload-zone.drag-over {
        border-color: #2d61a4;
        background: #eaf2fb;
        transform: scale(1.01);
    }

    .compare-upload-zone > i {
        margin-bottom: 12px;
        font-size: 31px;
        color: #2d61a4;
    }

    .compare-upload-zone strong {
        display: block;
        margin-bottom: 5px;
        font-size: 15px;
        color: #2b2b2b;
    }

    .compare-upload-zone span {
        font-size: 13px;
        color: #7c8792;
    }


/* ========================================
   бшапюммши тюик
======================================== */

.compare-selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 15px;
    padding: 12px 14px;
    background: #f5f8fc;
    border: 1px solid #dce5ef;
    border-radius: 8px;
}

    .compare-selected-file > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .compare-selected-file strong {
        overflow: hidden;
        font-size: 14px;
        font-weight: 600;
        color: #303030;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .compare-selected-file span {
        font-size: 12px;
        color: #747f8a;
    }

    .compare-selected-file button {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: none;
        border-radius: 6px;
        background: transparent;
        color: #6d7680;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

        .compare-selected-file button:hover {
            background: #fbecec;
            color: #c44242;
        }


/* ========================================
   ймнойю япюбмемхъ
======================================== */

.compare-actions {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

#compareDocumentsButton {
    min-width: 240px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 25px;
    border: none;
    border-radius: 8px;
    background: #2d61a4;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 97, 164, 0.22);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    #compareDocumentsButton:hover:not(:disabled) {
        background: #244f88;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(45, 97, 164, 0.26);
    }

    #compareDocumentsButton:disabled {
        background: #aeb8c5;
        color: #eef0f2;
        cursor: not-allowed;
        box-shadow: none;
    }


/* ========================================
   пегскэрюрш япюбмемхъ
======================================== */

.comparison-results {
    margin-top: 38px;
    padding-bottom: 30px;
}

.comparison-results-header {
    margin-bottom: 20px;
}

    .comparison-results-header h2 {
        margin: 0 0 5px;
        font-size: 27px;
        line-height: 1.25;
        font-weight: 700;
        color: #1f4f8f;
    }

    .comparison-results-header p {
        margin: 0;
        font-size: 15px;
        line-height: 1.5;
        color: #4f5965;
    }


/* ========================================
   ябндйю
======================================== */

.comparison-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.comparison-summary-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.045);
}

    .comparison-summary-card > i {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border-radius: 8px;
        background: #eef4fb;
        color: #2d61a4;
        font-size: 16px;
    }

    .comparison-summary-card > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .comparison-summary-card strong {
        font-size: 21px;
        line-height: 1.1;
        font-weight: 700;
        color: #20252b;
    }

    .comparison-summary-card span {
        margin-top: 3px;
        font-size: 13px;
        line-height: 1.2;
        font-weight: 500;
        color: #46515d;
    }


/* ========================================
   гюцнкнбнй яохяйю
======================================== */

.comparison-changes-title {
    margin: 0 0 16px;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    color: #242a31;
}


/* ========================================
   яохянй хглемемхи
======================================== */

.comparison-changes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}


/* ========================================
   йюпрнвйю хглемемхъ
======================================== */

.comparison-change-card {
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 10px;
    box-shadow: 0 3px 11px rgba(0, 0, 0, 0.05);
}


/* ========================================
   ьюойю хглемемхъ
======================================== */

.comparison-change-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

    .comparison-change-header > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .comparison-change-header strong {
        font-size: 18px;
        line-height: 1.35;
        font-weight: 700;
        color: #1d2329;
    }

    .comparison-change-header > div > span {
        margin-top: 2px;
        font-size: 15px;
        line-height: 1.35;
        font-weight: 500;
        color: #43505e;
    }


/* ========================================
   аеидф
======================================== */

.comparison-change-badge {
    flex-shrink: 0;
    padding: 6px 11px;
    border-radius: 20px;
    background: #eaf2fb;
    color: #245a9f !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    font-weight: 700;
}


/* ========================================
   ашкн / ярюкн
======================================== */

.comparison-before-after {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.comparison-version {
    min-width: 0;
    padding: 15px 17px;
    background: #f7f9fc;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
}

    .comparison-version.single {
        max-width: 100%;
    }

.comparison-version-label {
    display: block;
    margin-bottom: 9px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    color: #384553;
}


/* ========================================
   рейяр днйслемрю
======================================== */

.comparison-text {
    margin: 0;
    padding: 0;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    color: #171c21;
    text-align: left;
    text-indent: 0;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}


/* ========================================
   мер хглемемхи
======================================== */

.comparison-no-changes {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 19px;
    background: #ffffff;
    border: 1px solid #dfe6df;
    border-radius: 10px;
}

    .comparison-no-changes > i {
        font-size: 25px;
        color: #458552;
    }

    .comparison-no-changes > div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .comparison-no-changes strong {
        font-size: 16px;
        color: #252b31;
    }

    .comparison-no-changes span {
        font-size: 14px;
        color: #5d6771;
    }


/* ========================================
   яйпшрхе
======================================== */

.hidden {
    display: none !important;
}


/* ========================================
   юдюорхб ≈ мнсрасй
======================================== */

@media (max-width: 1200px) {

    .compare-container {
        max-width: 1040px;
    }

    .comparison-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ========================================
   юдюорхб ≈ окюмьер
======================================== */

@media (max-width: 850px) {

    .compare-page {
        padding: 32px 18px 48px;
    }

    .compare-files {
        grid-template-columns: 1fr;
    }

    .compare-header h1 {
        font-size: 28px;
    }

    .comparison-before-after {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   юдюорхб ≈ рекетнм
======================================== */

@media (max-width: 600px) {

    .compare-page {
        padding: 26px 14px 42px;
    }

    .compare-file-card {
        padding: 20px;
    }

    .comparison-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .comparison-change-card {
        padding: 18px;
    }

    .comparison-change-header {
        flex-direction: column;
    }

    .comparison-text {
        font-size: 16px;
    }
}

/* ========================================
   хглемемхъ б рюакхжюу
======================================== */

.table-change-section {
    margin-top: 16px;
}

    .table-change-section:first-child {
        margin-top: 0;
    }

.table-change-section-title {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #28323d;
}

.table-cell-change {
    margin-top: 14px;
}

    .table-cell-change:first-of-type {
        margin-top: 0;
    }

.table-cell-location {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #56616d;
}

.table-structure-change {
    margin-top: 10px;
    padding: 13px 15px;
    background: #f7f9fc;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
}

    .table-structure-change:first-of-type {
        margin-top: 0;
    }

    .table-structure-change strong {
        display: block;
        margin-bottom: 6px;
        font-size: 15px;
        color: #25313d;
    }

/* ========================================
   ябндйю он назейрюл
======================================== */

.comparison-object-summary {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
    margin-bottom: 22px;
}

.comparison-object-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid #d7dde5;
    border-radius: 9px;
    background: #f8fafc;
    font-size: 15px;
}

    .comparison-object-summary-item strong {
        font-weight: 700;
    }

    .comparison-object-summary-item span {
        color: #27364a;
        font-weight: 600;
    }


/* ========================================
   пхясмйх
======================================== */

.figure-caption-text {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 15px;
}

.figure-change-detail {
    margin-bottom: 6px;
}

    .figure-change-detail:last-child {
        margin-bottom: 0;
    }


/* ========================================
   бшцпсгйю опнрнйнкю япюбмемхъ
======================================== */

.compare-export-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    margin-bottom: 28px;
}

.comparison-export-button {
    min-width: 285px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 18px;
    border: none;
    border-radius: 8px;
    background: #217346;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(33, 115, 70, 0.20);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .comparison-export-button:hover:not(:disabled) {
        background: #185c37;
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(33, 115, 70, 0.26);
    }

    .comparison-export-button:active {
        transform: translateY(0);
    }

    .comparison-export-button:disabled {
        opacity: 0.65;
        cursor: default;
        transform: none;
    }

.comparison-export-note {
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

/* ========================================
   ондяйюгйю оняке яйювхбюмхъ опнрнйнкю
======================================== */

.compare-export-actions {
    flex-direction: column;
    align-items: center;
}

.comparison-download-folder-note {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 14px 18px;
    box-sizing: border-box;
    border: 1px solid #d7e2ef;
    border-radius: 8px;
    background: #f7faff;
    color: #536b89;
    font-size: 0.95rem;
    line-height: 1.5;
}

    .comparison-download-folder-note i {
        flex: 0 0 auto;
        color: #2B579A;
        font-size: 1.05rem;
    }

    .comparison-download-folder-note strong {
        color: #344861;
    }

@media (max-width: 600px) {

    .comparison-download-folder-note {
        align-items: flex-start;
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}

/* ========================================
   хмтнплюжхнммши акнй / SEO
======================================== */

.compare-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 46px;
}

.compare-info-item {
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.045);
}

    .compare-info-item h2 {
        margin: 0 0 10px;
        font-size: 18px;
        line-height: 1.35;
        font-weight: 700;
        color: #245a9f;
    }

    .compare-info-item p {
        margin: 0;
        font-size: 14px;
        line-height: 1.65;
        color: #596572;
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
    }


/* ========================================
   SEO-акнй ≈ окюмьер
======================================== */

@media (max-width: 850px) {

    .compare-info {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 38px;
    }
}


/* ========================================
   SEO-акнй ≈ рекетнм
======================================== */

@media (max-width: 600px) {

    .compare-info {
        margin-top: 32px;
    }

    .compare-info-item {
        padding: 18px 20px;
    }

        .compare-info-item h2 {
            font-size: 17px;
        }

        .compare-info-item p {
            font-size: 13.5px;
            text-align: left;
        }
}