/* ───────────────────────────────────────────────────────────────
   LAYER PANEL
   ─────────────────────────────────────────────────────────────── */

.layer-panel {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px !important;
    margin-bottom: 16px;
}

.layer-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: background-color 0.2s;
    background: var(--bg-tertiary);
}

.layer-item:hover {
    background: var(--surface-2);
}

.layer-controls {
    display: flex;
    gap: 4px;
    margin-right: 12px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-tertiary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    transform: scale(1);
}

.btn-icon:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    transform: scale(1.1);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon.active {
    color: var(--text-primary);
    transform: scale(1);
}

.btn-icon.active svg {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.btn-icon.layer-vis.inactive {
    color: var(--text-tertiary);
    opacity: 0.4;
    transform: scale(0.9);
}

.btn-icon.layer-lock.active {
    color: var(--accent-danger);
    /* Red padlock when locked */
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.layer-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
}