﻿﻿.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    position: fixed;
    margin: 20vh auto;
    z-index: 10000;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: var(--mud-palette-error);
    background: radial-gradient(circle, rgba(244, 67, 54, 1) 0%, rgba(255, 84, 84, 1) 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: modalSlideIn 0.3s ease-out;
}

    #components-reconnect-modal::backdrop {
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(1px);
        animation: backdropFadeIn 0.3s ease-out;
    }

.components-reconnect-container {
    padding: 32px 40px;
    min-width: 320px;
    max-width: 420px;
    text-align: center;
    color: #ffffff;
}

.components-rejoining-animation {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    height: 40px;
    align-items: center;
}

    .components-rejoining-animation div {
        width: 12px;
        height: 12px;
        background: #ffffff;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }

        .components-rejoining-animation div:nth-child(1) {
            animation-delay: -0.32s;
        }

        .components-rejoining-animation div:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.components-reconnect-container p {
    margin: 16px 0;
    font-size: 16px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

p.components-reconnect-first-attempt-visible {
    font-size: 18px;
    font-weight: 600;
}

    p.components-reconnect-first-attempt-visible::before {
        content: '⛓️‍💥';
        display: block;
        font-size: 88px;
        animation: float 5s ease-in-out infinite;
    }

p.components-reconnect-failed-visible::before {
    content: '⚠️';
    display: block;
    font-size: 88px;
}

p.components-pause-visible::before {
    content: '⏸️';
    display: block;
    font-size: 88px;
}

#components-seconds-to-next-attempt {
    display: inline-block;
    min-width: 20px;
    font-weight: 700;
    color: #121212;
}

#components-reconnect-button,
#components-resume-button {
    margin: auto;
    padding: 12px 24px;
    background: #121212;
    color: #ededed;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    #components-reconnect-button:hover,
    #components-resume-button:hover {
        background: #121212 !important;
        background-color: #121212 !important;
    }

button::before,
button::after {
    content: none !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) rotateZ(-2deg);
    }

    50% {
        transform: translateY(-10px) rotate(10deg) rotateZ(2deg);
    }
}

@media (max-width: 480px) {
    .components-reconnect-container {
        padding: 24px 28px;
        min-width: 280px;
    }

        .components-reconnect-container p {
            font-size: 15px;
        }
}