/* New QR design */
.floating-qr-container{
    z-index: 101;
    position: fixed;
    pointer-events: none;
    bottom: 0;
    left: calc((100% - 1392px) / 2);
    display: flex;
    flex-direction: column;
    transition: margin-bottom 0.4s ease-in-out;
    margin-bottom: -240px;
}

.has-modal-open .floating-qr-container{
    z-index: 10;
}

#floating-qr {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    border-radius: 16px 16px 0 0;
    background: #FFE236;
    width: max-content;
    z-index: 10;
}

.floating-qr-container.active {
    margin-bottom: 0;
}

.floating-qr-container.collapsed.active:not(.mobile) {
    margin-bottom: -184px;
}

#floating-qr .qr-title {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 8px;
    gap: 16px;
    font-weight: 700;
    transition: padding 0.4s ease-in-out;
}

.floating-qr-container.collapsed #floating-qr .qr-title {
    padding-bottom: 16px;
}

#floating-qr .qr-title button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    height: 24px;
}

.floating-qr-container:not(.collapsed) .qr-title button img {
    transform: rotate(180deg);
}

.floating-qr-container .qr-title button img {
    transition: transform 0.3s ease-in-out;
}

#floating-qr .qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0 16px;
    margin: 4px 4px 0;
    background: #8252FF;
    border-radius: 16px 16px 0 0;
    gap: 8px;
}

#floating-qr .qr-wrapper span {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

#floating-qr #qrcode {
    padding: 5px;
    background: #fff;
    border-radius: 4px;
}

.floating-qr-container.mobile #floating-qr {
    margin-left: auto;
    margin-right: auto;
}

#floating-qr .download-button {
    display: none;
    padding: 12px 16px;
    border-radius: 0 0 16px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
}

.floating-qr-container.mobile #floating-qr .qr-wrapper,
.floating-qr-container.mobile #floating-qr .qr-title {
    display: none;
}

.floating-qr-container.mobile #floating-qr .download-button {
    display: flex;
}

#qrcode canvas {
    display: block;
    width: 100px;
    height: 100px;
}

#qrcode canvas:not(:first-child) {
    display: none;
}

@media (max-width: 1440px) {
    .floating-qr-container {
        left: 0;
        width:100%;
    }
    #floating-qr {
        margin-left: 24px;
    }
    .lucky-draw {
        margin-left: 24px !important;
        margin-bottom: 12px !important;
    }
}

/* PAD-1193: while the top sticky app banner is still visible, hide the bottom
   "Get Pawns.app mobile" bar so two download prompts never stack on one
   screen. The banner is only shown at this breakpoint, and both the close
   button and the dismissal cookie drop body.has-mobile-banner, so the bar
   reappears without a reload and stays consistent across page loads. */
@media (max-width: 549px) {
    body.has-mobile-banner .floating-qr-container #floating-qr {
        display: none;
    }
}
