/*  Ecopon.Web.Application/wwwroot/DynamicLinkContent/Css/campaign-qr.css

    The entry-code screen. Everything is scoped to .ec-qr, and the colours carry
    !important because a campaign theme in Coc_Core_DynamicLinks.Style may set
    broad rules that would otherwise repaint this dialog.

    One rule here is functional rather than decorative: the code sits on a white
    plate with padding around it. A scanner needs dark modules on a light ground
    with a quiet zone, so the campaign navy must never reach the code itself. */

.ec-qr .modal-content {
    background: #09275B !important;
    border: none !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 26px 64px rgba(0, 0, 0, .5) !important;
}
.ec-qr .modal-content::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #F85304 0%, #FF9E00 25%, #05814E 50%, #026BDC 75%, #0090E2 100%);
}

.ec-qr__body { padding: 22px 20px 24px !important; text-align: center !important; }

.ec-qr__title {
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: clamp(18px, 2.4vw, 22px) !important;
    margin: 0 0 6px !important;
}

.ec-qr__instruction {
    color: rgba(255, 255, 255, .82) !important;
    font-size: clamp(13px, 1.6vw, 15px) !important;
    line-height: 1.6 !important;
    margin: 0 auto 16px !important;
    max-width: 330px !important;
}

/* the quiet zone */
.ec-qr__plate {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin: 0 auto !important;
    width: fit-content !important;
    max-width: 100% !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .34) !important;
    transition: filter .25s ease, opacity .25s ease;
}
.ec-qr__img {
    display: block !important;
    width: clamp(180px, 56vw, 240px) !important;
    height: auto !important;
    image-rendering: pixelated;   /* keeps the modules square when scaled */
}

/* once the code is dead, stop inviting people to scan it */
.ec-qr__plate.is-expired { filter: grayscale(1) blur(3px) !important; opacity: .45 !important; }

.ec-qr__timer {
    margin-top: 16px !important;
    color: rgba(255, 255, 255, .86) !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 8px !important;
}
.ec-qr__timer-value {
    font-variant-numeric: tabular-nums;
    font-weight: 800 !important;
    font-size: 20px !important;
    color: #FF9E00 !important;
}
.ec-qr.is-warning .ec-qr__timer-value { color: #F85304 !important; }

.ec-qr__bar {
    margin: 10px auto 0 !important;
    height: 4px !important;
    width: min(260px, 80%) !important;
    background: rgba(255, 255, 255, .16) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}
.ec-qr__bar > i {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #05814E, #FF9E00);
    transition: width 1s linear;
}
.ec-qr.is-warning .ec-qr__bar > i { background: linear-gradient(90deg, #FF9E00, #F85304); }

.ec-qr__expired-text {
    color: #FF9E00 !important;
    font-weight: 700 !important;
    margin: 16px 0 0 !important;
}

.ec-qr__actions {
    margin-top: 18px !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}
.ec-qr__refresh {
    background: linear-gradient(135deg, #F85304 0%, #FF9E00 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    padding: 10px 26px !important;
    box-shadow: 0 8px 22px rgba(248, 83, 4, .38) !important;
}
.ec-qr__close {
    background: transparent !important;
    color: rgba(255, 255, 255, .88) !important;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    padding: 10px 26px !important;
}
.ec-qr [hidden] { display: none !important; }

/* a participant standing at a till is usually on a phone in bright sun:
   keep the code as large as the screen allows */
@media (max-width: 480px) {
    .ec-qr__body { padding: 18px 14px 20px !important; }
    .ec-qr__img { width: min(74vw, 260px) !important; }
}

@media (prefers-reduced-motion: reduce) {
    .ec-qr__bar > i, .ec-qr__plate { transition: none !important; }
}
