/*--------------------------------------------------------------
    DailyLeaf Mascot Preloader
--------------------------------------------------------------*/

.pre-loader {
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999999;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease, visibility 0.35s ease !important;
    animation: dailyleafAutoDismissPreloader 0.5s ease 0.8s forwards !important;
}

.pre-loader.loaded,
.pre-loader.dismissed {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

@keyframes dailyleafAutoDismissPreloader {
    0%, 75% {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    95% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        display: none !important;
    }
}

.pre-loader .wdt-pre-loader-container {
    height: auto;
    width: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* DailyLeaf Running Leaf Mascot Animation */
.dailyleaf-mascot-preloader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dailyleaf-loader-mascot-img {
    width: 135px;
    height: auto;
    display: block;
    animation: dailyleafMascotRun 0.75s ease-in-out infinite alternate;
    filter: drop-shadow(0 12px 18px rgba(0, 180, 50, 0.22));
    user-select: none;
    -webkit-user-drag: none;
}

.dailyleaf-loader-shadow {
    width: 90px;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0) 75%);
    border-radius: 50%;
    margin-top: 10px;
    animation: dailyleafMascotShadow 0.75s ease-in-out infinite alternate;
}

.dailyleaf-loader-text {
    margin-top: 16px;
    font-family: 'Rowdies', cursive, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dailyleaf-loader-text span {
    color: #03B04A;
    font-size: 26px;
    animation: dailyleafDotBlink 1.4s infinite;
}

.dailyleaf-loader-text span:nth-child(1) { animation-delay: 0.0s; }
.dailyleaf-loader-text span:nth-child(2) { animation-delay: 0.2s; }
.dailyleaf-loader-text span:nth-child(3) { animation-delay: 0.4s; }

/* Running / Bouncing Animation for Mascot */
@keyframes dailyleafMascotRun {
    0% {
        transform: translateY(0) rotate(-4deg) scale(1, 1);
    }
    50% {
        transform: translateY(-16px) rotate(3deg) scale(0.97, 1.03);
    }
    100% {
        transform: translateY(-24px) rotate(-3deg) scale(1.02, 0.98);
    }
}

@keyframes dailyleafMascotShadow {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.65);
        opacity: 0.3;
    }
}

@keyframes dailyleafDotBlink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Fallback for old Ice Cube elements if present */
.wdt-pre-loader-ice-cube,
.wdt-pre-loader-ice-cube-stick,
.wdt-pre-loader-ice-cube-shadow {
    display: none !important;
}
