@import url('theme-color.css');

/* Promo strip — dark base, warm top glow, dim star/grid pattern */
.ox-app-download {
    position: relative;
    padding: clamp(2rem, 5vw, 3rem) 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 107, 26, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}

/* Subtle “+” grid — slightly dimmed */
.ox-app-download::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ctext x='18' y='22' font-size='11' fill='%23ffffff' fill-opacity='0.055' text-anchor='middle' font-family='system-ui,sans-serif'%3E%2B%3C/text%3E%3C/svg%3E");
    pointer-events: none;
}

.ox-app-download .container {
    position: relative;
    z-index: 1;
}

.ox-app-download__layout {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.25rem);
    align-items: center;
}

@media (min-width: 768px) {
    .ox-app-download__layout {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, auto);
        gap: clamp(1.75rem, 4vw, 3rem);
        align-items: center;
    }
}

.ox-app-download__copy {
    max-width: 38rem;
}

.ox-app-download__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
}

.ox-app-download__badge i {
    font-size: 0.75rem;
    opacity: 0.95;
}

.ox-app-download__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.ox-app-download__lead {
    margin: 0;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.94);
}

.ox-app-download__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .ox-app-download__actions {
        justify-content: flex-end;
    }
}

/* Store-style pills (white, like App Store / Google Play badges) */
.ox-app-download__store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.25rem;
    padding: 0.55rem 1.1rem 0.55rem 0.85rem;
    border-radius: 14px;
    background: #fff;
    color: #0f172a !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    max-width: 100%;
}

.ox-app-download__store-btn:hover {
    color: #0f172a !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.ox-app-download__store-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    font-size: 1.65rem;
    color: #00c853;
}

.ox-app-download__store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    text-align: left;
    line-height: 1.15;
    min-width: 0;
}

.ox-app-download__store-line1 {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #64748b;
    text-transform: none;
}

.ox-app-download__store-line2 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

@media (max-width: 767.98px) {
    .ox-app-download__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ox-app-download__store-btn {
        justify-content: flex-start;
    }
}

/* Footer — image-led download */
.ox-app-download-footer {
    margin-top: 1rem;
}

.ox-app-download-footer__link {
    display: inline-block;
    line-height: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.ox-app-download-footer__link:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.ox-app-download-footer__badge {
    display: block;
    width: auto;
    max-width: min(160px, 100%);
    height: auto;
}

.ox-app-download-footer__btn-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: #fff !important;
    background: var(--gradient-accent);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.ox-app-download-footer__btn-fallback:hover {
    color: #fff !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* ─── Fixed top notice — slides down after scroll (see app-download-notice.js) ─── */
.ox-app-top-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10050;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    padding-bottom: 0.65rem;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    background:
        radial-gradient(ellipse 90% 120% at 50% 0%, rgba(255, 107, 26, 0.14) 0%, transparent 45%),
        linear-gradient(180deg, #0b1220 0%, #111827 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 clamp(10px, 2.5vw, 14px) clamp(10px, 2.5vw, 14px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    transform: translate3d(0, -100%, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.35s ease,
        visibility 0.42s;
    contain: layout style;
    -webkit-font-smoothing: antialiased;
}

.ox-app-top-notice.is-visible {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .ox-app-top-notice {
        transition: none;
    }

    .ox-app-top-notice.is-visible {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.ox-app-top-notice__inner {
    max-width: min(1200px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(0.65rem, 2vw, 0.85rem);
}

@media (min-width: 768px) {
    .ox-app-top-notice__inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem 1.5rem;
    }
}

.ox-app-top-notice__content {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
}

.ox-app-top-notice__icon {
    flex-shrink: 0;
    width: clamp(2rem, 5vw, 2.35rem);
    height: clamp(2rem, 5vw, 2.35rem);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: clamp(1rem, 3vw, 1.15rem);
    color: #3ddc84;
    background: rgba(255, 255, 255, 0.08);
}

.ox-app-top-notice__text {
    margin: 0;
    font-size: clamp(0.78rem, 2.4vw, 0.875rem);
    line-height: 1.45;
    color: rgba(248, 250, 252, 0.96);
    overflow-wrap: break-word;
    max-height: min(8.5em, 36vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ox-app-top-notice__actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 0.5rem;
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .ox-app-top-notice__actions {
        width: auto;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: nowrap;
    }
}

.ox-app-top-notice__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1.1rem;
    flex: 1 1 auto;
    border-radius: 999px;
    font-size: clamp(0.78rem, 2.2vw, 0.875rem);
    font-weight: 600;
    text-decoration: none !important;
    color: #0f172a !important;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition:
        filter 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
    .ox-app-top-notice__download {
        flex: 0 1 auto;
        min-width: 7.5rem;
    }
}

.ox-app-top-notice__download:hover {
    color: #0f172a !important;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ox-app-top-notice__download:active {
    transform: translateY(0);
}

.ox-app-top-notice__download:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

.ox-app-top-notice__dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 232, 240, 0.92);
    font-size: clamp(0.75rem, 2vw, 0.8125rem);
    font-weight: 500;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
    flex: 0 0 auto;
}

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

.ox-app-top-notice__dismiss:active {
    transform: scale(0.98);
}

.ox-app-top-notice__dismiss:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

.ox-app-top-notice__dismiss > span:first-child {
    font-size: 1.35rem;
    line-height: 1;
    opacity: 0.9;
}

.ox-app-top-notice__dismiss-label {
    display: inline;
    white-space: nowrap;
}

@media (max-width: 399.98px) {
    .ox-app-top-notice__dismiss-label {
        display: none;
    }

    .ox-app-top-notice__dismiss {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}
