/* 木材材积计算器样式 */

.tool-title-wrapper {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    margin-bottom: 1.5rem; padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}
.tool-title-wrapper i { font-size: 2rem; color: var(--primary-color); }
.tool-title-wrapper .tool-title { margin-bottom: 0; border-bottom: none; }

.is-hidden { display: none !important; }

.tv-error {
    display: none; margin-bottom: 1rem; padding: 0.65rem 0.9rem;
    border-radius: 8px; background: #fff1f0; border: 1px solid #ffccc7;
    color: #c92a2a; font-size: 0.9rem;
}
.tv-error.show { display: block; }

.tv-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tv-tabs button {
    padding: 0.5rem 1.1rem; border: 1px solid var(--border-color, #dfe3e8);
    background: #fff; color: var(--text-color); border-radius: 8px;
    font-size: 0.92rem; cursor: pointer; transition: all .15s;
}
.tv-tabs button:hover { border-color: var(--primary-color); color: var(--primary-color); }
.tv-tabs button.active {
    background: var(--primary-color); border-color: var(--primary-color); color: #fff;
}

.tv-label {
    display: block; margin-bottom: 0.35rem; font-size: 0.88rem;
    font-weight: 600; color: var(--text-color);
}
.tv-unit { font-weight: 400; color: #7a8394; font-size: 0.82rem; }
.tv-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem; margin-bottom: 0.9rem;
}
.tv-field { min-width: 0; }
.tv-hint { margin: 0 0 1.1rem; font-size: 0.85rem; color: #7a8394; line-height: 1.7; }

.tv-result-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem; margin-bottom: 1.1rem;
}
.tv-card {
    border: 1px solid var(--border-color, #e6e9ef); border-top: 3px solid var(--primary-color);
    border-radius: 9px; padding: 0.9rem; background: #fafbff; text-align: center;
}
.tv-card:nth-child(3n+2) { border-top-color: #4facfe; }
.tv-card:nth-child(3n+3) { border-top-color: #43cea2; }
.tv-card-label { font-size: 0.84rem; color: #7a8394; }
.tv-card-value {
    margin-top: 0.3rem; font-size: 1.55rem; font-weight: 700; color: var(--primary-color);
    font-variant-numeric: tabular-nums; word-break: break-all;
}
.tv-card:nth-child(3n+2) .tv-card-value { color: #2196c9; }
.tv-card:nth-child(3n+3) .tv-card-value { color: #2a9d72; }
.tv-card-tip { font-size: 0.76rem; color: #9aa3b2; margin-top: 0.15rem; }

.tv-callout {
    padding: 0.7rem 0.9rem; border-radius: 8px; background: #f0f7ff;
    border-left: 3px solid var(--primary-color); font-size: 0.88rem;
    color: var(--text-color); margin-bottom: 1.2rem; line-height: 1.7;
    word-break: break-word; font-variant-numeric: tabular-nums;
}

.tv-section-title {
    margin: 1.3rem 0 0.7rem; font-size: 1.05rem; font-weight: 600;
    color: var(--text-color); display: flex; align-items: center; gap: 0.4rem;
}
.tv-batch-input {
    width: 100%; min-height: 96px; padding: 0.6rem 0.7rem; box-sizing: border-box;
    border: 1px solid var(--border-color, #dfe3e8); border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem; line-height: 1.55; color: var(--text-color); background: #fff;
    resize: vertical;
}
.tv-batch-input:focus { outline: none; border-color: var(--primary-color); }
.tv-table-wrap { overflow-x: auto; margin-top: 0.9rem; }
.tv-table { width: 100%; border-collapse: collapse; font-size: 0.89rem; }
.tv-table th, .tv-table td {
    padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--border-color, #e9ecf2); text-align: left;
}
.tv-table th { background: #f5f7fb; font-weight: 600; white-space: nowrap; }
.tv-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tv-table tbody tr:hover { background: #fafbff; }
.tv-summary {
    display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 0.8rem;
    padding: 0.7rem 0.9rem; border-radius: 8px; background: #f7f9fd; font-size: 0.9rem;
}
.tv-summary b { color: var(--primary-color); font-variant-numeric: tabular-nums; }
.tv-note { margin-top: 0.7rem; font-size: 0.84rem; color: #7a8394; line-height: 1.7; }
.tv-note.is-error { color: #c92a2a; }

.cs-table-wrap { overflow-x: auto; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 0.89rem; }
.cs-table th, .cs-table td {
    padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border-color, #e9ecf2); text-align: left;
}
.cs-table th { background: #f5f7fb; font-weight: 600; }
.cs-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cs-hint { margin-top: 0.7rem; font-size: 0.83rem; color: #7a8394; line-height: 1.6; }

@media (max-width: 820px) {
    .tv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .tv-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .tv-grid, .tv-result-grid { grid-template-columns: minmax(0, 1fr); }
}
