/*
 * Download button
 */

.sad-download-component {
    display: inline-block;
}

.sad-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    border: 0;
    border-radius: 10px;
    background: #111111;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 160ms ease,
        opacity 160ms ease;
}

.sad-download-button:hover {
    color: #ffffff;
    opacity: 0.9;
    transform: translateY(-1px);
}

.sad-download-button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

/*
 * Modal container
 */

.sad-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sad-modal.is-open {
    display: flex;
}

.sad-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.sad-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 36px;
    border-radius: 18px;
    background: #ffffff;
    color: #111111;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.sad-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111111;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.sad-modal__title {
    margin: 0 30px 10px;
    font-size: 28px;
    line-height: 1.2;
}

.sad-modal__description {
    margin: 0 0 24px;
    color: #555555;
}

.sad-modal__qr {
    display: block;
    width: min(100%, 260px);
    height: auto;
    margin: 0 auto;
}

.sad-modal__fallback {
    margin: 20px 0 0;
    font-size: 14px;
}

.sad-modal__fallback a {
    font-weight: 700;
}

/*
 * Prevent background scrolling while a modal is open.
 */

body.sad-modal-open {
    overflow: hidden;
}

/*
 * Desktop fallback store page
 */

.sad-store-fallback {
    max-width: 680px;
    margin: 60px auto;
    padding: 32px;
    text-align: center;
}

.sad-store-fallback__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.sad-store-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #111111;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.sad-store-link:hover {
    color: #ffffff;
    opacity: 0.9;
}

/*
 * On screens below 1024px, the QR modal is never needed.
 * JavaScript also allows the button to navigate normally.
 */

@media (max-width: 1023px) {
    .sad-modal {
        display: none !important;
    }

    .sad-download-button {
        width: 100%;
    }
}