/* =========================================================
   PWA INSTALL MODAL
   ========================================================= */

.pwa-install-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;

    background: rgba(11, 15, 25, 0.75);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 99999;
    padding: 16px;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    animation: pwaFadeIn 0.3s ease-out;
}

.pwa-install-overlay.active {
    display: flex;
}


/* =========================================================
   MODAL CARD
   ========================================================= */

.pwa-install-card {
    position: relative;

    width: 100%;
    max-width: 340px;

    background: #ffffff;

    border-radius: 28px;

    padding: 30px 24px 22px;

    text-align: center;

    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.30),
        0 0 0 1px rgba(255, 255, 255, 0.06);

    font-family:
        'DM Sans',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;

    transform: translateY(0);

    animation:
        pwaSlideUp
        0.4s
        cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.pwa-install-close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    background: #f1f4f9;

    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    font-size: 16px;
    line-height: 1;

    color: #64748b;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.pwa-install-close:hover {
    background: #e8edf4;
    color: #0f172a;
    transform: scale(1.08);
}

.pwa-install-close:active {
    transform: scale(0.92);
}


/* =========================================================
   LOGO WRAPPER
   IMPORTANT:
   NO BOX / NO BORDER / NO SHADOW
   ========================================================= */

.pwa-logo-wrapper {
    width: 100%;
    height: auto;

    margin: 0 auto 12px;

    padding: 0;

    background: transparent;

    border: none;

    border-radius: 0;

    box-shadow: none;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: visible;
}


/* =========================================================
   LOGO
   ========================================================= */

.pwa-install-logo {
    display: block;

    width: 120px;
    height: auto;

    max-width: 100%;
    max-height: 120px;

    margin: 0 auto;

    padding: 0;

    object-fit: contain;
    object-position: center;

    background: transparent;

    border: none;

    border-radius: 0;

    box-shadow: none;
}


/* =========================================================
   TITLE
   ========================================================= */

.pwa-install-title {
    margin: 0 0 3px;

    padding: 0;

    font-family:
        'DM Sans',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;

    font-size: 20px;

    line-height: 1.2;

    font-weight: 700;

    color: #0a0f1a;

    letter-spacing: -0.02em;
}


/* =========================================================
   TAGLINE
   ========================================================= */

.pwa-install-tagline {
    display: block;

    margin: 0 0 14px;

    padding: 0;

    background: transparent;

    border: none;

    border-radius: 0;

    font-size: 13px;

    line-height: 1.4;

    font-weight: 500;

    color: #64748b;

    letter-spacing: 0.02em;

    text-transform: uppercase;
}


/* =========================================================
   SUBTEXT
   ========================================================= */

.pwa-install-subtext {
    width: 100%;

    min-height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    margin: 0 0 18px;

    padding: 8px 10px;

    background: #f8fafc;

    border: 1px solid #eef2f6;

    border-radius: 30px;

    font-size: 12.5px;

    line-height: 1.3;

    font-weight: 450;

    color: #475569;

    text-align: center;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    box-sizing: border-box;
}


/* Emoji / icon inside subtext */

.pwa-install-subtext svg {
    flex-shrink: 0;

    width: 14px;
    height: 14px;

    color: #3b82f6;
}


/* =========================================================
   INSTALL BUTTON
   ========================================================= */

.pwa-install-btn {
    width: 100%;

    min-height: 48px;

    background:
        linear-gradient(
            135deg,
            #0a0f1a 0%,
            #1a2538 100%
        );

    color: #ffffff;

    border: none;

    border-radius: 16px;

    padding: 14px 18px;

    font-family:
        'DM Sans',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;

    font-size: 15px;

    line-height: 1;

    font-weight: 600;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    box-shadow:
        0 8px 24px -8px
        rgba(10, 15, 26, 0.35);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.pwa-install-btn:hover {
    background:
        linear-gradient(
            135deg,
            #141c2b 0%,
            #243447 100%
        );

    transform: translateY(-2px);

    box-shadow:
        0 12px 28px -10px
        rgba(10, 15, 26, 0.45);
}

.pwa-install-btn:active {
    transform: translateY(1px) scale(0.98);

    box-shadow:
        0 4px 12px -6px
        rgba(10, 15, 26, 0.25);
}


/* Button SVG */

.pwa-install-btn svg {
    width: 18px;
    height: 18px;

    flex-shrink: 0;
}


/* =========================================================
   BOTTOM ACTIONS
   ========================================================= */

.pwa-install-actions {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 16px;

    margin-top: 16px;

    padding-top: 14px;

    border-top: 1px solid #f1f5f9;

    font-size: 12px;

    box-sizing: border-box;
}


/* Action buttons */

.pwa-install-actions button {
    background: transparent;

    border: none;

    outline: none;

    cursor: pointer;

    font-family:
        'DM Sans',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;

    font-size: 13px;

    line-height: 1.3;

    color: #94a3b8;

    font-weight: 500;

    padding: 4px 12px;

    border-radius: 8px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* Not Now */

.pwa-install-actions button:first-child {
    color: #475569;

    font-weight: 600;
}

.pwa-install-actions button:first-child:hover {
    color: #0f172a;

    background: #f1f5f9;
}


/* Don't show for 24h */

.pwa-install-actions .pwa-dismiss-24h {
    color: #94a3b8;

    font-weight: 450;
}

.pwa-install-actions .pwa-dismiss-24h:hover {
    color: #64748b;

    background: #f8fafc;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes pwaFadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes pwaSlideUp {

    from {
        opacity: 0;

        transform:
            translateY(24px)
            scale(0.95);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .pwa-install-overlay {
        padding: 14px;
    }

    .pwa-install-card {
        max-width: 340px;

        padding:
            28px
            20px
            20px;

        border-radius: 24px;
    }

    .pwa-install-logo {
        width: 190px;

        max-height: 105px;
    }

    .pwa-install-title {
        font-size: 19px;
    }

    .pwa-install-tagline {
        font-size: 12px;
    }

    .pwa-install-subtext {
        font-size: 12px;
    }

    .pwa-install-btn {
        min-height: 46px;

        font-size: 14px;
    }

    .pwa-install-actions {
        gap: 8px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .pwa-install-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pwa-install-logo {
        width: 170px;
    }

    .pwa-install-actions {
        gap: 4px;
    }

    .pwa-install-actions button {
        padding-left: 8px;
        padding-right: 8px;
    }

}