/**
 * Preloader Styles - PickSMS
 * Brand Color: Blue (#6366F1)
 */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.preloader-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
}

.preloader-logo-icon::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-top-color: transparent;
    border-right-color: transparent;
    border-radius: 50%;
    position: absolute;
    animation: lockRotate 2s linear infinite;
}

.preloader-logo-icon::after {
    content: '';
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preloader-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preloader-brand-name {
    font-size: 32px;
    font-weight: 700;
    color: #3B82F6;
    letter-spacing: -0.5px;
}

.preloader-brand-suffix {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.preloader-brand-cursor {
    display: inline-block;
    width: 3px;
    height: 32px;
    background: #3B82F6;
    margin-left: 4px;
    animation: blink 1s infinite;
}

.preloader-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.preloader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3B82F6;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.preloader-dot:nth-child(1) {
    animation-delay: 0s;
    opacity: 1;
}

.preloader-dot:nth-child(2) {
    animation-delay: 0.2s;
    opacity: 0.8;
}

.preloader-dot:nth-child(3) {
    animation-delay: 0.4s;
    opacity: 0.6;
}

.preloader-dot:nth-child(4) {
    animation-delay: 0.6s;
    opacity: 0.4;
}

.preloader-dot:nth-child(5) {
    animation-delay: 0.8s;
    opacity: 0.2;
}

.preloader-text {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@keyframes lockRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .preloader-logo {
        gap: 10px;
        margin-bottom: 24px;
    }
    
    .preloader-logo-icon {
        width: 48px;
        height: 48px;
    }
    
    .preloader-brand-name,
    .preloader-brand-suffix {
        font-size: 24px;
    }
    
    .preloader-brand-cursor {
        height: 24px;
        width: 2px;
    }
    
    .preloader-dot {
        width: 8px;
        height: 8px;
    }
    
    .preloader-text {
        font-size: 12px;
    }
}
