/**
 * PWA update overlay — zero React/Emotion dependency.
 * Tokens aligned with AppCrashFallback + root.css rem baseline (375 design width).
 */

/* fill/layer — light: White.white #FFFFFF */
html:not([data-theme="dark"]) #pwa-update-overlay {
    --pwa-fill-layer: #ffffff;
    --pwa-text-primary: #ff3546;
    --pwa-text-disable: #b2b7c7;
    --pwa-text: #353845;
}

/* fill/layer — dark: Secondary-950 #23252E (opaque full-screen, same intent as error page) */
html[data-theme="dark"] #pwa-update-overlay {
    --pwa-fill-layer: #23252e;
    --pwa-text-primary: #d92338;
    --pwa-text-disable: rgba(255, 255, 255, 0.3);
    --pwa-text: rgba(255, 255, 255, 0.8);
}

#pwa-update-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: none;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--app-max-width);
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100 * var(--vh));
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24rem 20rem;
    background-color: var(--pwa-fill-layer);
    pointer-events: auto;
    font-family: Gilroy, sans-serif;
}

#pwa-update-overlay.is-visible {
    display: flex;
}

body.pwa-update-open {
    overflow: hidden;
}

.pwa-update-title {
    margin: 20rem 0 8rem;
    font-size: 18rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: var(--pwa-text-primary);
}

.pwa-update-desc {
    margin: 0;
    font-size: 14rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    color: var(--pwa-text-disable);
}

.pwa-update-guide {
    margin: 12rem 0 24rem;
    font-size: 14rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    color: var(--pwa-text);
}

.pwa-update-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280rem;
}

/* ButtonV2 primary: 44rem height, brand #FF3546 */
.pwa-update-btn {
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    height: 44rem;
    border: none;
    border-radius: 44rem;
    background-color: #ff3546;
    font-family: inherit;
    font-size: 16rem;
    font-weight: 600;
    line-height: 44rem;
    text-align: center;
    color: #ffffff;
    cursor: pointer;
}

.pwa-update-btn:disabled,
.pwa-update-btn.is-applying {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}
