﻿body.ai-processing
{
    overflow: hidden !important;
}

/* Nền màu ghi xám nhẹ */
#divProcess.ai-loading-overlay
{
    display: none;
    position: fixed !important;
    z-index: 2147483647 !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    background-color: rgba(224, 226, 229, 0.76) !important;

    background-image: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.40) 0%,
        rgba(238, 239, 241, 0.15) 48%,
        rgba(216, 219, 223, 0.05) 100%
    ) !important;

    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* Khung chính */
#divProcess .ai-loading-card
{
    display: block !important;
    position: absolute !important;

    top: 50% !important;
    left: 50% !important;

    width: 330px !important;
    min-width: 330px !important;
    max-width: 330px !important;
    min-height: 265px !important;

    margin: 0 !important;
    padding: 25px 25px 22px 25px !important;

    overflow: visible !important;
    box-sizing: border-box !important;
    text-align: center !important;

    border: 1px solid rgba(255, 255, 255, 0.92) !important;
    border-radius: 22px !important;

    background-color: rgba(255, 255, 255, 0.92) !important;

    background-image: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.97),
        rgba(247, 250, 253, 0.93)
    ) !important;

    /* Bóng đã được làm nhạt */
    box-shadow:
        0 5px 14px rgba(44, 57, 76, 0.07),
        0 0 10px rgba(85, 185, 233, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;

    font-family: Arial, sans-serif !important;

    -webkit-transform: translate(-50%, -50%) !important;
    transform: translate(-50%, -50%) !important;

    animation: aiCardShow 0.35s ease-out;
}

/* Vùng biểu tượng AI */
#divProcess .ai-hologram
{
    display: block !important;
    position: relative !important;

    width: 126px !important;
    height: 126px !important;

    margin: 0 auto 15px auto !important;
    padding: 0 !important;
}

/* Hai vòng năng lượng */
#divProcess .ai-orbit
{
    display: block !important;
    position: absolute !important;

    top: 50% !important;
    left: 50% !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 50% !important;
    box-sizing: border-box !important;
}

/* Vòng ngoài */
#divProcess .ai-orbit-outer
{
    width: 122px !important;
    height: 122px !important;

    margin-top: -61px !important;
    margin-left: -61px !important;

    border-width: 2px !important;
    border-style: solid !important;

    border-top-color: #4267B2 !important;
    border-right-color: transparent !important;
    border-bottom-color: #62C8F2 !important;
    border-left-color: transparent !important;

    box-shadow:
        0 0 8px rgba(85, 185, 233, 0.26),
        inset 0 0 8px rgba(85, 185, 233, 0.08) !important;

    animation: aiRotate 3.2s linear infinite;
}

/* Vòng trong */
#divProcess .ai-orbit-inner
{
    width: 100px !important;
    height: 100px !important;

    margin-top: -50px !important;
    margin-left: -50px !important;

    border: 1px dashed rgba(66, 103, 178, 0.52) !important;

    animation: aiRotateReverse 5s linear infinite;
}

/* Lõi AI */
#divProcess .ai-core
{
    display: block !important;
    position: absolute !important;

    top: 50% !important;
    left: 50% !important;

    width: 76px !important;
    height: 76px !important;

    margin-top: -38px !important;
    margin-left: -38px !important;
    padding: 0 !important;

    border: 2px solid rgba(255, 255, 255, 0.88) !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;

    background-color: #4267B2 !important;

    background-image: radial-gradient(
        circle at 35% 30%,
        #96E2FA 0%,
        #55B9E9 28%,
        #4267B2 70%,
        #294E9B 100%
    ) !important;

    box-shadow:
        0 0 12px rgba(66, 103, 178, 0.50),
        0 0 23px rgba(85, 185, 233, 0.35),
        inset 0 0 12px rgba(255, 255, 255, 0.25) !important;

    animation: aiCorePulse 1.7s ease-in-out infinite;
}

/* Vòng sáng trong lõi */
#divProcess .ai-core:before
{
    content: "";
    display: block;
    position: absolute;

    top: 7px;
    right: 7px;
    bottom: 7px;
    left: 7px;

    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
}

/* Ánh sáng phản chiếu */
#divProcess .ai-core:after
{
    content: "";
    display: block;
    position: absolute;

    top: 8px;
    left: 13px;

    width: 25px;
    height: 14px;

    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.28);

    -webkit-transform: rotate(-22deg);
    transform: rotate(-22deg);
}

/* Chữ AI */
#divProcess .ai-core-text
{
    display: block !important;
    position: relative !important;
    z-index: 2 !important;

    width: 72px !important;
    height: 72px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #ffffff !important;
    font-family: Arial, sans-serif !important;
    font-size: 24px !important;
    font-weight: bold !important;
    line-height: 72px !important;
    letter-spacing: 1px !important;
    text-align: center !important;

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 0 5px rgba(255, 255, 255, 0.50) !important;
}

/* Các nút sáng */
#divProcess .ai-node
{
    display: block !important;
    position: absolute !important;
    z-index: 5 !important;

    width: 8px !important;
    height: 8px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 2px solid #ffffff !important;
    border-radius: 50% !important;

    background-color: #66D5FA !important;

    box-shadow:
        0 0 4px #ffffff,
        0 0 7px rgba(85, 185, 233, 0.75) !important;

    animation: aiNodePulse 1.3s ease-in-out infinite;
}

#divProcess .ai-node-1
{
    top: 1px !important;
    left: 9px !important;
}

#divProcess .ai-node-2
{
    top: 7px !important;
    right: 4px !important;
    animation-delay: 0.25s;
}

#divProcess .ai-node-3
{
    right: 0 !important;
    bottom: 12px !important;
    animation-delay: 0.5s;
}

#divProcess .ai-node-4
{
    bottom: 4px !important;
    left: 8px !important;
    animation-delay: 0.75s;
}

/* Tiêu đề */
#divProcess .ai-loading-title
{
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #4267b2 !important;
    font-family: Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 27px !important;
    letter-spacing: 0.2px !important;
    text-align: center !important;
    white-space: nowrap !important;

    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.90) !important;

    animation: aiTitlePulse 1.8s ease-in-out infinite;
}

/* Dòng mô tả */
#divProcess .ai-loading-subtitle
{
    display: block !important;

    margin: 4px 0 0 0 !important;
    padding: 0 !important;

    color: #737E8E !important;
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: normal !important;
    line-height: 20px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Ba dấu chấm */
#divProcess .ai-loading-dots
{
    display: inline-block !important;
    width: 20px !important;
    text-align: left !important;
}

#divProcess .ai-loading-dots span
{
    display: inline-block !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #4267B2 !important;
    font-size: 16px !important;
    font-weight: bold !important;

    animation: aiDotShow 1.4s infinite;
}

#divProcess .ai-loading-dots span:nth-child(2)
{
    animation-delay: 0.2s;
}

#divProcess .ai-loading-dots span:nth-child(3)
{
    animation-delay: 0.4s;
}

/* Thanh tiến trình */
#divProcess .ai-progress
{
    display: block !important;
    position: relative !important;

    width: 220px !important;
    height: 4px !important;

    margin: 15px auto 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;

    border-radius: 4px !important;
    background-color: rgba(66, 103, 178, 0.12) !important;
}

/* Ánh sáng chạy trên thanh tiến trình */
#divProcess .ai-progress-light
{
    display: block !important;
    position: absolute !important;

    top: 0 !important;
    left: -45%;

    width: 45% !important;
    height: 4px !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 4px !important;

    background-color: #55B9E9 !important;

    background-image: linear-gradient(
        90deg,
        transparent,
        #55B9E9,
        #4267B2,
        #55B9E9,
        transparent
    ) !important;

    box-shadow: 0 0 5px rgba(85, 185, 233, 0.60) !important;

    animation: aiProgressMove 1.7s ease-in-out infinite;
}

@keyframes aiCardShow
{
    from
    {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.94);
    }

    to
    {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes aiRotate
{
    from
    {
        transform: rotate(0deg);
    }

    to
    {
        transform: rotate(360deg);
    }
}

@keyframes aiRotateReverse
{
    from
    {
        transform: rotate(360deg);
    }

    to
    {
        transform: rotate(0deg);
    }
}

@keyframes aiCorePulse
{
    0%,
    100%
    {
        transform: scale(1);

        box-shadow:
            0 0 12px rgba(66, 103, 178, 0.48),
            0 0 22px rgba(85, 185, 233, 0.32),
            inset 0 0 12px rgba(255, 255, 255, 0.25);
    }

    50%
    {
        transform: scale(1.06);

        box-shadow:
            0 0 15px rgba(66, 103, 178, 0.60),
            0 0 29px rgba(85, 185, 233, 0.45),
            inset 0 0 15px rgba(255, 255, 255, 0.32);
    }
}

@keyframes aiNodePulse
{
    0%,
    100%
    {
        opacity: 0.45;
        transform: scale(0.75);
    }

    50%
    {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes aiTitlePulse
{
    0%,
    100%
    {
        color: #315A9D;
    }

    50%
    {
        color: #38A9DF;
    }
}

@keyframes aiDotShow
{
    0%,
    20%
    {
        opacity: 0;
        transform: translateY(2px);
    }

    45%,
    100%
    {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes aiProgressMove
{
    0%
    {
        left: -45%;
    }

    100%
    {
        left: 105%;
    }
}

/* Thời gian xử lý */
#divProcess .ai-processing-time
{
    display: block !important;

    margin: 6px 0 0 0 !important;
    padding: 0 !important;

    color: #7A8492 !important;
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: normal !important;
    line-height: 18px !important;
    text-align: center !important;
}

/* Giá trị thời gian */
#divProcess #aiProcessingTime
{
    display: inline-block !important;

    min-width: 48px !important;
    margin-left: 3px !important;

    color: #4267B2 !important;
    font-family: Consolas, "Courier New", monospace !important;
    font-size: 13px !important;
    font-weight: bold !important;
    letter-spacing: 0.2px !important;
}

/* Điều chỉnh khoảng cách thanh tiến trình */
#divProcess .ai-progress
{
    margin-top: 10px !important;
}