/* =========================================================
   LoadUp App Download Promo (site-wide)
   Desktop: floating FAB + QR popover
   Mobile: top smart banner
   ========================================================= */

:root {
    --loadup-app-banner-h: 0px;
}

body.loadup-app-banner-visible {
    --loadup-app-banner-h: 52px;
    padding-top: calc(var(--loadup-app-banner-h) + var(--lu-header-h, 72px));
}

/* ---------- Mobile smart banner ---------- */
.loadup-app-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 12px;
    background: linear-gradient(90deg, #1f9d4d 0%, #148f7a 55%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.loadup-app-banner[hidden] {
    display: none !important;
}

.loadup-app-banner__close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.loadup-app-banner__brand {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loadup-app-banner__icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    flex-shrink: 0;
}

.loadup-app-banner__text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loadup-app-banner__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: #ff8a00;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.2;
}

.loadup-app-banner__cta:hover,
.loadup-app-banner__cta:focus {
    background: #f07d00;
    color: #fff !important;
}

/* Keep fixed navbar below app banner on mobile */
body.loadup-app-banner-visible .navbar.site-header,
body.loadup-app-banner-visible .navbar {
    top: var(--loadup-app-banner-h);
}

/* ---------- Floating FAB + QR ---------- */
.loadup-app-fab-wrap {
    position: fixed;
    right: 20px;
    bottom: 108px;
    z-index: 1050;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.loadup-app-fab {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 0;
    background: #FF5B35;
    box-shadow: 0 6px 6px rgba(15, 23, 42, 0.16);
    color: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.loadup-app-fab:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.loadup-app-fab:focus-visible {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

.loadup-app-fab__phone,
.loadup-app-fab__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.loadup-app-fab__close {
    display: none;
}

.loadup-app-fab__label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.loadup-app-fab.is-open .loadup-app-fab__phone,
.loadup-app-fab.is-open .loadup-app-fab__label {
    display: none;
}

.loadup-app-fab.is-open .loadup-app-fab__close {
    display: inline-flex;
    font-size: 22px;
}

.loadup-app-popover {
    width: 240px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    padding: 18px 16px 14px;
    text-align: center;
    position: relative;
}

.loadup-app-popover[hidden] {
    display: none !important;
}

.loadup-app-popover::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: -7px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.08));
}

.loadup-app-popover__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.loadup-app-popover__subtitle {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.loadup-app-popover__phone {
    width: 180px;
    margin: 0 auto 12px;
    padding: 14px 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 22px;
    background: #fafbfc;
    box-shadow: inset 0 0 0 1px #fff;
}

.loadup-app-popover__qr {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.loadup-app-popover__stores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
}

.loadup-app-popover__stores a {
    color: #28a745;
    font-weight: 600;
    text-decoration: none;
}

.loadup-app-popover__stores a:hover {
    text-decoration: underline;
}

/* Desktop only for FAB; mobile banner only on small screens */
@media (min-width: 992px) {
    .loadup-app-banner {
        display: none !important;
    }

    body.loadup-app-banner-visible {
        --loadup-app-banner-h: 0px;
        padding-top: var(--lu-header-h, 72px);
    }

    .loadup-app-fab-wrap {
        display: flex;
    }
}

@media (max-width: 991.98px) {
    .loadup-app-fab-wrap {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .loadup-app-banner__text {
        font-size: 12px;
    }

    .loadup-app-banner__cta {
        padding: 6px 10px;
        font-size: 11px;
    }
}