/* Drawing Controls Toolbar */
.drawing-toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.drawing-toolbar h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.drawing-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-group label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

.tool-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.tool-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tool-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.tool-btn.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.toggle-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.toggle-btn.off {
    background: #28a745;
    color: white;
}

.toggle-btn.on {
    background: #dc3545;
    color: white;
}

.toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-picker {
    width: 100%;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.stroke-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.stroke-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

.stroke-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.action-btn {
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e9ecef;
}

.action-btn.danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.action-btn.danger:hover {
    background: #f1b0b7;
}

.stroke-value {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 2px;
}

/* Drawing layer styles */
.drawing-layer {
    pointer-events: none;
}

.drawing-layer.active {
    pointer-events: all;
}

.drawing-paths path {
    cursor: crosshair;
}

.drawing-shapes circle,
.drawing-shapes rect {
    cursor: crosshair;
}

.drawing-text text {
    cursor: pointer;
    user-select: none;
}

/* Toolbar toggle button */
.toolbar-toggle-btn {
    position: fixed;
    top: 20px;
    right: 240px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #007bff;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-toggle-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.toolbar-toggle-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drawing-toolbar {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .toolbar-toggle-btn {
        top: 10px;
        right: 10px;
        left: auto;
    }
    
    .tool-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}
