/* "New version" modal — static/external_scripts/release_check.js.
   Centered over a blurred backdrop. The backdrop takes every click and
   closes nothing; only the quiet × in the corner does. */

.sf-release-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* No scrolling of the old page under the modal. */
body.sf-release-open {
    overflow: hidden;
}

.sf-release-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 28px 28px 24px;
    border: 1px solid #333;
    border-radius: 10px;
    background: #1e1e1e;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    color: #f1f1f1;
    text-align: center;
}

.sf-release-modal__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.sf-release-modal__text {
    margin: 0 0 22px;
    color: #b8b8b8;
    font-size: 14px;
    line-height: 1.5;
}

.sf-release-modal__reload {
    min-width: 140px;
    padding: 9px 22px;
    border: 1px solid #ffc107;
    border-radius: 6px;
    background: #ffc107;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sf-release-modal__reload:hover {
    background: #ffcd38;
}

/* Present, but easy to miss on purpose. */
.sf-release-modal__close {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #4a4a4a;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.sf-release-modal__close:hover {
    color: #6a6a6a;
}

/* Desktop: up to 40% of the window. */
@media (min-width: 992px) {
    .sf-release-modal {
        max-width: 40vw;
    }
}

/* Phones: full width with a margin, bigger tap targets. The × keeps its
   faint colour but gets a finger-sized hit area. */
@media (max-width: 576px) {
    .sf-release-overlay {
        padding: max(12px, env(safe-area-inset-top)) 12px
                 max(12px, env(safe-area-inset-bottom));
    }

    .sf-release-modal {
        max-width: none;
        padding: 24px 18px 18px;
        border-radius: 12px;
    }

    .sf-release-modal__title {
        font-size: 18px;
    }

    .sf-release-modal__text {
        margin-bottom: 18px;
    }

    .sf-release-modal__reload {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .sf-release-modal__close {
        top: 2px;
        right: 2px;
        padding: 10px 12px;
    }
}
