.wbc-notice { padding: 1em; background: #fff3cd; border: 1px solid #ffeeba; border-radius: 4px; }
.wbc-selector { margin: 1em 0; }
.wbc-selector select { padding: 4px 6px; }
.wbc-h3 { font-size: 1.2em; font-weight: bold; margin: 1em 0 0.5em; }
.wbc-table { border-collapse: collapse; width: 100%; margin-bottom: 1em; table-layout: fixed; }
.wbc-table th, .wbc-table td { border: 1px solid #ccc; padding: 4px 8px; overflow-wrap: anywhere; }
.wbc-table thead th { background: #eef; }
/* Spaltenbreiten: schmale Zahlen-/Button-Spalten, Bemerkung bekommt den Rest. */
.wbc-table thead th:nth-child(1) { width: 14%; }
.wbc-table thead th:nth-child(2),
.wbc-table thead th:nth-child(4) { width: 7%; }
.wbc-table thead th:nth-child(3) { width: 9%; }
.wbc-table thead th:nth-child(5),
.wbc-table thead th:nth-child(6),
.wbc-table thead th:nth-child(7),
.wbc-table thead th:nth-child(8) { width: 5%; }
.wbc-table thead th:nth-child(9) { width: 8%; }
.wbc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.wbc-table .center { text-align: center; }
.wbc-table .error { background: #fdd; color: #900; font-weight: bold; }
button.wbc-btn {
    display: inline-block;
    min-width: 1.8em;
    padding: 2px 8px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #aac;
    border-radius: 3px;
    background: #f4f6ff;
    color: #224;
    font-weight: bold;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.2;
    cursor: pointer;
}
button.wbc-btn:hover { background: #dde3ff; }
button.wbc-btn:active { background: #c5cdff; }
button.wbc-btn-hidden { visibility: hidden; pointer-events: none; }
/* The wrapper's width is set from JS (App.syncCanvasWidth) to match the
 * rendered width of the mass table. The canvas fills that wrapper width.
 * !important beats theme rules such as ".entry-content canvas { max-width: 100% }". */
.wbc-cog-wrap { margin: 1em 0; }
canvas.wbc-cog,
.wbc-cog-wrap canvas.wbc-cog {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    border: 1px solid #eee;
    box-sizing: border-box;
}
/* --- Result metrics (Flächenlast, Masse n.t. Teile) --- */
.wbc-result {
    display: flex;
    gap: 0.8em;
    margin: 1em 0;
    flex-wrap: wrap;
}
.wbc-metric {
    flex: 1 1 220px;
    padding: 0.7em 1em;
    background: #f6f8fb;
    border: 1px solid #e0e4eb;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}
.wbc-metric-label {
    font-size: 0.8em;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wbc-metric-value {
    margin-top: 0.2em;
    font-size: 1.35em;
    font-weight: 600;
    color: #1d2327;
}
.wbc-metric-value small {
    font-size: 0.65em;
    font-weight: 400;
    color: #50575e;
}
.wbc-metric-limit {
    display: inline-block;
    margin-left: 0.6em;
    font-size: 0.65em;
    font-weight: 400;
    color: #50575e;
}
.wbc-metric.error {
    background: #fef0f0;
    border-left-color: #c62828;
}
.wbc-metric.error .wbc-metric-value { color: #b71c1c; }

/* --- Actions (save/load/delete) --- */
.wbc-actions {
    display: flex;
    align-items: center;
    gap: 1em;
    margin: 0.8em 0 1.4em;
    padding: 0.7em 1em;
    background: #fff;
    border: 1px solid #e0e4eb;
    border-radius: 4px;
    flex-wrap: wrap;
    box-sizing: border-box;
}
.wbc-actions-group {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}
.wbc-action-btn {
    padding: 0.5em 1em;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.wbc-action-btn:hover:not(:disabled) { background: #eaecef; }
.wbc-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wbc-action-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.wbc-action-primary:hover:not(:disabled) { background: #135e96; border-color: #135e96; }
.wbc-action-danger {
    background: #fff;
    border-color: #d9b1b4;
    color: #b32d2e;
}
.wbc-action-danger:hover:not(:disabled) { background: #fcf0f1; border-color: #b32d2e; }

.wbc-status { font-style: italic; color: #4a7d48; min-width: 160px; }
.wbc-status.error { color: #b32d2e; font-weight: 600; font-style: normal; }

/* --- Documents --- */
.wbc-docs {
    margin: 1em 0;
    padding: 0.9em 1em;
    background: #fafbfc;
    border: 1px solid #e0e4eb;
    border-radius: 4px;
    box-sizing: border-box;
}
.wbc-docs-note {
    font-size: 0.9em;
    color: #50575e;
    margin-bottom: 0.6em;
    font-style: italic;
}
.wbc-docs-links {
    display: flex;
    gap: 0.6em;
    flex-wrap: wrap;
}
.wbc-doc-link {
    display: inline-block;
    padding: 0.4em 0.9em;
    background: #fff;
    border: 1px solid #dcdfe5;
    border-radius: 3px;
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}
.wbc-doc-link:hover {
    background: #f0f4fb;
    border-color: #2271b1;
}
.wbc-doc-unavailable {
    display: inline-block;
    padding: 0.4em 0.9em;
    color: #8c8f94;
}
.wbc-docs-footer {
    margin-top: 0.9em;
    padding-top: 0.8em;
    border-top: 1px solid #e0e4eb;
    font-size: 0.9em;
    font-weight: 600;
    color: #1d2327;
}
.wbc-docs-remark {
    margin-top: 0.6em;
    font-size: 0.9em;
    color: #50575e;
}
