/* =========================
   Matrix calculator
========================= */

.matrix-inputs-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin: 20px 0;
}

.matrix-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.matrix-block__label {
    font-weight: 900;
    color: #0f4a44;
    font-size: 14px;
}

.matrix-grid {
    display: inline-grid;
    gap: 6px;
    padding: 12px;
    border: 2px solid rgba(15, 118, 110, .25);
    border-radius: 12px;
    background: rgba(15, 118, 110, .03);
}

.matrix-grid input {
    width: 52px;
    height: 40px;
    text-align: center;
    border: 1px solid #d4d7de;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    outline: none;
}

.matrix-grid input:focus {
    border-color: rgba(15, 118, 110, .55);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}

.matrix-grid--result {
    background: rgba(15, 118, 110, .06);
}

.matrix-grid--result .matrix-cell {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(15, 118, 110, .2);
    border-radius: 8px;
    font-weight: 900;
    color: #0f4a44;
    font-size: 14px;
}

.matrix-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.matrix-result-wrap {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

@media (max-width: 480px) {
    .matrix-grid input {
        width: 42px;
        height: 36px;
        font-size: 12px;
    }

    .matrix-grid--result .matrix-cell {
        width: 48px;
        height: 36px;
        font-size: 12px;
    }
}