.codeCheck-container {
    display: block;
    white-space: normal;
    font-family: inherit;
    font-size: inherit;
    line-height: normal;
}

pre:has(.codeCheck-container),
pre:has(.codeCheck-container) > code {
    overflow: visible;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    white-space: normal;
    font-family: inherit;
    font-size: inherit;
    line-height: normal;
}

.mtgr-redemption {
    box-sizing: border-box;
    max-width: 800px;
    margin: 0 auto;
    padding: 12px;
    color: #1f2937;
    white-space: normal;
    font-family: inherit;
    line-height: 1.4;
}

.mtgr-redemption *,
.mtgr-redemption *::before,
.mtgr-redemption *::after {
    box-sizing: border-box;
}

.mtgr-redemption__balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.mtgr-redemption__balance-label {
    font-size: 1rem;
    font-weight: 600;
}

.mtgr-redemption__balance-value {
    color: #1565c0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.mtgr-redemption__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.mtgr-redemption__tab,
.mtgr-redemption__redeem,
.mtgr-redemption__page {
    min-height: 34px;
    border: 1px solid #1976d2;
    border-radius: 5px;
    margin: 0 !important;
    padding: 5px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.mtgr-redemption__tab,
.mtgr-redemption__page {
    background: #fff;
    color: #1565c0;
}

.mtgr-redemption__tab.is-active,
.mtgr-redemption__page.is-active,
.mtgr-redemption__redeem {
    background: #1976d2;
    color: #fff;
}

.mtgr-redemption__tab:hover,
.mtgr-redemption__tab:focus-visible,
.mtgr-redemption__redeem:hover,
.mtgr-redemption__redeem:focus-visible,
.mtgr-redemption__page:hover,
.mtgr-redemption__page:focus-visible {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.mtgr-redemption__redeem:disabled {
    border-color: #9ca3af;
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
}

.mtgr-redemption__status {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 5px;
    background: #eef6ff;
    color: #0d47a1;
}

.mtgr-redemption__status[data-status-type="success"] {
    background: #ecfdf3;
    color: #067647;
}

.mtgr-redemption__status[data-status-type="error"] {
    background: #fef3f2;
    color: #b42318;
}

.mtgr-redemption__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

.mtgr-redemption__card {
    display: flex;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.mtgr-redemption__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.mtgr-redemption__image,
.mtgr-redemption__image-placeholder {
    display: block;
    width: 100%;
    height: 150px;
    background: #f8fafc;
}

.mtgr-redemption__image {
    object-fit: contain;
}

.mtgr-redemption__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.mtgr-redemption__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: 12px;
}

.mtgr-redemption__name {
    margin: 0 0 4px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.mtgr-redemption__description,
.mtgr-redemption__empty {
    color: #64748b;
}

.mtgr-redemption__description {
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
    white-space: normal;
    line-height: 1.35;
}

.mtgr-redemption__content > div:last-child {
    margin-top: 2px;
    text-align: right;
    white-space: normal;
}

.mtgr-redemption__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 8px;
}

.mtgr-redemption__meta span {
    border-radius: 999px;
    padding: 3px 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.8125rem;
}

.mtgr-redemption__meta .mtgr-redemption__virtual {
    background: #e0f2fe;
    color: #075985;
}

.mtgr-redemption__redeem {
    display: block;
    width: auto;
    max-width: 100%;
    min-width: 120px;
    min-height: 34px;
    margin: 0 0 0 auto !important;
    padding: 6px 14px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

.mtgr-redemption__orders {
    display: grid;
    gap: 8px;
}

.mtgr-redemption__order {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.mtgr-redemption__order-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.mtgr-redemption__order-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.mtgr-redemption__order-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.8125rem;
}

.mtgr-redemption__order-status.is-redeemed {
    background: #ecfdf3;
    color: #067647;
}

.mtgr-redemption__order-status.is-unused {
    background: #fffaeb;
    color: #b54708;
}

.mtgr-redemption__order-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.mtgr-redemption__order-details div {
    min-width: 0;
}

.mtgr-redemption__order-details dt {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 0.8125rem;
}

.mtgr-redemption__order-details dd {
    overflow-wrap: anywhere;
    margin: 0;
    font-weight: 600;
}

.mtgr-redemption__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.mtgr-redemption__page {
    min-width: 34px;
    padding-right: 8px;
    padding-left: 8px;
}

.mtgr-redemption__modal[hidden] {
    display: none !important;
}

.mtgr-redemption__modal {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    white-space: normal;
}

.mtgr-redemption__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
}

.mtgr-redemption__modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    border-radius: 12px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
    color: #1f2937;
    text-align: center;
}

.mtgr-redemption__modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #ecfdf3;
    color: #067647;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.mtgr-redemption__modal-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    line-height: 1.3;
}

.mtgr-redemption__modal-message {
    margin: 0 0 16px;
    color: #475467;
    line-height: 1.5;
}

.mtgr-redemption__modal-close {
    min-height: 38px;
    margin: 0 !important;
    border: 1px solid #1976d2;
    border-radius: 5px;
    padding: 7px 18px;
    background: #1976d2;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 600px) {
    .mtgr-redemption {
        padding: 8px;
    }

    .mtgr-redemption__grid,
    .mtgr-redemption__order-details {
        grid-template-columns: 1fr;
    }

    .mtgr-redemption__balance {
        padding: 9px 10px;
    }

    .mtgr-redemption__modal-dialog {
        padding: 20px 16px;
    }
}
