/* Bottom Sheet Layout */
#pwaInstallModal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1055;
}

/* Make modal fill screen */
#pwaInstallModal .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    /* bottom sheet */
}

/* Bottom sheet style */
#pwaInstallModal .modal-content {
    position: relative;
    /* anchor for absolute positioning */
    width: 100%;
    border-radius: 20px 20px 0 0;
}

/* Close button */
.pwa-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1050;
    opacity: 0.9;
}

.pwa-close-btn:hover {
    opacity: 1;
}

/* Fix backdrop layering */
.modal-backdrop {
    z-index: 1050 !important;
}

#pwaInstallModal {
    z-index: 1060 !important;
}

/* Bottom Sheet Logic */
@media (max-width: 576px) {
    #pwaInstallModal .modal-dialog {
        margin: 0;
        position: fixed;
        bottom: 0;
        width: 100%;
        display: flex;
        align-items: flex-end;
    }
    
    #pwaInstallModal .modal-content {
        border-radius: 24px 24px 0 0;
        border: none;
        width: 100%;
    }
}

/* Premium Styling */
#pwaInstallModal .modal-content {
    background: #020617;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

/* Close button - absolute within content */
.pwa-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1070;
    filter: invert(1) grayscale(100%) brightness(200%);
}

#pwaInstallModal .modal-body {
    padding: 24px;
}

.pwa-title {
    font-size: 1.1rem;
    font-weight: 700;
}

#pwaInstallModal h5,
#pwaInstallModal p {
    all: unset;
    display: block;
}


.pwa-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* Handle */
.pwa-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    margin: 10px auto 6px;
}

/* Logo */
.pwa-logo-box {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: white;
    padding: 2px;
}

.pwa-logo-box img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
}

.pwa-accent-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-weight: 700;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-size: 1rem;
    width: 100%;

    /* 🔥 Make it pop */
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
}

.pwa-accent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.45);
}

.pwa-accent-btn:active {
    transform: scale(0.96);
}

/* Secondary */
.pwa-secondary-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* iOS box */
.pwa-ios-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 14px;
    padding: 10px;
}

.ios-steps div {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* Desktop fallback */
@media (min-width: 576px) {
    #pwaInstallModal .modal-dialog {
        align-items: center;
        max-width: 380px;
        margin: auto;
    }

    #pwaInstallModal .modal-content {
        border-radius: 18px;
        animation: fadeIn 0.3s ease;
    }
}

/* Animations */
@keyframes pwaSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}