.ecre_reward-points-wrapper {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 16px;
    padding-right: 16px;
}

.ecre-reward-input-wrapper{
    display: flex;
}

.ecre-reward-input-wrapper input {
    background-color: #fff;
    border: 1px solid hsla(0, 0%, 7%, .8) !important;
    border-radius: 4px !important;
    box-sizing: border-box;
    color: #2b2d2f;
    font-family: inherit;
    font-size: 1em;
    line-height: 1em;
    margin: 0;
    min-height: 0;
    padding: 1em;
    width: 100%;
}

.ecre-reward-input-wrapper button {
   margin-left: 8px;
}

.ecre-reward-point-message {
    color: #ff0000;
    font-size: 14px;
}

.ecre-available-rewards {
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(155deg, #f5f1fd 0%, #fbfaff 55%, #ffffff 100%);
    border: 1px solid #e4dbfa;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(106, 64, 213, 0.06);
}

.ecre-available-rewards__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: #1e1e1e;
    font-size: 1.25em;
    font-weight: 700;
    line-height: 1.3;
}

.ecre-available-rewards__title::before {
    content: "";
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background-color: #6a40d5;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v10H4V12'/%3E%3Cpath d='M2 7h20v5H2z'/%3E%3Cpath d='M12 22V7'/%3E%3Cpath d='M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z'/%3E%3Cpath d='M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v10H4V12'/%3E%3Cpath d='M2 7h20v5H2z'/%3E%3Cpath d='M12 22V7'/%3E%3Cpath d='M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z'/%3E%3Cpath d='M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.ecre-available-rewards__subtitle {
    margin: 0 0 18px;
    color: #5e656a;
    font-size: 0.95em;
}

.ecre-available-rewards__form {
    margin: 0;
}

.ecre-available-rewards__input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ecre-available-rewards__select {
    flex: 1 1 240px;
    min-width: 0;
}

/* Select2 renders its own markup next to the hidden <select>; style that shell to match the field look used elsewhere on the site. */
.ecre-available-rewards .select2-container {
    flex: 1 1 240px;
    min-width: 0;
}

.ecre-available-rewards .select2-container--default .select2-selection--single {
    height: 44px;
    padding: 0 4px;
    background-color: #ffffff;
    border: 1px solid #d9cef5;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.ecre-available-rewards .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    color: #1e1e1e;
    line-height: 1.4;
}

.ecre-available-rewards .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.ecre-available-rewards .select2-container--default.select2-container--focus .select2-selection--single,
.ecre-available-rewards .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #6a40d5;
    box-shadow: 0 0 0 2px rgba(106, 64, 213, 0.15);
}

.ecre-available-rewards .select2-dropdown {
    border-color: #d9cef5;
    border-radius: 8px;
    overflow: hidden;
}

.ecre-available-rewards .select2-results__option {
    padding: 8px 12px;
}

.ecre-available-rewards .select2-container--default .select2-results__option--highlighted[aria-selected],
.ecre-available-rewards .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #6a40d5 !important;
    color: #ffffff;
}

.ecre-available-rewards .select2-results__group {
    color: #5e656a;
    font-size: 0.85em;
}

.ecre-available-rewards .select2-search--dropdown .select2-search__field {
    padding: 8px 10px;
    border: 1px solid #d9cef5;
    border-radius: 6px;
}

.ecre-available-rewards .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: #6a40d5;
}

.ecre-available-rewards__preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: baseline;
    margin-top: 14px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #ece6fa;
    border-radius: 10px;
}

.ecre-available-rewards__preview[hidden] {
    display: none;
}

.ecre-available-rewards__preview span {
    color: #5e656a;
    font-size: 0.85em;
}

.ecre-available-rewards__preview-amount {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    color: #6a40d5;
    background: #f0eafb;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.15em !important;
    line-height: 1.4;
}

.ecre-available-rewards__preview-code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
    font-size: 0.8em !important;
    letter-spacing: 0.02em;
    color: #7a7f87 !important;
}

.ecre-available-rewards button.ecre-available-rewards__apply-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    background-color: #6a40d5;
    background-image: none;
    border: 1px solid #6a40d5;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(106, 64, 213, 0.15);
    color: #ffffff !important;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    text-shadow: none;
    cursor: pointer;
    transition: background-color 200ms ease, box-shadow 200ms ease, transform 150ms ease;
}

.ecre-available-rewards button.ecre-available-rewards__apply-button:hover:not(:disabled) {
    background-color: #5931c4;
    border-color: #5931c4;
    box-shadow: 0 6px 16px rgba(106, 64, 213, 0.28);
    transform: translateY(-1px);
}

.ecre-available-rewards button.ecre-available-rewards__apply-button:active:not(:disabled) {
    box-shadow: 0 2px 6px rgba(106, 64, 213, 0.2);
    transform: translateY(0);
}

.ecre-available-rewards button.ecre-available-rewards__apply-button:focus-visible {
    outline: 2px solid #6a40d5;
    outline-offset: 2px;
}

.ecre-available-rewards button.ecre-available-rewards__apply-button:disabled {
    background-color: #d9cef5;
    border-color: #d9cef5;
    box-shadow: none;
    color: #ffffff !important;
    cursor: not-allowed;
}

.ecre-available-rewards__applied-note {
    padding: 12px 16px;
    background: #f5f1fd;
    border: 1px dashed #c9b8f2;
    border-radius: 10px;
    color: #5e656a;
    font-size: 0.9em;
    line-height: 1.5;
}

.ecre-available-rewards__applied-note-code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
    font-weight: 700;
    color: #6a40d5;
    white-space: nowrap;
}

.ecre-available-rewards__message {
    margin: 16px 0 0;
    font-weight: 600;
}

.ecre-available-rewards__message:not(:empty) {
    padding: 10px 14px;
    border-radius: 8px;
}

.ecre-available-rewards__message--success {
    color: #1a7a3d;
    background: #e9f8ee;
}

.ecre-available-rewards__message--error {
    color: #b3241c;
    background: #fdecea;
}

.ecre-reward-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ecre-reward-confirm-modal[hidden] {
    display: none;
}

.ecre-reward-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 22, 54, 0.45);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.ecre-reward-confirm-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 28px;
    background: #ffffff;
    border-top: 4px solid #6a40d5;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(30, 22, 54, 0.3);
    animation: ecre-modal-in 180ms ease;
}

@keyframes ecre-modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ecre-reward-confirm-modal__title {
    margin: 0 0 10px;
    color: #1e1e1e;
    font-size: 1.15em;
    font-weight: 700;
}

.ecre-reward-confirm-modal__body {
    margin: 0 0 24px;
    color: #5e656a;
    font-size: 0.95em;
    line-height: 1.6;
}

.ecre-reward-confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ecre-reward-confirm-modal button.ecre-reward-confirm-modal__cancel {
    min-height: 40px;
    padding: 0 18px;
    background-color: #ffffff;
    border: 1px solid #d9cef5;
    border-radius: 8px;
    color: #1e1e1e !important;
    font-weight: 600;
    cursor: pointer;
}

.ecre-reward-confirm-modal button.ecre-reward-confirm-modal__cancel:hover {
    background-color: #f5f1fd;
}

.ecre-reward-confirm-modal button.ecre-reward-confirm-modal__confirm {
    min-height: 40px;
    padding: 0 18px;
    background-color: #6a40d5;
    border: 1px solid #6a40d5;
    border-radius: 8px;
    color: #ffffff !important;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 200ms ease;
}

.ecre-reward-confirm-modal button.ecre-reward-confirm-modal__confirm:hover {
    background-color: #5931c4;
}

.ecre-reward-confirm-modal button.ecre-reward-confirm-modal__confirm:focus-visible,
.ecre-reward-confirm-modal button.ecre-reward-confirm-modal__cancel:focus-visible {
    outline: 2px solid #6a40d5;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ecre-reward-confirm-modal__dialog {
        animation: none;
    }
}

@media (max-width: 480px) {
    .ecre-available-rewards {
        padding: 18px;
    }

    .ecre-available-rewards__input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ecre-available-rewards .select2-container {
        width: 100% !important;
    }

    .ecre-available-rewards button.ecre-available-rewards__apply-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ecre-available-rewards button.ecre-available-rewards__apply-button {
        transition: none;
    }
}
