/* ═══════════════════════════════════════════
   Whiteboard Styles
   Media by JP Mercury
   ═══════════════════════════════════════════ */

.whiteboard-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90vw;
    max-width: 1000px;
    height: 80vh;
    max-height: 700px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whiteboard-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.whiteboard-panel.minimized {
    height: auto;
    max-height: none;
}

.whiteboard-panel.minimized .whiteboard-toolbar,
.whiteboard-panel.minimized .whiteboard-canvas-container,
.whiteboard-panel.minimized .whiteboard-status {
    display: none;
}

/* Header */
.whiteboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px 16px 0 0;
    cursor: move;
}

.whiteboard-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whiteboard-header h3 i {
    color: #6366f1;
}

.whiteboard-header-actions {
    display: flex;
    gap: 8px;
}

.wb-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wb-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #f8fafc;
}

/* Toolbar */
.whiteboard-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-divider {
    width: 1px;
    height: 32px;
    background: rgba(148, 163, 184, 0.2);
    margin: 0 4px;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
}

.tool-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.tool-btn.active {
    background: #6366f1;
    color: white;
}

.color-btn {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.size-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.size-btn span {
    background: #94a3b8;
    border-radius: 50%;
    transition: all 0.2s;
}

.size-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.size-btn:hover span {
    background: #a5b4fc;
}

.size-btn.active {
    background: rgba(99, 102, 241, 0.3);
}

.size-btn.active span {
    background: #6366f1;
}

/* Canvas Container */
.whiteboard-canvas-container {
    flex: 1;
    overflow: hidden;
    margin: 12px;
    border-radius: 12px;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

#whiteboardCanvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Status Bar */
.whiteboard-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 0 0 16px 16px;
    font-size: 12px;
    color: #94a3b8;
}

#wbUsers {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #22c55e;
}

/* Responsive */
@media (max-width: 768px) {
    .whiteboard-panel {
        width: 95vw;
        height: 90vh;
        max-height: none;
        top: 5vh;
        left: 2.5vw;
        transform: scale(0.9);
    }
    
    .whiteboard-panel.open {
        transform: scale(1);
    }
    
    .whiteboard-toolbar {
        padding: 10px;
        gap: 8px;
    }
    
    .tool-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .color-btn {
        width: 24px;
        height: 24px;
    }
    
    .toolbar-divider {
        display: none;
    }
}
