/* ═══ Atelier AI — Custom Styles ═══ */

/* ── Optimized animations with hardware acceleration ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
    will-change: opacity, transform;
}

/* Coming Soon Modal Animation */
@keyframes fadeOut {
    from { opacity: 1; visibility: visible; }
    to { opacity: 0; visibility: hidden; }
}

#coming-soon-overlay.hidden {
    animation: fadeOut 0.3s ease-out forwards;
}

/* ── Performance optimization: GPU acceleration for scrolling ── */
#chat-messages {
    will-change: scroll-position;
}

/* ── Optimized scrollbar styling ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    will-change: background;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Org tree collapse */
.org-node.collapsed > .children-container {
    display: none;
}
.org-node.collapsed .collapse-icon {
    transform: rotate(-90deg);
    will-change: transform;
}

/* Drop zone active state */
#drop-zone.drag-over {
    border-color: #818cf8;
    background-color: #eef2ff;
}

/* ── Bounce animation with hardware acceleration ── */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.animate-bounce {
    animation: bounce 0.6s ease-in-out infinite;
    will-change: transform;
}

/* ── Performance: Reduce repaints on DOM insertions ── */
#messages-container {
    contain: layout style paint;
}

/* ── Smooth transitions for interactive elements ── */
button,
.transition-colors,
.transition-all {
    will-change: auto;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Prevent layout shift on hover ── */
.hover\:shadow-sm {
    transition: box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

/* ── GPU acceleration for message containers ── */
.bg-slate-50 {
    transform: translateZ(0);
    backface-visibility: hidden;
}
