.pde-ai-loading[hidden] {
    display: none !important;
}

.pde-ai-loading {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(239, 246, 255, 0.84);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17233c;
}

.pde-ai-loading__panel {
    width: min(390px, 100%);
    padding: 30px 26px 25px;
    border: 1px solid rgba(128, 87, 232, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 26px 70px rgba(33, 58, 115, 0.2);
    text-align: center;
}

.pde-ai-loading__orbit {
    position: relative;
    width: 78px;
    height: 78px;
    margin: 0 auto 19px;
    border: 3px solid rgba(52, 120, 239, 0.13);
    border-top-color: #3478ef;
    border-right-color: #8057e8;
    border-radius: 50%;
    animation: pde-ai-orbit 1.05s linear infinite;
}

.pde-ai-loading__orbit::before {
    content: "";
    position: absolute;
    inset: 17px;
    border-radius: 15px;
    background: linear-gradient(135deg, #3478ef, #8057e8);
    box-shadow: 0 8px 20px rgba(52, 120, 239, 0.28);
    transform: rotate(45deg);
}

.pde-ai-loading__orbit::after {
    content: "✦";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 21px;
    animation: pde-ai-counter-orbit 1.05s linear infinite;
}

.pde-ai-loading__title {
    display: block;
    margin: 0;
    color: #1e3f80;
    font-size: 18px;
    line-height: 1.35;
}

.pde-ai-loading__message {
    min-height: 42px;
    margin: 9px 0 0;
    color: #52627a;
    font-size: 14px;
    line-height: 1.5;
}

.pde-ai-loading__elapsed {
    display: block;
    min-height: 18px;
    margin-top: 8px;
    color: #8190a5;
    font-size: 12px;
}

.pde-ai-loading.is-error .pde-ai-loading__orbit {
    animation: none;
    border-color: rgba(198, 55, 79, 0.2);
}

.pde-ai-loading.is-error .pde-ai-loading__orbit::before {
    background: #c6374f;
}

.pde-ai-loading.is-error .pde-ai-loading__orbit::after {
    content: "!";
    animation: none;
    font-weight: 800;
}

@keyframes pde-ai-orbit {
    to { transform: rotate(360deg); }
}

@keyframes pde-ai-counter-orbit {
    to { transform: rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pde-ai-loading__orbit,
    .pde-ai-loading__orbit::after {
        animation-duration: 2.8s;
    }
}
