/* Add Arrows Tool Styles */

.preview-container {
    position: relative;
    background: #1a1d29;
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas-container {
    position: relative;
    width: 100%;
}

#preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Annotation Elements */
.annotation-element {
    position: absolute;
    cursor: move;
    user-select: none;
}

.annotation-element.selected {
    z-index: 100;
}

/* Arrow Element */
.arrow-element {
    pointer-events: none;
}

.arrow-element svg {
    pointer-events: all;
    overflow: visible;
}

/* Text Element */
.text-element {
    padding: 5px 10px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    white-space: nowrap;
    min-width: 50px;
    border: 2px dashed transparent;
    border-radius: 4px;
}

.text-element.selected {
    border-color: var(--primary-color);
}

.text-element input {
    background: transparent;
    border: none;
    outline: none;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    font-family: inherit;
    width: 100%;
    min-width: 100px;
}

.text-element input::placeholder {
    opacity: 0.5;
}

/* Control Dots */
.control-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: 101;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.control-dot:hover {
    background: var(--primary-color);
}

.control-dot.start-dot {
    cursor: grab;
}

.control-dot.end-dot {
    cursor: grab;
}

.control-dot.resize-dot {
    cursor: nwse-resize;
}

/* Color Quick Buttons */
.color-quick-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: transform 0.2s ease;
}

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

/* Color Input */
#element-color {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

/* Editor Controls */
.editor-controls {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-group {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tool-group .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .control-dot {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .tool-group .btn {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
    
    .color-quick-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
