#timeout[hidden] {
    display: none !important;
}

#timeout {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

#timeout .dialog {
    background: #ffffff;
    width: calc(100% - 3rem);
    max-width: 30rem;
    padding: 1.75rem 2rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

#timeout .dialog.visible {
    opacity: 1;
    transform: translateY(0);
}

#timeout .center {
    text-align: center;
}

#timeout h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

#timeout .intro {
    margin: 0 0 1.25rem;
    color: #444;
    font-size: 1rem;
}

#timeout .timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.25rem;
}

#timeout .label {
    margin-top: 0.75rem;
    color: #555;
}

#timeout .timer-circle {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background:
        conic-gradient(#0069d9 var(--progress, 0deg), #e5e7eb 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

/* inner white circle so it looks like a ring */
#timeout .timer-circle::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #ffffff;
}

#timeout .timer-circle span {
    z-index: 1;
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
}

/* pulse animation for the circle */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 105, 217, 0.55)
    }

    70% {
        box-shadow: 0 0 0 8px rgba(0, 105, 217, 0)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 105, 217, 0)
    }
}

#timeout .actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#timeout button {
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    #timeout .dialog,
    #timeout .timer-circle {
        animation: none !important;
        transition: none !important
    }
}