/* Layer Interaction Animations */

/* Keyframes for sliding in (insertion) */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframes for highlight fade */
@keyframes highlightFade {
    0% {
        background-color: rgba(59, 130, 246, 0.1);
        /* blue-500 with low opacity */
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    }

    100% {
        background-color: white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
}

/* Keyframes for sliding out (removal) */
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 500px;
        /* Arbitrary large height */
        margin-bottom: 10px;
    }

    to {
        opacity: 0;
        transform: translateX(20px);
        max-height: 0;
        margin-bottom: 0;
        padding: 0;
        border: none;
    }
}

/* Classes to apply animations */
.layer-slide-in {
    animation: slideIn 0.4s ease-out forwards;
}

.layer-highlight {
    animation: highlightFade 2s ease-out forwards;
}

.layer-slide-out {
    animation: slideOut 0.4s ease-in forwards;
    overflow: hidden;
    /* Ensure content doesn't spill during collapse */
}

/* Enhanced Find Layers Button Styling */
.find-layers-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.find-layers-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
}

.find-layers-btn sl-icon {
    font-size: 14px;
}