/* Crystal Lattice Mismatch Calculator — scoped to left panel */

.sam-lmm-tool .lmm-layout {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sam-lmm-tool .lmm-inputs,
.sam-lmm-tool .lmm-results {
    flex: 1 1 4.2rem;
    min-width: 3.6rem;
}

.sam-lmm-tool .lmm-results {
    padding-top: 0.04rem;
}

.sam-lmm-tool .lmm-results-title {
    margin: 0 0 0.12rem;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.18rem, 15px);
    font-weight: 800;
    line-height: 1.2;
}

.sam-lmm-tool .lmm-field {
    display: flex;
    align-items: center;
    margin-bottom: 0.14rem;
    gap: 0.12rem;
}

.sam-lmm-tool .lmm-field label {
    flex: 0 0 3.2rem;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 13px);
    font-weight: 400;
    line-height: 1.3;
}

.sam-lmm-tool .lmm-field .field-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.08rem;
    min-width: 0;
}

.sam-lmm-tool .lmm-field input,
.sam-lmm-tool .lmm-field select {
    width: 100%;
    height: 0.4rem;
    min-height: 36px;
    padding: 0.05rem 0.12rem;
    border-radius: 0.06rem;
    border: 1px solid #A9A9A9;
    background: #FFF;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 14px);
    box-sizing: border-box;
}

.sam-lmm-tool .lmm-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 0.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.16rem center;
    background-size: 12px 8px;
}

.sam-lmm-tool .lmm-field select::-ms-expand {
    display: none;
}

.sam-lmm-tool .lmm-field input:focus,
.sam-lmm-tool .lmm-field select:focus {
    outline: none;
    border-color: #2F67B3;
}

.sam-lmm-tool .lmm-field .unit-suffix {
    color: #666;
    font-size: max(0.14rem, 12px);
    white-space: nowrap;
}

.sam-lmm-tool .lmm-actions {
    margin: 0.12rem 0 0.16rem;
}

.sam-lmm-tool .lmm-btn {
    appearance: none;
    border: 1px solid #2F67B3;
    background: #2F67B3;
    color: #fff;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 14px);
    font-weight: 700;
    line-height: 1.2;
    padding: 0.1rem 0.18rem;
    border-radius: 0.06rem;
    cursor: pointer;
    min-height: 40px;
}

.sam-lmm-tool .lmm-btn:hover {
    background: #255691;
    border-color: #255691;
}

.sam-lmm-tool .lmm-btn:focus,
.sam-lmm-tool .lmm-btn:focus-visible {
    outline: none;
}

.sam-lmm-tool .lmm-btn--ghost {
    background: #fff;
    color: #2F67B3;
}

.sam-lmm-tool .lmm-btn--ghost:hover {
    background: #F1F1F1;
    color: #255691;
}

.sam-lmm-tool .lmm-result-table {
    width: 100%;
    border-collapse: collapse;
}

.sam-lmm-tool .lmm-result-table th,
.sam-lmm-tool .lmm-result-table td {
    border-bottom: 1px solid rgba(183, 183, 183, 0.3);
    padding: 0.14rem 0.08rem;
    text-align: left;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 13px);
    color: #333;
    vertical-align: middle;
    line-height: 1.4;
}

.sam-lmm-tool .lmm-result-table th {
    font-weight: 700;
    color: #666;
    width: 48%;
    padding-right: 0.12rem;
}

.sam-lmm-tool .lmm-result-table td {
    font-weight: 700;
    color: #2F67B3;
    word-break: break-word;
}

.sam-lmm-tool .lmm-note {
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.4;
    margin-top: 0.12rem;
}

.sam-lmm-tool .tool-detail-content {
    margin-top: 0.28rem;
}

.sam-lmm-tool .lmm-formula {
    text-align: center;
    margin: 0.08rem 0;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 14px);
    color: #333;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .sam-lmm-tool .lmm-field {
        flex-direction: column;
        align-items: stretch;
    }

    .sam-lmm-tool .lmm-field label {
        flex-basis: auto;
    }

    .sam-lmm-tool .lmm-result-table th,
    .sam-lmm-tool .lmm-result-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .sam-lmm-tool .lmm-result-table th {
        border-bottom: none;
        padding-bottom: 0.04rem;
    }

    .sam-lmm-tool .lmm-result-table td {
        padding-top: 0.04rem;
    }
}
