/* Surface Roughness Converter — scoped to left panel */

.sam-sfc-tool .sfc-layout {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sam-sfc-tool .sfc-inputs,
.sam-sfc-tool .sfc-results {
    flex: 1 1 4.2rem;
    min-width: 3.6rem;
}

.sam-sfc-tool .sfc-results {
    padding-top: 0.04rem;
}

.sam-sfc-tool .sfc-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-sfc-tool .sfc-field {
    display: flex;
    align-items: center;
    margin-bottom: 0.14rem;
    gap: 0.12rem;
}

.sam-sfc-tool .sfc-field label {
    flex: 0 0 1.6rem;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 13px);
    font-weight: 400;
    line-height: 1.3;
}

.sam-sfc-tool .sfc-field .field-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.08rem;
    min-width: 0;
}

.sam-sfc-tool .sfc-field input,
.sam-sfc-tool .sfc-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-sfc-tool .sfc-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-sfc-tool .sfc-field select::-ms-expand {
    display: none;
}

.sam-sfc-tool .sfc-field input:focus,
.sam-sfc-tool .sfc-field select:focus {
    outline: none;
    border-color: #2F67B3;
}

.sam-sfc-tool .sfc-actions {
    margin: 0.12rem 0 0.16rem;
}

.sam-sfc-tool .sfc-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-sfc-tool .sfc-btn:hover {
    background: #255691;
    border-color: #255691;
}

.sam-sfc-tool .sfc-btn:focus,
.sam-sfc-tool .sfc-btn:focus-visible {
    outline: none;
}

.sam-sfc-tool .sfc-btn--ghost {
    background: #fff;
    color: #2F67B3;
}

.sam-sfc-tool .sfc-btn--ghost:hover {
    background: #F1F1F1;
    color: #255691;
}

.sam-sfc-tool .sfc-result-table {
    width: 100%;
    border-collapse: collapse;
}

.sam-sfc-tool .sfc-result-table th,
.sam-sfc-tool .sfc-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-sfc-tool .sfc-result-table th {
    font-weight: 700;
    color: #666;
    width: 48%;
    padding-right: 0.12rem;
}

.sam-sfc-tool .sfc-result-table td {
    font-weight: 700;
    color: #2F67B3;
    word-break: break-word;
}

.sam-sfc-tool .sfc-note {
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.4;
    margin-top: 0.12rem;
}

.sam-sfc-tool .sfc-visual {
    margin-top: 0.28rem;
    width: 100%;
}

.sam-sfc-tool .sfc-scale {
    position: relative;
    height: 0.28rem;
    min-height: 18px;
    margin: 0.12rem 0 0.08rem;
}

.sam-sfc-tool .sfc-scale-bar {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 45%, #f97316 70%, #ef4444 100%);
}

.sam-sfc-tool .sfc-scale-marker {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 3px;
    margin-left: -1.5px;
    background: #0B1F3B;
    border-radius: 2px;
    left: 0;
    transition: left 150ms ease;
}

.sam-sfc-tool .sfc-scale-labels {
    display: flex;
    justify-content: space-between;
    gap: 0.08rem;
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.12rem, 11px);
    line-height: 1.3;
    margin-bottom: 0.16rem;
}

.sam-sfc-tool .sfc-key-box {
    border: 1px solid rgba(183, 183, 183, 0.45);
    background: #F8F9FB;
    border-radius: 0.06rem;
    padding: 0.14rem 0.16rem;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.5;
}

.sam-sfc-tool .sfc-key-box strong {
    display: block;
    margin-bottom: 0.04rem;
    color: #333;
}

.sam-sfc-tool .tool-detail-content {
    margin-top: 0.28rem;
}

.sam-sfc-tool .sfc-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;
}

.sam-sfc-tool .sfc-ref-intro,
.sam-sfc-tool .sfc-ref-note {
    margin-bottom: 0.12rem;
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.18rem, 15px);
    line-height: 1.5;
}
.sam-sfc-tool .sfc-ref-note {
    margin-top: 0.12rem;
    margin-bottom: 0;
}

.sam-sfc-tool .sfc-ref-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sam-sfc-tool .sfc-ref-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
}

.sam-sfc-tool .sfc-ref-table th,
.sam-sfc-tool .sfc-ref-table td {
    border-bottom: 1px solid rgba(183, 183, 183, 0.35);
    padding: 0.1rem 0.08rem;
    text-align: right;
    color: #333;
    line-height: 1.4;
    white-space: nowrap;
}

.sam-sfc-tool .sfc-ref-table th:last-child,
.sam-sfc-tool .sfc-ref-table td:last-child {
    text-align: left;
    white-space: normal;
}

.sam-sfc-tool .sfc-ref-table th {
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid rgba(183, 183, 183, 0.55);
}

.sam-sfc-tool .sfc-ref-table tbody tr:nth-child(even) {
    background: #F8F9FB;
}

.sam-sfc-tool .sfc-ref-table .sfc-ref-highlight {
    background: #E8F0FB;
}

.sam-sfc-tool .sfc-ref-table .sfc-ref-highlight td {
    font-weight: 700;
    color: #2F67B3;
}

@media (max-width: 768px) {
    .sam-sfc-tool .sfc-field {
        flex-direction: column;
        align-items: stretch;
    }

    .sam-sfc-tool .sfc-field label {
        flex-basis: auto;
    }

    .sam-sfc-tool .sfc-result-table th,
    .sam-sfc-tool .sfc-result-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .sam-sfc-tool .sfc-result-table th {
        border-bottom: none;
        padding-bottom: 0.04rem;
    }

    .sam-sfc-tool .sfc-result-table td {
        padding-top: 0.04rem;
    }

    .sam-sfc-tool .sfc-scale-labels {
        flex-wrap: wrap;
    }
}
