/* Copyright (c) 2026 3D Splitter. All rights reserved. Unauthorised copying prohibited. */


#toast {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    bottom: 40px;
    right: 60px;
    z-index: 3000;
    background-color: rgba(20, 20, 20, 0.9);
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #444;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateX(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

#fusion-ui-container {
    position: absolute; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex; align-items: stretch; gap: 0;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#fusion-ui-container.model-loaded { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#fusion-ui-container.model-loaded.collapsed-by-user { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px) scale(0.95); }

#fusion-toolbar {
    background: rgba(30, 30, 30, 0.95); backdrop-filter: blur(10px);
    border-radius: 8px; display: flex; flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    color: #eee; min-width: 420px; pointer-events: auto;
    margin-right: 10px;
}

.fusion-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 2px; }
.fusion-tab-btn {
    flex: 1; background: transparent; border: none; color: #666; padding: 6px;
    font-size: 10px; font-weight: 800; text-transform: uppercase; cursor: pointer; border-radius: 4px;
    transition: all 0.2s;
}
.fusion-tab-btn:hover { color: #aaa; background: rgba(255,255,255,0.05); }
.fusion-tab-btn.active { color: #007acc; background: rgba(0, 122, 204, 0.1); }

.fusion-body { display: flex; align-items: center; padding: 6px 12px; min-height: 50px; }
.fusion-pane { display: none; width: 100%; align-items: center; }
.fusion-pane.active { display: flex; }

#fusion-split-btn {
    background: #007acc; color: #fff; border-radius: 8px; font-weight: 800; font-size: 13px;
    padding: 0 25px; cursor: pointer; border: 1px solid #009eff;
    display: flex; align-items: center; justify-content: center;
    text-transform: uppercase; pointer-events: auto; min-width: 100px;
    transition: background 0.2s;
    box-shadow: 0 4px 15px rgba(0, 122, 204, 0.3);
}
#fusion-split-btn:hover { background: #008be5; }
#fusion-split-btn:disabled { background: #444; border-color: #555; color: #888; cursor: not-allowed; box-shadow: none; }

#fusion-forward-btn {
    width: 0; opacity: 0; padding: 0; margin-right: 0; border-width: 0;
    background: rgba(40, 40, 40, 0.95); color: #ccc;
    border-radius: 8px; font-weight: 700; font-size: 16px;
    cursor: pointer; border: 1px solid #555;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden; white-space: nowrap;
}
#fusion-forward-btn:hover { background: #333; color: #fff; border-color: #777; }
#fusion-forward-btn.visible {
    width: 44px;
    opacity: 1;
    margin-right: 10px;
    border-width: 1px;
}

#bottom-right-tools {
    position: absolute; bottom: 30px; right: 15px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 2000; pointer-events: none;
    transition: opacity 0.5s ease; opacity: 0; visibility: hidden;
}
#bottom-right-tools.ready { opacity: 1; visibility: visible; pointer-events: auto; }

.tool-fab {
    width: 32px; height: 32px; background: #252526; border: 1px solid #444;
    border-radius: 6px;
    color: #888;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: all 0.2s;
    font-size: 16px;
}
.tool-fab:hover { color: #fff; background: #333; border-color: #666; }
.tool-fab.eye-closed { color: #555; border-color: #333; }
.tool-fab svg { width: 18px; height: 18px; fill: currentColor; }

.undo-redo-group {
    display: flex; flex-direction: column; gap: 4px;
    margin-bottom: 8px; border-bottom: 1px solid #444; padding-bottom: 8px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-3px); max-height: 0; margin-bottom: 0; }
    to   { opacity: 1; transform: translateY(0);    max-height: 14px; margin-bottom: 0; }
}

.setup-container { display: flex; gap: 4px; height: 100%; width: 100%; font-family: sans-serif; align-items: stretch; }
.setup-card { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.06); border-radius: 4px; padding: 2px 6px; display: flex; flex-direction: column; gap: 1px; min-width: 0; justify-content: center; }
.col-left  { flex: 0 0 100px; }
.col-mid   { flex: 1; }
.col-right { flex: 1.1; }

.setup-row {
    display: flex; align-items: center; gap: 4px; height: 14px; width: 100%;
    animation: slideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    overflow: hidden;
}

.setup-label { font-size: 8px; font-weight: 800; color: #666; width: 40px; white-space: nowrap; flex-shrink: 0; text-transform: uppercase; transition: color 0.2s; }
.setup-row:hover .setup-label { color: #aaa; }

.setup-slider { flex-grow: 1; height: 2px; -webkit-appearance: none; background: #333; border-radius: 2px; outline: none; cursor: pointer; min-width: 30px; }
.setup-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 7px; height: 7px; background: #888; border-radius: 50%; transition: transform 0.1s; }
.setup-slider:hover::-webkit-slider-thumb { background: #007acc; transform: scale(1.2); }
.setup-val { font-size: 8px; color: #007acc; width: 20px; text-align: right; font-family: monospace; font-weight: 700; }

.group-header { display: flex; justify-content: space-between; align-items: flex-end; height: 10px; margin-bottom: 1px; padding-bottom: 1px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.group-title  { font-size: 7.5px; font-weight: 900; color: #444; letter-spacing: 0.5px; text-transform: uppercase; }
.reset-icon-btn { background: transparent; border: none; color: #555; cursor: pointer; font-size: 8px; padding: 0; line-height: 1; opacity: 0.6; transition: all 0.2s; }
.reset-icon-btn:hover { opacity: 1; color: #d9534f; transform: rotate(-90deg); }

.smart-fit-btn { background: #121212; border: 1px solid #333; color: #007acc; border-radius: 2px; font-size: 8px; font-weight: 900; padding: 2px 0; cursor: pointer; width: 100%; text-align: center; margin-bottom: 2px; text-transform: uppercase; transition: background 0.2s; }
.smart-fit-btn:hover { border-color: #007acc; background: #1a1a1a; }

.axis-group { display: flex; gap: 2px; width: 100%; }
.axis-toggle { flex: 1; background: #1a1a1a; border: 1px solid #333; color: #555; font-size: 8px; font-weight: 900; height: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 2px; transition: all 0.2s; }
.axis-toggle:hover { border-color: #777; color: #999; }
.axis-toggle.active.x { border-color: #ff5252; color: #ff5252; background: rgba(255, 82, 82, 0.1); }
.axis-toggle.active.y { border-color: #69f0ae; color: #69f0ae; background: rgba(105, 240, 174, 0.1); }
.axis-toggle.active.z { border-color: #448aff; color: #448aff; background: rgba(68, 138, 255, 0.1); }
.axis-cycle-btn { font-size: 9px; width: 18px; flex: 0 0 auto; }

.type-grid   { display: flex; gap: 2px; width: 100%; margin-top: 1px; }
.type-select { flex: 1; background: #080808; border: 1px solid #222; color: #888; font-size: 8px; height: 16px; padding: 0; outline: none; border-radius: 2px; text-align: center; cursor: pointer; }
.type-select:hover { border-color: #444; }

.parts-row     { display: flex; justify-content: space-between; align-items: center; margin-top: 1px; }
.parts-control { display: flex; align-items: center; background: #080808; border: 1px solid #222; border-radius: 2px; padding: 0; height: 16px; }
.parts-btn  { width: 14px; height: 100%; background: #1a1a1a; border: none; color: #777; cursor: pointer; font-size: 9px; display: flex; align-items: center; justify-content: center; }
.parts-btn:hover { background: #222; color: #fff; }
.parts-val  { width: 18px; text-align: center; font-size: 8px; font-weight: 700; color: #007acc; border: none; background: transparent; outline: none; }

.trans-layout { display: flex; align-items: center; width: 100%; height: 100%; }
.trans-modes  { display: flex; flex-direction: column; gap: 3px; padding-right: 10px; border-right: 1px solid #444; margin-right: 12px; }
.trans-mode-btn { background: #2a2a2a; color: #999; border: 1px solid #3a3a3a; padding: 3px 8px; border-radius: 4px; font-size: 9px; cursor: pointer; width: 85px; font-weight: 800; }
.trans-mode-btn.active { background: #007acc; color: #fff; border-color: #009eff; }

.trans-inputs-wrapper { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }
.trans-inputs-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.trans-inputs { display: flex; gap: 10px; align-items: center; flex-grow: 1; }
.trans-group  { display: flex; flex-direction: column; align-items: center; gap: 1px; }

.trans-label { font-size: 9px; font-weight: 900; cursor: ew-resize; user-select: none; padding: 0 4px; border-radius: 2px; transition: background 0.2s; }
.trans-label:hover { background: rgba(255,255,255,0.1); }

.trans-box { background: #000; border: 1px solid #333; border-radius: 4px; display: flex; align-items: center; padding: 0 6px; height: 28px; }
.trans-box input { background: transparent; border: none; color: #fff; width: 70px; text-align: center; font-size: 14px; outline: none; font-family: monospace; -moz-appearance: textfield; }
.trans-box input::-webkit-outer-spin-button,
.trans-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.trans-spinners { display: flex; flex-direction: column; margin-left: 4px; height: 100%; border-left: 1px solid #222; }
.trans-spin { background: transparent; border: none; color: #666; font-size: 8px; cursor: pointer; height: 50%; padding: 0 4px; }
.trans-spin:hover { color: #fff; }

.btn-reset-small { background: transparent; border: 1px solid #444; color: #666; border-radius: 4px; width: 22px; height: 22px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.btn-reset-small:hover { color: #fff; border-color: #888; }

.quick-actions { display: flex; gap: 5px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #222; width: 100%; }
.quick-btn { background: #222; border: 1px solid #333; color: #888; border-radius: 3px; font-size: 9px; padding: 2px 6px; cursor: pointer; flex: 1; text-transform: uppercase; font-weight: 700; }
.quick-btn:hover { background: #333; color: #fff; border-color: #555; }

.scale-slider-row { display: flex; align-items: center; gap: 8px; width: 100%; border-top: 1px solid #222; padding-top: 4px; margin-top: 2px; }
.scale-slider-row input[type=range] { flex-grow: 1; accent-color: #007acc; height: 3px; cursor: pointer; }
.scale-lock { font-size: 14px; cursor: pointer; margin-right: 5px; margin-top: 10px; color: #666; }

.pins-container {
    display: flex; gap: 4px; width: 100%; height: 100%;
    font-family: sans-serif;
    align-items: stretch;
}
.pins-card {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px; padding: 2px 6px;
    display: flex; flex-direction: column;
    gap: 1px; min-width: 0; justify-content: center;
}
.pins-col-left  { flex: 0 0 110px; }
.pins-col-mid   { flex: 0 0 130px; }
.pins-col-right { flex: 1; min-width: 0; }

.pins-toggle-btn {
    background: #121212; border: 1px solid #333; border-radius: 2px;
    color: #888; font-size: 8px; font-weight: 900; padding: 2px 0;
    cursor: pointer; text-align: center; text-transform: uppercase;
    transition: all 0.2s; margin-bottom: 2px;
}
.pins-toggle-btn.active { border-color: #28a745; color: #28a745; background: rgba(40, 167, 69, 0.1); }
.pins-toggle-btn:hover  { border-color: #666; }

.pins-row   { display: flex; align-items: center; gap: 4px; height: 14px; width: 100%; }
.pins-label { font-size: 8px; font-weight: 800; color: #666; width: 60px; text-align: left; flex-shrink: 0; text-transform: uppercase; }

.pins-slider { flex-grow: 1; height: 2px; -webkit-appearance: none; background: #333; border-radius: 2px; outline: none; cursor: pointer; }
.pins-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 7px; height: 7px; background: #888; border-radius: 50%; }

.pins-val { font-size: 8px; color: #007acc; width: 30px; text-align: right; font-family: monospace; font-weight: 700; flex-shrink: 0; }

.pins-type-select {
    width: 100%; background: #080808; border: 1px solid #222; color: #888;
    font-size: 8px; height: 16px; border-radius: 2px; cursor: pointer;
    outline: none; padding: 0 2px;
}

.pins-shape-grid { display: flex; gap: 2px; width: 100%; }
.pins-shape-btn {
    flex: 1; background: #1a1a1a; border: 1px solid #333; color: #555;
    font-size: 8px; font-weight: 900; height: 16px; display: flex;
    align-items: center; justify-content: center; cursor: pointer; border-radius: 2px;
}
.pins-shape-btn.active { border-color: #007acc; color: #007acc; background: rgba(0,122,204,0.1); }

.dowel-rec-line {
    margin-top: 2px; padding: 2px 4px;
    background: rgba(0, 122, 204, 0.08);
    border-radius: 2px; border: 1px solid rgba(0, 122, 204, 0.2);
    font-size: 8px; color: #666; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dowel-rec-line span { color: #00aaff; font-weight: 800; }

.bug-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 100000; display: flex; align-items: center; justify-content: center; font-family: sans-serif; backdrop-filter: blur(2px); }
.bug-modal { width: 440px; max-height: 90vh; background: #0d1117; border: 1px solid #30363d; border-radius: 12px; color: #c9d1d9; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); display: flex; flex-direction: column; overflow: hidden; }
.bug-header { color: #58a6ff; font-size: 13px; font-weight: 800; margin-bottom: 15px; text-transform: uppercase; flex-shrink: 0; }
.bug-scroll-area { flex: 1; overflow-y: auto; padding-right: 4px; }
.bug-scroll-area::-webkit-scrollbar { width: 4px; }
.bug-scroll-area::-webkit-scrollbar-thumb { background: #30363d; border-radius: 10px; }
.bug-desc { width: 100%; height: 70px; background: #010409; border: 1px solid #30363d; color: #c9d1d9; border-radius: 6px; padding: 12px; font-size: 12px; resize: none; box-sizing: border-box; margin-bottom: 15px; outline: none; }
.bug-section-title { font-size: 9px; color: #8b949e; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; }
.bug-data-card { background: #161b22; border-radius: 6px; padding: 12px; margin-bottom: 15px; border: 1px solid #30363d; }
.bug-item { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 6px 0; border-bottom: 1px solid #30363d; }
.bug-video-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; border-top: 1px solid #30363d; white-space: nowrap; }
.bug-frame { height: 40px; width: 65px; background: #000; border: 1px solid #30363d; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
#bug-ss-prev { width: 100%; height: 90px; object-fit: contain; background: #000; border: 1px solid #30363d; border-radius: 4px; margin-top: 8px; }
.bug-privacy-note { font-size: 9px; color: #484f58; text-align: center; margin: 15px 0; }
#bug-json-view { display: none; background: #010409; color: #79c0ff; padding: 12px; font-family: monospace; font-size: 10px; max-height: 150px; overflow: auto; border-radius: 6px; margin: 10px 0; border: 1px solid #30363d; }
.bug-footer { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid #30363d; }
.bug-btn { flex: 1; padding: 12px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; font-size: 11px; transition: 0.2s; text-transform: uppercase; }
.bug-btn-cancel { background: #21262d; color: #c9d1d9; }
.bug-btn-send { background: #238636; color: #fff; }
.bug-status-pill { position: fixed; bottom: 85px; right: 20px; background: #58a6ff; color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 11px; font-weight: 800; z-index: 10000; }
