/* SOU TOP | Modal de instalação PWA v1.0.0
 * CSS isolado: não modifica header, câmera, players ou CSS globais.
 */
#soutopPwaOverlay[hidden],
#soutopPwaOverlay [hidden] {
    display: none !important;
}

#soutopPwaOverlay,
#soutopPwaOverlay * {
    box-sizing: border-box;
}

#soutopPwaOverlay {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, .84);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    color: #fff;
    isolation: isolate;
    overscroll-behavior: contain;
    font-family: 'Poppins', Inter, system-ui, -apple-system, sans-serif;
}

#soutopPwaOverlay .soutop-pwa-dialog {
    position: relative;
    display: block;
    width: min(100%, 440px);
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px;
    background: #14171c;
    color: #fff;
    box-shadow: 0 28px 92px rgba(0, 0, 0, .7);
    -webkit-overflow-scrolling: touch;
    animation: soutopPwaAppear .28s cubic-bezier(.2,.7,.25,1) both;
}

@keyframes soutopPwaAppear {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#soutopPwaOverlay .soutop-pwa-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #cfd2d7;
    font: 400 26px/1 Arial, sans-serif;
    cursor: pointer;
}

#soutopPwaOverlay .soutop-pwa-close:hover,
#soutopPwaOverlay .soutop-pwa-close:focus-visible {
    background: #303239;
    color: #fff;
}

#soutopPwaOverlay .soutop-pwa-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 183px;
    padding: 27px 28px 18px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 70% 14%, rgba(255,204,0,.14), transparent 46%),
        linear-gradient(150deg, #090b0e 8%, #1a1c20 100%);
    border-bottom: 1px solid rgba(255,255,255,.07);
}

#soutopPwaOverlay .soutop-pwa-brand-glow {
    position: absolute;
    top: -68px;
    left: 20%;
    width: 60%;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,204,0,.13);
    filter: blur(48px);
    pointer-events: none;
}

#soutopPwaOverlay .soutop-pwa-logo {
    position: relative;
    display: block;
    width: min(77%, 300px);
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    object-fit: contain;
    margin: 0;
    filter: drop-shadow(0 7px 18px rgba(0, 0, 0, .4));
}

#soutopPwaOverlay .soutop-pwa-brand-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    color: #aeb4bc;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
}

#soutopPwaOverlay .soutop-pwa-brand-tag span {
    color: #ffcc00;
    font-size: 13px;
}

#soutopPwaOverlay .soutop-pwa-content {
    padding: 25px 28px 27px;
    text-align: center;
}

#soutopPwaOverlay .soutop-pwa-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: #ffcc00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .17em;
}

#soutopPwaOverlay .soutop-pwa-content h2 {
    margin: 0 0 11px;
    color: #fff;
    font-size: clamp(20px, 5vw, 25px);
    font-weight: 800;
    line-height: 1.26;
    letter-spacing: -.035em;
}

#soutopPwaOverlay .soutop-pwa-content p {
    margin: 0;
    color: #aeb4bc;
    font-size: 12.5px;
    line-height: 1.7;
    font-weight: 400;
}

#soutopPwaOverlay .soutop-pwa-benefits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 20px 0 23px;
}

#soutopPwaOverlay .soutop-pwa-benefits span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e3e6;
    font-size: 11.5px;
    line-height: 1.5;
}

#soutopPwaOverlay .soutop-pwa-benefits i {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255,204,0,.13);
    color: #ffcc00;
    font: 700 10px/1 system-ui, sans-serif;
}

#soutopPwaOverlay .soutop-pwa-install,
#soutopPwaOverlay .soutop-pwa-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 49px;
    padding: 12px 15px;
    border-radius: 13px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

#soutopPwaOverlay .soutop-pwa-install {
    border: 0;
    color: #111;
    background: #ffcc00;
    box-shadow: 0 8px 25px rgba(255,204,0,.14);
}

#soutopPwaOverlay .soutop-pwa-install:hover {
    background: #ffda46;
}

#soutopPwaOverlay .soutop-pwa-install:active,
#soutopPwaOverlay .soutop-pwa-continue:active {
    transform: scale(.99);
}

#soutopPwaOverlay .soutop-pwa-install-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid currentColor;
    border-radius: 6px;
    font: 900 15px/1 system-ui, sans-serif;
}

#soutopPwaOverlay .soutop-pwa-continue {
    margin-top: 8px;
    min-height: 42px;
    border: 1px solid rgba(255,255,255,.12);
    color: #d3d5d9;
    background: #22262b;
    font-weight: 600;
}

#soutopPwaOverlay .soutop-pwa-continue:hover {
    background: #2c3035;
}

#soutopPwaOverlay button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

#soutopPwaOverlay .soutop-pwa-manual {
    margin-top: 19px;
    text-align: left;
}

#soutopPwaOverlay .soutop-pwa-manual h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
}

#soutopPwaOverlay .soutop-pwa-manual ol {
    margin: 9px 0 16px;
    padding-left: 21px;
    color: #d3d5d9;
    font-size: 12px;
    line-height: 1.8;
}

#soutopPwaOverlay .soutop-pwa-manual li {
    padding-left: 4px;
    margin-bottom: 5px;
}

#soutopPwaOverlay .soutop-pwa-manual .soutop-pwa-manual-note {
    margin-bottom: 17px;
    font-size: 11px;
    color: #8f98a3;
}

@media (max-width: 420px) {
    #soutopPwaOverlay { padding: 12px; }
    #soutopPwaOverlay .soutop-pwa-dialog {
        border-radius: 19px;
        max-height: calc(100dvh - 24px);
    }
    #soutopPwaOverlay .soutop-pwa-brand {
        min-height: 160px;
        padding: 24px 18px 13px;
    }
    #soutopPwaOverlay .soutop-pwa-content { padding: 21px 20px 23px; }
}

@media (prefers-reduced-motion: reduce) {
    #soutopPwaOverlay .soutop-pwa-dialog { animation: none; }
    #soutopPwaOverlay .soutop-pwa-install,
    #soutopPwaOverlay .soutop-pwa-continue { transition: none; }
}
