/* Text Editor Styles */

/* Text layer styles */
.psd-text-layer {
    cursor: move;
    user-select: none;
    transition: outline 0.2s ease;
    position: relative;
    z-index: 2; /* Ensure text layers are above background but below foreground */
    pointer-events: auto; /* Ensure text layers can be clicked */
}

.psd-text-layer.active-text-layer {
    outline: 2px dashed #4CAF50;
    resize: both;
    overflow: auto !important;
}

/* Text layer edit button */
.text-layer-edit-btn {
    position: absolute;
    top: -20px;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.psd-text-layer:hover .text-layer-edit-btn {
    opacity: 1;
}

/* Text layer toolbar */
.text-layer-toolbar {
    position: absolute;
    top: -40px;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    padding: 5px;
    z-index: 1001;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

.toolbar-btn {
    background: #444;
    color: white;
    border: none;
    border-radius: 3px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin: 0;
}

.toolbar-btn:hover {
    background: #666;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 3px;
}
