/* Thin Film Deposition Calculator — scoped to left panel only */

.sam-tfd-tool .tfd-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid rgba(183, 183, 183, 0.3);
    flex-wrap: wrap;
}

.sam-tfd-tool .tfd-tab {
    appearance: none;
    border: none;
    background: transparent;
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.18rem, 14px);
    font-weight: 700;
    line-height: 1.2;
    padding: 0.12rem 0.2rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.sam-tfd-tool .tfd-tab:hover {
    color: #2F67B3;
}

.sam-tfd-tool .tfd-tab.is-active {
    color: #2F67B3;
    border-bottom-color: #2F67B3;
}

.sam-tfd-tool .tfd-tab:focus {
    outline: none;
}

.sam-tfd-tool .tfd-tab:focus-visible {
    outline: none;
    color: #2F67B3;
}

.sam-tfd-tool .tfd-panel {
    display: none;
    padding-top: 0.12rem;
}

.sam-tfd-tool .tfd-panel.is-active {
    display: block;
}

.sam-tfd-tool .tfd-layout {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sam-tfd-tool .tfd-or-group {
    margin-bottom: 0.16rem;
    padding: 0.16rem 0.16rem 0.14rem;
    border: 1px solid rgba(47, 103, 179, 0.28);
    border-radius: 0.06rem;
    background: #F3F7FC;
    box-sizing: border-box;
}

.sam-tfd-tool .tfd-or-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    margin: 0.1rem 0 0.14rem;
    color: #2F67B3;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.18rem, 15px);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.02em;
}

.sam-tfd-tool .tfd-or-sep::before,
.sam-tfd-tool .tfd-or-sep::after {
    content: '';
    flex: 1;
    max-width: 1.2rem;
    height: 1px;
    background: rgba(47, 103, 179, 0.35);
}

.sam-tfd-tool .tfd-or-group .tfd-field {
    margin-bottom: 0.08rem;
}

.sam-tfd-tool .tfd-or-group > .tfd-field-help {
    margin-top: 0.08rem;
    color: #2F67B3;
}

.sam-tfd-tool .tfd-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0.16rem;
    gap: 0.08rem;
}

.sam-tfd-tool .tfd-field label {
    flex: none;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 13px);
    font-weight: 700;
    line-height: 1.3;
}

.sam-tfd-tool .tfd-field label .tfd-unit {
    color: #666;
    font-weight: 400;
    margin-left: 0.04rem;
}

.sam-tfd-tool .tfd-field .field-control {
    flex: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.08rem;
    min-width: 0;
}

.sam-tfd-tool .tfd-field input,
.sam-tfd-tool .tfd-field select {
    width: 100%;
    height: 0.44rem;
    min-height: 40px;
    padding: 0.08rem 0.14rem;
    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-tfd-tool .tfd-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 0.48rem;
    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.2rem center;
    background-size: 12px 8px;
}

.sam-tfd-tool .tfd-field select::-ms-expand {
    display: none;
}

.sam-tfd-tool .tfd-field input:focus,
.sam-tfd-tool .tfd-field select:focus {
    outline: none;
    border-color: #2F67B3;
}

.sam-tfd-tool .tfd-field input:focus-visible,
.sam-tfd-tool .tfd-field select:focus-visible {
    outline: 2px solid #2F67B3;
    outline-offset: 1px;
}

.sam-tfd-tool .tfd-field input.is-warn {
    color: #c0392b;
    border-color: #c0392b;
}

.sam-tfd-tool .tfd-field-help {
    margin: 0;
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.4;
}

.sam-tfd-tool .tfd-warn {
    display: none;
    margin: 0 0 0.12rem;
    color: #c0392b;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.4;
}

.sam-tfd-tool .tfd-warn.is-visible {
    display: block;
}

.sam-tfd-tool .tfd-error {
    min-height: 0.2rem;
    margin-bottom: 0.08rem;
    color: #c0392b;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.4;
}

.sam-tfd-tool .tfd-result-panel {
    border: 1px solid rgba(183, 183, 183, 0.45);
    border-radius: 0.06rem;
    padding: 0.14rem 0.16rem;
    background: #fafafa;
}

.sam-tfd-tool .tfd-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.16rem;
    padding: 0.06rem 0;
    border-bottom: 1px solid rgba(183, 183, 183, 0.25);
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 13px);
    line-height: 1.4;
}

.sam-tfd-tool .tfd-result-row:last-child {
    border-bottom: none;
}

.sam-tfd-tool .tfd-result-lbl {
    color: #666;
    font-weight: 400;
}

.sam-tfd-tool .tfd-result-val {
    color: #333;
    font-weight: 700;
    text-align: right;
}

.sam-tfd-tool .tfd-note {
    margin: 0.12rem 0 0;
    color: #666;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.14rem, 12px);
    line-height: 1.45;
}

.sam-tfd-tool .tfd-formula-list {
    margin: 0.08rem 0 0.16rem;
    padding: 0;
    list-style: none;
}

.sam-tfd-tool .tfd-formula-list li {
    margin-bottom: 0.06rem;
    color: #333;
    font-family: NunitoSans, sans-serif;
    font-size: max(0.16rem, 14px);
    line-height: 1.5;
}

