.tools-wait-overlay {
    position: fixed;
    inset: 0;
    z-index: 10070;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(6, 29, 52, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        visibility 0.28s ease,
        background-color 0.28s ease,
        backdrop-filter 0.28s ease,
        -webkit-backdrop-filter 0.28s ease;
}

.tools-wait-overlay[hidden] {
    display: none !important;
}

.tools-wait-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: rgba(6, 29, 52, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tools-wait-overlay.is-hiding {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(6, 29, 52, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
}

.tools-wait-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(196px, 72vw);
    padding: 26px 22px 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 0%, rgba(117, 225, 213, 0.16), transparent 58%),
        linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
    box-shadow:
        0 22px 54px rgba(9, 34, 63, 0.24),
        0 0 0 1px rgba(11, 154, 142, 0.08);
    text-align: center;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition:
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease;
}

.tools-wait-overlay.is-visible .tools-wait-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.tools-wait-overlay.is-hiding .tools-wait-card {
    transform: scale(0.94) translateY(8px);
    opacity: 0;
    transition-duration: 0.22s;
}

.tools-wait-orbit {
    position: relative;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
}

.tools-wait-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #0b9a8e, #5dd4c8 28%, #d7ece8 42%, transparent 58%, #0b9a8e 100%);
    animation: tools-wait-orbit-spin 1.15s linear infinite;
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}

.tools-wait-orbit-glow {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 154, 142, 0.14) 0%, rgba(11, 154, 142, 0) 72%);
    animation: tools-wait-glow-pulse 1.8s ease-in-out infinite;
}

.tools-wait-clock {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(180deg, #0b4965 0%, #087f78 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 18px rgba(8, 127, 120, 0.28);
}

.tools-wait-seconds {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease;
}

.tools-wait-seconds.is-tick {
    animation: tools-wait-second-pop 0.32s ease;
}

.tools-wait-label {
    color: #0b3553;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    max-width: 16ch;
}

.tools-wait-hint {
    color: #6a8291;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.tools-wait-dots {
    display: inline-flex;
    gap: 4px;
    min-height: 6px;
}

.tools-wait-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #87c9c0;
    animation: tools-wait-dot-bounce 1.1s ease-in-out infinite;
}

.tools-wait-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.tools-wait-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes tools-wait-orbit-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes tools-wait-glow-pulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.96);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

@keyframes tools-wait-second-pop {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.14);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes tools-wait-dot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .tools-wait-card {
        width: min(188px, 78vw);
        padding: 24px 20px 20px;
        border-radius: 24px;
    }

    .tools-wait-orbit {
        width: 82px;
        height: 82px;
    }

    .tools-wait-clock {
        width: 58px;
        height: 58px;
    }

    .tools-wait-seconds {
        font-size: 18px;
    }

    .tools-wait-label {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tools-wait-overlay,
    .tools-wait-card,
    .tools-wait-seconds {
        transition: none;
    }

    .tools-wait-orbit-ring,
    .tools-wait-orbit-glow,
    .tools-wait-dots span,
    .tools-wait-seconds.is-tick {
        animation: none;
    }

    .tools-wait-overlay.is-visible .tools-wait-card {
        transform: none;
        opacity: 1;
    }
}
