/* Whiteboard Container */
#wb-container {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    background: #1a1a2e;
}

/* Linke Seitenleiste */
#wb-sidebar-left {
    width: 220px;
    min-width: 220px;
    background: rgba(22, 33, 62, 0.95);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#wb-sidebar-title {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#wb-project-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.wb-proj-item {
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.wb-proj-item:hover {
    background: rgba(83, 52, 131, 0.3);
}

.wb-proj-item.wb-proj-active {
    background: rgba(233, 69, 96, 0.25);
    color: #fff;
    border: 1px solid rgba(233, 69, 96, 0.4);
}

.wb-proj-item .wb-proj-actions {
    display: flex;
    gap: 4px;
}

.wb-proj-item .wb-proj-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
}

.wb-proj-item .wb-proj-actions button:hover {
    color: #e94560;
    background: rgba(233, 69, 96, 0.15);
}

/* Whiteboard Hauptbereich */
#wb-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Whiteboard Toolbar */
#wb-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(22, 33, 62, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wb-tool-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #c0c0c0;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.wb-tool-btn:hover {
    background: rgba(83, 52, 131, 0.4);
    color: #fff;
}

.wb-tool-btn.wb-active {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
    color: #fff;
}

.wb-sep {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
}

#wb-toolbar input[type="color"] {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

#wb-toolbar input[type="range"] {
    width: 80px;
    accent-color: #e94560;
}

#wb-zoom-label {
    font-size: 12px;
    color: #aaa;
    min-width: 40px;
    text-align: center;
}

/* Canvas Bereich */
#wb-canvas-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #2a2a3e;
    cursor: crosshair;
}

#wb-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Rechte Seitenleiste: Aufgaben */
#wb-sidebar-right {
    width: 260px;
    min-width: 260px;
    background: rgba(22, 33, 62, 0.95);
    border-left: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#wb-tasks-title {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#wb-task-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.wb-task-item {
    padding: 10px;
    margin: 4px 0;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    font-size: 12px;
    color: #ccc;
}

.wb-task-item .wb-task-title {
    font-weight: 600;
    font-size: 13px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.wb-task-item .wb-task-meta {
    color: #888;
    font-size: 11px;
}

.wb-task-item .wb-task-done {
    color: #00ff88;
}

.wb-task-item .wb-task-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.wb-task-item .wb-task-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.wb-task-item .wb-task-actions button:hover {
    color: #e94560;
    background: rgba(233, 69, 96, 0.15);
}

/* Inline Text-Editor Container */
.wb-text-container {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
    max-width: 600px;
}

/* Text-Formatierungs-Toolbar */
.wb-text-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(22, 33, 62, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 3px 6px;
}
.wb-tt-label {
    color: #aaa;
    font-size: 12px;
    user-select: none;
}
.wb-tt-slider {
    width: 70px;
    height: 14px;
    accent-color: #e94560;
    cursor: pointer;
}
.wb-tt-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    color: #ccc;
    font-size: 13px;
    padding: 2px 7px;
    cursor: pointer;
    line-height: 1.2;
}
.wb-tt-btn:hover {
    background: rgba(233, 69, 96, 0.3);
    color: #fff;
}

/* Inline Text-Editor Overlay */
.wb-text-overlay {
    background: rgba(30, 30, 50, 0.85);
    border: 1px solid rgba(233, 69, 96, 0.5);
    border-radius: 4px;
    padding: 6px 8px;
    outline: none;
    resize: horizontal;
    overflow: hidden;
    line-height: 1.4;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    width: 100%;
    min-height: 36px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Mikrofon-Button */
.wb-mic-btn {
    align-self: flex-start;
    background: rgba(50, 50, 80, 0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #ccc;
}

.wb-mic-btn:hover {
    background: rgba(83, 52, 131, 0.6);
    border-color: rgba(233, 69, 96, 0.5);
    color: #fff;
}

/* Mikrofon aktiv - rot pulsierend */
.wb-mic-btn.wb-mic-active {
    background: rgba(233, 69, 96, 0.6);
    border-color: #e94560;
    color: #fff;
    animation: wb-mic-pulse 1.2s infinite;
}

@keyframes wb-mic-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(233,69,96,0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(233,69,96,0);
    }
}

/* =========================================
   Verstecke 3D-Viewer spezifische Panels
   solange der 3D Modus (mode-3d) inaktiv ist
   ========================================= */
body:not(.mode-3d) #measurement-panel,
body:not(.mode-3d) #draw-panel {
    display: none !important;
}