@import url("pde-resource-inline-attributes.css");
.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-radius: 50%;
}

.pde-ai-loading__orbit-ring {
    position: absolute;
    inset: 0;
    display: block;
    border: 3px solid rgba(52, 120, 239, 0.13);
    border-radius: 50%;
    animation: pde-ai-orbit 1.05s linear infinite;
}

.pde-ai-loading__orbit-ring::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(
        transparent 0deg 220deg,
        rgba(52, 120, 239, 0.04) 245deg,
        rgba(52, 120, 239, 0.75) 285deg,
        #3478ef 320deg,
        rgba(128, 87, 232, 0.18) 342deg,
        transparent 350deg 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
    z-index: 1;
}

.pde-ai-loading__orbit-ring::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8057e8;
    box-shadow: 0 0 0 4px rgba(128, 87, 232, 0.13);
    transform: translateX(-50%);
    z-index: 2;
}

.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;
}

.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;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.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-ring {
    animation: none;
    border-color: rgba(198, 55, 79, 0.2);
}

.pde-ai-loading.is-error .pde-ai-loading__orbit-ring::after {
    display: none;
}

.pde-ai-loading.is-error .pde-ai-loading__orbit-ring::before {
    display: none;
}

.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); }
}

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