/*
 * Bottom “smart install” sheet — mobile web pattern used by major apps (compact card above tab bar).
 * Placed above .bottom-nav-wrapper; stacks under sticky FAB (see z-index note in bottom-nav.css).
 */
.ox-app-install-sheet {
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    z-index: 1046;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translate3d(0, 115%, 0);
    transition:
        opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear 0.45s;
}

.ox-app-install-sheet:not([hidden]).is-visible {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s, 0s, 0s;
}

@media (prefers-reduced-motion: reduce) {
    .ox-app-install-sheet {
        transition-duration: 0.01ms;
        transform: translate3d(0, 0, 0);
    }

    .ox-app-install-sheet:not([hidden]).is-visible {
        opacity: 1;
    }
}

@media (min-width: 769px) {
    .ox-app-install-sheet {
        display: none !important;
    }
}

.ox-app-install-sheet__panel {
    position: relative;
    border-radius: 16px;
    padding: 0.85rem 0.95rem 0.65rem;
    background:
        radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 107, 26, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #111827 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 -4px 24px rgba(0, 0, 0, 0.35),
        0 16px 40px rgba(0, 0, 0, 0.2);
}

.ox-app-install-sheet__close {
    position: absolute;
    top: 0.35rem;
    right: 0.4rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 232, 240, 0.9);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ox-app-install-sheet__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.ox-app-install-sheet__main {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 0.65rem 0.65rem;
    padding-right: 1.5rem;
}

.ox-app-install-sheet__logo {
    border-radius: 12px;
    width: 48px;
    height: 48px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ox-app-install-sheet__copy {
    min-width: 0;
}

.ox-app-install-sheet__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
    line-height: 1.2;
}

.ox-app-install-sheet__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(203, 213, 225, 0.95);
}

.ox-app-install-sheet__cta {
    align-self: center;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #0f172a !important;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.15s ease,
        filter 0.15s ease;
    white-space: nowrap;
}

.ox-app-install-sheet__cta:hover {
    filter: brightness(1.06);
}

.ox-app-install-sheet__cta:active {
    transform: scale(0.97);
}

.ox-app-install-sheet__continue-browser {
    display: block;
    width: 100%;
    margin-top: 0.55rem;
    padding: 0.35rem 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(148, 163, 184, 0.95);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ox-app-install-sheet__continue-browser:hover {
    color: #e2e8f0;
}

@media (max-width: 360px) {
    .ox-app-install-sheet__main {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
    }

    .ox-app-install-sheet__cta {
        grid-column: 1 / -1;
        justify-self: stretch;
    }
}
