/* =========================================================
   PWA INSTALL BANNER
========================================================= */

.pwa-install-banner[hidden],
.pwa-ios-guide[hidden] {
    display: none !important;
}

.pwa-install-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10050;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    width: min(430px, calc(100vw - 40px));
    padding: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(160, 44, 44, 0.16);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(65, 24, 24, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.pwa-install-close {
    position: absolute;
    top: 9px;
    right: 9px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    color: #777;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.pwa-install-close:hover {
    color: #A02C2C;
    background: rgba(160, 44, 44, 0.08);
}

.pwa-install-icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    overflow: hidden;
    background: #fff;
    border-radius: 17px;
    box-shadow: 0 8px 24px rgba(160, 44, 44, 0.14);
}

.pwa-install-icon img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.pwa-install-content {
    min-width: 0;
    padding-right: 28px;
}

.pwa-install-content strong {
    display: block;
    margin-bottom: 5px;
    color: #242424;
    font-size: 17px;
    font-weight: 800;
}

.pwa-install-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.55;
}

.pwa-install-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.pwa-install-primary,
.pwa-install-secondary {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.pwa-install-primary {
    color: #fff;
    background: #A02C2C;
    border: 1px solid #A02C2C;
}

.pwa-install-primary:hover {
    color: #fff;
    background: #812222;
    border-color: #812222;
}

.pwa-install-secondary {
    color: #A02C2C;
    background: #fff;
    border: 1px solid rgba(160, 44, 44, 0.28);
}

.pwa-install-secondary:hover {
    background: rgba(160, 44, 44, 0.06);
}

/* =========================================================
   IOS INSTALL GUIDE
========================================================= */

.pwa-ios-guide {
    position: fixed;
    inset: 0;
    z-index: 10100;
}

.pwa-ios-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 12, 12, 0.56);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.pwa-ios-panel {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    width: min(460px, calc(100% - 36px));
    max-height: calc(100dvh - 36px);
    margin-inline: auto;
    overflow-y: auto;
    padding: 28px 22px 22px;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.pwa-ios-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #777;
    background: rgba(0, 0, 0, 0.04);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.pwa-ios-logo {
    display: block;
    margin: 0 auto 16px;
    border-radius: 18px;
    box-shadow: 0 9px 26px rgba(160, 44, 44, 0.16);
}

.pwa-ios-panel h2 {
    margin: 0;
    color: #242424;
    font-size: 22px;
    font-weight: 800;
}

.pwa-ios-steps {
    margin: 22px 0;
    padding-left: 23px;
    color: #555;
    text-align: left;
}

.pwa-ios-steps li {
    margin-bottom: 14px;
    padding-left: 5px;
    line-height: 1.65;
}

.pwa-ios-steps i {
    color: #A02C2C;
}

.pwa-ios-confirm {
    width: 100%;
    min-height: 46px;
    color: #fff;
    background: #A02C2C;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 575.98px) {
    .pwa-install-banner {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        padding: 15px;
        border-radius: 20px;
    }

    .pwa-install-icon {
        width: 58px;
        height: 58px;
    }

    .pwa-install-icon img {
        width: 54px;
        height: 54px;
    }

    .pwa-install-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pwa-install-primary,
    .pwa-install-secondary {
        width: 100%;
        padding-inline: 12px;
    }
}