.pos-voucher {
    margin: 18px 16px 8px;
}

.pos-voucher [hidden],
.pos-voucher-dialog [hidden] {
    display: none !important;
}

.pos-voucher__toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid #5734b7;
    border-radius: 10px;
    padding: 10px 18px;
    background: #fff;
    color: #5734b7;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pos-voucher__toggle.is-applied {
    background: #f0ebff;
}

.pos-voucher__summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 12px;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f0ebff;
    color: #332367;
    font-size: 14px;
    text-transform: none;
}

.pos-voucher__summary strong {
    font-size: 16px;
}

#posEnrollmentForm.pos-voucher-applied .payment-offer-grid {
    display: none !important;
}

.pos-voucher-dialog {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    overflow: auto;
    border: 0;
    border-radius: 20px;
    padding: 26px;
    background: #fff;
    color: #182958;
    box-shadow: 0 20px 80px rgb(10 15 40 / 30%);
    text-align: left;
    text-transform: none;
    font-size: 16px;
}

.pos-voucher-dialog::backdrop {
    background: rgb(7 12 30 / 60%);
}

.pos-voucher-dialog--fallback[open] {
    position: fixed;
    z-index: 1100;
    inset: 50% auto auto 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 100vmax rgb(7 12 30 / 60%);
}

.pos-voucher-dialog__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.pos-voucher-dialog__heading h2 {
    margin: 0;
    color: #182958;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    text-align: left;
}

.pos-voucher-dialog__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin: -8px -10px 0 0;
    border: 0;
    border-radius: 50%;
    background: #f3f1f8;
    color: #332367;
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
}

.pos-voucher-dialog label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

.pos-voucher-dialog input {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    border: 1px solid #c7c9d7;
    border-radius: 10px;
    padding: 12px;
    background: #f8f8fc;
    color: #182958;
    font: inherit;
}

.pos-voucher-dialog input[aria-invalid="true"] {
    border-color: #b42335;
}

.pos-voucher-dialog__feedback {
    min-height: 20px;
    margin: 8px 0 12px;
    color: #b42335;
    font-size: 14px;
    line-height: 1.5;
}

.pos-voucher-dialog__primary {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    background: #5734b7;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.pos-voucher-dialog__current {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
}

.pos-voucher-dialog__current output {
    overflow-wrap: anywhere;
    font-weight: 800;
    font-size: 22px;
}

.pos-voucher button:disabled,
.pos-voucher-dialog button:disabled {
    opacity: .65;
    cursor: wait;
}

.pos-voucher button:focus-visible,
.pos-voucher-dialog button:focus-visible,
.pos-voucher-dialog input:focus-visible {
    outline: 3px solid #a693df;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .pos-voucher-dialog {
        padding: 22px 18px;
    }

    .pos-voucher-dialog__heading h2 {
        font-size: 17px;
    }

    .pos-voucher__summary strong {
        font-size: 15px;
    }
}
