/* =============================================
   ANIMATIONS.CSS - Premium UI Animations
   ============================================= */

/* --- Form Slide Down (Tambah Dokumen) --- */
@keyframes slideDownSmooth {
    0% { opacity: 0; max-height: 0; transform: translateY(-30px) scale(0.95); filter: blur(8px); }
    100% { opacity: 1; max-height: 1000px; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes slideUpSmooth {
    0% { opacity: 1; transform: translateY(0) scale(1); max-height: 1000px; filter: blur(0); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.95); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; filter: blur(8px); }
}

.form-slide-enter {
    animation: slideDownSmooth 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}
.form-slide-exit {
    animation: slideUpSmooth 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    overflow: hidden;
}

/* --- Modal Animations --- */
@keyframes modalBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes modalBackdropOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes modalCardIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalCardOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.92) translateY(12px); }
}

.modal-backdrop-enter {
    animation: modalBackdropIn 0.25s ease-out forwards;
}
.modal-backdrop-exit {
    animation: modalBackdropOut 0.2s ease-in forwards;
}
.modal-card-enter {
    animation: modalCardIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.modal-card-exit {
    animation: modalCardOut 0.2s ease-in forwards;
}

/* --- Content Fade (Page Transitions) --- */
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
main {
    animation: contentFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
main.content-fade-out {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease-in, transform 0.25s ease-in;
}

/* --- Notification Badge Pulse --- */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.notif-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

/* --- Stagger Card Animation --- */
@keyframes staggerIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Float animation for login --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.float-anim { animation: float 3s ease-in-out infinite; }

/* --- Bottom Nav for Mobile --- */
.mobile-nav {
    display: none;
}
@media (max-width: 767px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: rgba(15, 23, 42, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,0.1);
        border-radius: 16px 16px 0 0;
        padding: 6px 8px 10px;
        gap: 2px;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.25);
    }
    .mobile-nav a, .mobile-nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 2px;
        border-radius: 12px;
        color: #94a3b8;
        font-size: 9px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.2s;
        background: none;
        border: none;
        cursor: pointer;
        gap: 2px;
    }
    .mobile-nav a:hover, .mobile-nav button:hover,
    .mobile-nav a.active, .mobile-nav button.active {
        color: #fff;
        background: rgba(59, 130, 246, 0.25);
    }
    .mobile-nav i { font-size: 18px; }
    
    /* Add bottom padding for mobile nav */
    body { padding-bottom: 80px !important; }
    
    /* Hide desktop sidebar on mobile */
    aside.desktop-sidebar { display: none !important; }
    
    /* Footer spacing for mobile */
    .footer-bar { margin-bottom: 70px; }
}
