/* App Factory Loader - Build Up Sequential Animation */
/* ================================================== */

/* Main Loader Container */
.app-factory-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    /* padding: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); */
}

body.light-theme .app-factory-loader {
    background: white;
    border-color: #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Logo Container */
.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Buildings Container */
.buildings {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 80px;
}

.building {
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transform-origin: bottom;
    animation: buildUp 3s ease-in-out infinite;
}

/* Window effect on top of buildings */
.building::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Building Sizes and Colors */
.building-1 {
    width: 35px;
    height: 55px;
    background: #dc2626;
    animation-delay: 0s;
}

.building-2 {
    width: 35px;
    height: 70px;
    background: #b91c1c;
    animation-delay: 0.3s;
}

.building-3 {
    width: 35px;
    height: 60px;
    background: #991b1b;
    animation-delay: 0.6s;
}

/* Build Up Animation */
@keyframes buildUp {
    0% {
        transform: scaleY(0.6);
        /* opacity: 0; */
    }

    20% {
        transform: scaleY(1);
        opacity: 1;
    }

    80% {
        transform: scaleY(1);
        opacity: 1;
    }

    100% {
        transform: scaleY(0.6);
        /* opacity: 0; */
    }
}

/* Logo Text */
.logo-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.logo-text .app {
    font-size: 3em;
    font-weight: 800;
    color: #dc2626;
    line-height: 0.9;
    padding-bottom: 0px;
}

.logo-text .factory {
    font-size: 3em;
    font-weight: 300;
    color: white;
    line-height: 0.9;
    padding-bottom: 0px;
}

body.light-theme .logo-text .factory {
    color: #1e293b;
}

/* Loading Dots */
/* .loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
} */

/* .dot {
    width: 12px;
    height: 12px;
    background: #dc2626;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
} */

/* Responsive Design */
@media (max-width: 768px) {
    .app-factory-loader {
        padding: 40px 30px;
    }

    .logo-text .app,
    .logo-text .factory {
        font-size: 2em;
    }

    .building-1,
    .building-2,
    .building-3 {
        width: 28px;
    }

    .building-1 {
        height: 44px;
    }

    .building-2 {
        height: 56px;
    }

    .building-3 {
        height: 48px;
    }
}

/* Optional: Fullscreen overlay version */
.app-factory-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

body.light-theme .app-factory-loader-overlay {
    background: rgba(248, 250, 252, 0.95);
}

/* Fade in/out for overlay */
.app-factory-loader-overlay.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.app-factory-loader-overlay.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}