/* PWA install — yellow / magenta brand look */
.pwa-install-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 236, 122, 0.65), transparent 45%),
        linear-gradient(165deg, #ffffff 0%, #fff8e1 100%);
    color: #111;
    box-shadow:
        0 18px 40px -12px rgba(156, 39, 176, 0.35),
        0 0 0 1.5px rgba(194, 24, 91, 0.14);
    border: 1.5px solid rgba(194, 24, 91, 0.16);
    animation: pwaSlideUp 0.35s ease;
}

.pwa-install-bar.is-visible {
    display: flex;
}

.pwa-install-bar.has-bottom-nav {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.pwa-install-bar__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid rgba(194, 24, 91, 0.14);
    box-shadow: 0 6px 14px rgba(156, 39, 176, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.pwa-install-bar__icon img {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.pwa-install-bar__text {
    flex: 1;
    min-width: 0;
}

.pwa-install-bar__title {
    font-size: 13.5px;
    font-weight: 900;
    line-height: 1.25;
    color: #111;
    letter-spacing: -0.01em;
}

.pwa-install-bar__sub {
    font-size: 11.5px;
    margin-top: 2px;
    line-height: 1.35;
    font-weight: 600;
    color: #666;
}

.pwa-install-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(90deg, #9c27b0 0%, #e91e8c 55%, #ff2d95 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(233, 30, 140, 0.35);
    white-space: nowrap;
}

.pwa-install-btn:hover {
    filter: brightness(1.06);
}

.pwa-install-dismiss {
    border: none;
    background: rgba(194, 24, 91, 0.1);
    color: #c2185b;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-dismiss:hover {
    background: rgba(194, 24, 91, 0.18);
}

.pwa-install-fab {
    position: fixed;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 9997;
    display: none;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(90deg, #9c27b0 0%, #e91e8c 55%, #ff2d95 100%);
    box-shadow: 0 12px 28px rgba(233, 30, 140, 0.4);
}

.pwa-install-fab.has-bottom-nav {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

.pwa-install-fab.is-visible {
    display: inline-flex;
}

.pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(26, 10, 20, 0.55);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.pwa-modal-backdrop.is-open {
    display: flex;
}

.pwa-modal {
    position: relative;
    overflow: hidden;
    width: min(420px, 100%);
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 236, 122, 0.7), transparent 42%),
        linear-gradient(165deg, #ffffff 0%, #fff8e1 100%);
    border: 1.5px solid rgba(194, 24, 91, 0.16);
    border-radius: 24px;
    padding: 22px 20px 18px;
    color: #111;
    box-shadow: 0 24px 56px -12px rgba(156, 39, 176, 0.4);
}

.pwa-modal::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -10%;
    width: 48%;
    height: 55%;
    background: linear-gradient(145deg, #ff4db8 0%, #e91e8c 45%, #c2185b 100%);
    clip-path: polygon(28% 0%, 100% 0%, 100% 100%, 0% 100%);
    transform: skewX(-8deg);
    opacity: 0.92;
    pointer-events: none;
}

.pwa-modal h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #111;
}

.pwa-modal p {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 600;
    color: #555;
    max-width: 78%;
}

.pwa-modal ol {
    position: relative;
    z-index: 1;
    margin: 0 0 16px;
    padding: 12px 12px 12px 30px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(194, 24, 91, 0.12);
    font-size: 13px;
    line-height: 1.65;
    font-weight: 600;
    color: #222;
}

.pwa-modal ol::marker,
.pwa-modal li::marker {
    color: #e91e8c;
    font-weight: 800;
}

.pwa-modal li + li {
    margin-top: 6px;
}

.pwa-modal-install {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 999px;
    padding: 13px;
    margin-bottom: 8px;
    font-size: 13.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: #c2185b;
    border: 2px solid rgba(233, 30, 140, 0.45);
}

.pwa-modal-install:hover {
    background: rgba(233, 30, 140, 0.08);
}

.pwa-modal-install.is-native {
    background: linear-gradient(90deg, #9c27b0 0%, #e91e8c 55%, #ff2d95 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(233, 30, 140, 0.38);
}

.pwa-modal-install.is-native:hover {
    filter: brightness(1.05);
}

.pwa-steps-highlight {
    animation: pwaStepsPulse 0.9s ease;
}

@keyframes pwaStepsPulse {
    0%, 100% { background: rgba(255, 255, 255, 0.88); }
    50% { background: rgba(252, 228, 236, 0.95); border-radius: 16px; }
}

.pwa-modal-close {
    position: relative;
    z-index: 1;
    width: 100%;
    border: 1.5px solid rgba(194, 24, 91, 0.14);
    border-radius: 999px;
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: #444;
}

.pwa-modal-close:hover {
    background: #fff8e1;
    color: #c2185b;
}

#pwa-modal-note {
    color: #777 !important;
    max-width: 100% !important;
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .pwa-install-bar {
        left: auto;
        right: 20px;
        max-width: 420px;
    }

    .pwa-modal-backdrop {
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-install-bar,
    .pwa-steps-highlight {
        animation: none !important;
    }
}
