.ays-matrix-field {
    width: 100%;
}

.ays-matrix-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ays-matrix-table,
.ays-matrix-results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 520px;
}

.ays-matrix-table th,
.ays-matrix-table td,
.ays-matrix-results-table th,
.ays-matrix-results-table td {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: middle;
    background: #fff;
}

.ays-matrix-table thead th,
.ays-matrix-results-table thead th {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.03);
}

.ays-matrix-row-label,
.ays-matrix-result-statement {
    width: 34%;
    min-width: 180px;
    text-align: left;
}

.ays-matrix-answer-value {
    display: none;
}

.ays-matrix-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    text-align: center;
}

.ays-matrix-choice:hover,
.ays-matrix-choice:focus {
    border-color: rgba(0, 0, 0, 0.28);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.ays-matrix-choice.selected,
.ays-matrix-cell.selected .ays-matrix-choice {
    border-color: rgba(34, 113, 177, 0.55);
    box-shadow: inset 0 0 0 1px rgba(34, 113, 177, 0.35);
    background: rgba(34, 113, 177, 0.08);
    font-weight: 600;
}

.ays-matrix-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.ays-matrix-results-column {
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
}

.ays-matrix-results-column h5 {
    margin: 0 0 12px;
    font-size: 15px;
}

.ays-matrix-result-row.correct .ays-matrix-result-answer {
    font-weight: 600;
}

.ays-matrix-result-row.wrong .ays-matrix-result-answer {
    opacity: 0.88;
}

@media screen and (max-width: 768px) {
    .ays-matrix-table,
    .ays-matrix-results-table {
        min-width: 460px;
    }

    .ays-matrix-choice {
        min-height: 52px;
        padding: 12px;
    }

    .ays-matrix-results {
        grid-template-columns: 1fr;
    }
}
