/* ====== طبقة التغطية (Overlay) ====== */
#lookLoadingOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(237, 228, 211, 0.10);
    backdrop-filter: blur(5px) saturate(115%);
    -webkit-backdrop-filter: blur(5px) saturate(115%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#lookLoadingOverlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#lookLoadingCard {
    position: relative;
    width: min(370px, calc(100vw - 40px));
    min-height: 240px;
    padding: 44px 36px 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 44px;
    background: rgba(237, 228, 211, 0.16);
    box-shadow: 0 40px 100px rgba(23, 23, 23, 0.08), 0 8px 32px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(23, 23, 23, 0.06);
    backdrop-filter: blur(34px) saturate(165%);
    -webkit-backdrop-filter: blur(34px) saturate(165%);
    overflow: hidden;
    isolation: isolate;
}

#lookLoadingCard::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.02) 60%);
    pointer-events: none;
}

/* لا نعرض محتوى الصفحة أثناء اللودر */
body.loader-pending > #app {
    opacity: 0;
    visibility: hidden;
}

body > #app {
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

body:not(.loader-pending) > #app {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease;
}

.loader-eyes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 44px;
    width: 100%;
}

.eye {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #fcf9f5;
    border: 2.5px solid #1a1a1a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: height 0.12s ease, border-radius 0.12s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.iris {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0d5d82;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.1s ease;
    will-change: transform, opacity;
    z-index: 1;
}

.pupil {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0a0a0a;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

.highlight {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    top: 8px;
    right: 8px;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

#loaderEyes.eye-animate .iris {
    animation: lookLoaderAround 2.5s infinite ease-in-out, lookLoaderIrisBlink 2.5s infinite ease-in-out !important;
    animation-play-state: running !important;
}

#loaderEyes.eye-animate .eye {
    animation: lookLoaderBlink 2.5s infinite ease-in-out !important;
    animation-play-state: running !important;
}

#loaderEyes.eye-animate .highlight {
    animation: lookLoaderHighlightBlink 2.5s infinite ease-in-out !important;
    animation-play-state: running !important;
}

@keyframes lookLoaderAround {
    0%, 10% { transform: translate(-50%, -50%) translate(0px, 0px); }
    25%, 40% { transform: translate(-50%, -50%) translate(18px, 0px); }
    50%, 60% { transform: translate(-50%, -50%) translate(0px, 0px); }
    75%, 90% { transform: translate(-50%, -50%) translate(-18px, 0px); }
    100% { transform: translate(-50%, -50%) translate(0px, 0px); }
}

@keyframes lookLoaderIrisBlink {
    0%, 80%, 86%, 100% { opacity: 1; }
    82%, 88% { opacity: 0; }
}

@keyframes lookLoaderBlink {
    0%, 80%, 86%, 100% { height: 76px; border-radius: 50%; }
    82%, 88% { height: 6px; border-radius: 40%; border-color: #1a1a1a; }
}

@keyframes lookLoaderHighlightBlink {
    0%, 80%, 86%, 100% { opacity: 1; }
    82%, 88% { opacity: 0; }
}

.loading-text {
    margin-top: 22px;
    color: #4a4036;
    font-weight: 450;
    letter-spacing: 0.6px;
    opacity: 0.55;
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    #lookLoadingOverlay { padding: 16px; }
    #lookLoadingCard {
        width: min(320px, calc(100vw - 32px));
        min-height: 200px;
        padding: 36px 20px 30px;
        border-radius: 34px;
    }
    .loader-eyes { gap: 30px; }
    .eye { width: 64px; height: 64px; border-width: 2px; }
    .iris { width: 36px; height: 36px; }
    .pupil { width: 14px; height: 14px; }
    .highlight { width: 8px; height: 8px; top: 6px; right: 6px; }
    @keyframes lookLoaderBlink {
        0%, 80%, 86%, 100% { height: 64px; }
        82%, 88% { height: 5px; }
    }
    @keyframes lookLoaderAround {
        0%, 10% { transform: translate(-50%, -50%) translate(0px, 0px); }
        25%, 40% { transform: translate(-50%, -50%) translate(14px, 0px); }
        50%, 60% { transform: translate(-50%, -50%) translate(0px, 0px); }
        75%, 90% { transform: translate(-50%, -50%) translate(-14px, 0px); }
        100% { transform: translate(-50%, -50%) translate(0px, 0px); }
    }
}