/* Scoped reward-code UI: no animation loop, backdrop blur, or extra image fetch. */
#btnVoucherCode {
    display: flex;
    align-items: center;
    gap: calc(10px * var(--ui-scale, 1));
    width: 100%;
    min-height: max(44px, calc(42px * var(--ui-scale, 1)));
    text-align: start;
}
#btnVoucherCode .voucher-chevron { margin-inline-start: auto; }
#voucherCodeDialog {
    box-sizing: border-box;
    margin: auto;
    inset: 0;
    width: min(calc(420px * var(--ui-scale, 1)), calc(100vw - 28px));
    max-height: calc(100dvh - 28px);
    overflow: auto;
    padding: calc(22px * var(--ui-scale, 1));
    border: calc(2px * var(--ui-scale, 1)) solid var(--lp-tile-line, #7d96b2);
    border-radius: calc(18px * var(--ui-scale, 1));
    background: linear-gradient(155deg, var(--lp-tile-hi, #fff), var(--lp-tile-lo, #e4eef8));
    color: var(--lp-text, #1b2a3d);
    box-shadow: 0 calc(7px * var(--ui-scale, 1)) 0 var(--lp-tile-lip, #a9bdd3), 0 18px 60px #07162766;
    font-family: inherit;
    font-size: var(--font-sm, 1rem);
}
#voucherCodeDialog::backdrop { background: #08152499; }
#voucherCodeDialog [hidden] { display: none !important; }
#voucherCodeDialog .voucher-heading {
    display: flex; align-items: center; gap: calc(12px * var(--ui-scale, 1));
    margin-bottom: calc(20px * var(--ui-scale, 1));
}
#voucherCodeDialog h2 { margin: 0; font-size: var(--font-lg, 1.35rem); line-height: 1.3; }
#voucherCodeDialog .voucher-gift { font-size: calc(38px * var(--ui-scale, 1)); }
#voucherCodeClose {
    margin-inline-start: auto; flex: 0 0 auto;
    width: max(44px, calc(36px * var(--ui-scale, 1)));
    min-height: max(44px, calc(36px * var(--ui-scale, 1)));
    font-size: var(--font-lg, 1.35rem);
}
#voucherCodeDialog button, #voucherCodeLogin {
    box-sizing: border-box; cursor: pointer; font-family: inherit;
    font-size: var(--font-sm, 1rem); font-weight: 750;
    border: calc(1px * var(--ui-scale, 1)) solid var(--lp-tile-line, #7d96b2);
    border-radius: calc(9px * var(--ui-scale, 1));
    padding: calc(9px * var(--ui-scale, 1)) calc(13px * var(--ui-scale, 1));
    color: var(--lp-text, #1b2a3d); background: var(--lp-tile-hi, #fff);
    min-height: max(44px, calc(40px * var(--ui-scale, 1)));
}
#voucherCodeDialog button:disabled { cursor: default; opacity: .6; }
#voucherCodeDialog :focus-visible { outline: 3px solid #24a8bb; outline-offset: 3px; }
#voucherCodeDialog label { display: block; margin-bottom: calc(7px * var(--ui-scale, 1)); font-weight: 700; }
#voucherCodeDialog .voucher-input-row { display: flex; gap: calc(7px * var(--ui-scale, 1)); }
#voucherCodeInput {
    width: 100%; min-width: 0; box-sizing: border-box;
    border: calc(2px * var(--ui-scale, 1)) solid var(--lp-tile-line, #7d96b2);
    border-radius: calc(9px * var(--ui-scale, 1));
    padding: calc(10px * var(--ui-scale, 1));
    color: var(--lp-text, #1b2a3d); background: var(--lp-tile-hi, #fff);
    font-family: inherit; font-size: max(16px, var(--font-sm, 1rem));
    text-transform: uppercase; letter-spacing: .04em;
}
#voucherCodeInput[aria-invalid="true"] { border-color: #d95151; }
#voucherCodePaste { flex: 0 0 auto; }
#voucherCodeSubmit, #voucherCodeLogin {
    display: block; width: 100%; margin-top: calc(16px * var(--ui-scale, 1)); text-align: center;
    text-decoration: none; background: #137f83 !important; color: #fff !important;
    border-color: #0c686c !important; box-shadow: 0 calc(3px * var(--ui-scale, 1)) 0 #0a575b;
}
#voucherCodeHint, #voucherCodeStatus {
    margin: calc(14px * var(--ui-scale, 1)) 0 0; line-height: 1.5; overflow-wrap: anywhere;
}
#voucherCodeHint { opacity: .75; font-size: var(--font-xs, .85rem); }
#voucherCodeStatus:empty { display: none; }
#voucherCodeStatus.voucher-error { color: var(--lp-rate-neg, #b42318); }
#voucherCodeReward {
    display: flex; align-items: center; justify-content: center;
    gap: calc(12px * var(--ui-scale, 1)); margin-top: calc(18px * var(--ui-scale, 1));
    padding: calc(14px * var(--ui-scale, 1)); border-radius: calc(12px * var(--ui-scale, 1));
    background: var(--lp-money-lo, #c8efd5); color: var(--lp-money-text, #13663a);
    font-size: calc(36px * var(--ui-scale, 1)); font-weight: 900;
}
html[lang="ar"] #voucherCodeDialog { direction: rtl; }
#voucherCodeAmount { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 360px) {
    #voucherCodeDialog { padding: calc(14px * var(--ui-scale, 1)); }
    #voucherCodeDialog .voucher-input-row { flex-wrap: wrap; }
    #voucherCodePaste { width: 100%; }
}
