/* GHWL Design Studio - Editor & Interactive Canvas Stylesheet */

/* Selected Element Bounding Box & Handles */
.canvas-element {
    position: absolute;
    cursor: move;
    user-select: none;
    transition: outline 0.1s ease;
}

.canvas-element:hover {
    outline: 1px dashed var(--primary-color);
}

.canvas-element.selected {
    outline: 2px solid var(--primary-color);
    z-index: 1000;
}

/* Resize & Rotate Handles */
.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFFFFF;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1001;
}

.resize-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.resize-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.resize-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.resize-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.rotate-handle {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: grab;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 10px;
}

.rotate-handle:active {
    cursor: grabbing;
}

/* Smart Snap Guides */
.snap-guide-h {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #3B82F6;
    pointer-events: none;
    z-index: 9999;
}

.snap-guide-v {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #3B82F6;
    pointer-events: none;
    z-index: 9999;
}

/* Layers List Item Styling */
.layer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.layer-item:hover {
    background: #F1F5F9;
}

.layer-item.active {
    border-color: var(--primary-color);
    background: #FFF5F5;
}

.layer-actions {
    display: flex;
    gap: 6px;
}

.layer-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: #64748B;
}

.layer-btn:hover {
    color: var(--text-color);
}