/* 
   🍽️ Modern Restaurant Website Template
   Animations stylesheet - animations.css
*/

/* --- Loading Spinner Screen --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(192, 57, 43, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    position: relative;
}

.spinner::after {
    content: '🍽️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 900;
    box-shadow: var(--box-shadow-sm);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-color);
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-md);
}

/* --- Floating WhatsApp Chat Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #25D366;
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 900;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    color: var(--light-color);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.4;
    z-index: -1;
    animation: wave 2s infinite ease-out;
}

@keyframes wave {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* --- Micro-interactions & Custom Hover Effects --- */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.glass-panel-dark {
    background: rgba(44, 62, 80, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Fade In / Zoom Transitions for components --- */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

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