/* Brand colour: change these two values to re-colour the whole plugin. */
:root {
    --wcpr-brand: #12304c;
    --wcpr-brand-dark: #0d2438;
}

.wcpr-account-card,
.wcpr-checkout-box {
    box-sizing: border-box;
    font-family: inherit;
}

.wcpr-account-card *,
.wcpr-checkout-box * {
    box-sizing: border-box;
}

.wcpr-account-card {
    border: 1px solid #e4e8e5;
    border-radius: 24px;
    padding: 28px;
    margin: 0 0 32px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(20, 40, 28, .05);
}

.wcpr-account-card__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(180px, .8fr);
    gap: 36px;
    align-items: center;
    padding: 4px 10px 26px;
}

.wcpr-account-card__label {
    font-size: 17px;
    line-height: 1.25;
    color: #515c56;
    font-weight: 500;
    letter-spacing: .01em;
}

.wcpr-account-card__value {
    margin-top: 6px;
    color: var(--wcpr-brand);
    font-size: clamp(44px, 5.5vw, 76px);
    line-height: .95;
    font-weight: 800;
    letter-spacing: -.04em;
}

.wcpr-account-card__value .woocommerce-Price-currencySymbol {
    margin-right: 2px;
}

.wcpr-account-card__divider {
    width: 1px;
    height: 92px;
    background: #e5e9e7;
}

.wcpr-account-card__point-number {
    margin-top: 10px;
    color: var(--wcpr-brand);
    font-size: clamp(28px, 3vw, 46px);
    line-height: 1;
    font-weight: 800;
}

.wcpr-account-card__redeem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    padding: 14px 24px 14px 28px;
    border-radius: 999px;
    background: var(--wcpr-brand);
    color: #fff !important;
    font-size: 22px;
    font-weight: 500;
    text-decoration: none !important;
    transition: transform .18s ease, background .18s ease;
}

.wcpr-account-card__redeem:hover {
    transform: translateY(-1px);
    background: var(--wcpr-brand-dark);
}

.wcpr-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    line-height: .55;
    font-weight: 300;
}

.wcpr-checkout-row > td {
    padding: 12px 0 !important;
    border-top: 0 !important;
}

.wcpr-checkout-box {
    position: relative;
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid #bfe0ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #eff8ff 0%, #eaf6ff 100%);
}

.wcpr-checkout-box__icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #d0f6e1;
    color: #173b29;
}

.wcpr-checkout-box__icon svg {
    width: 31px;
    height: 31px;
}

.wcpr-checkout-box__title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: #141914;
}

.wcpr-checkout-box__sub {
    margin-top: 3px;
    font-size: 15px;
    line-height: 1.4;
    color: #2f3832;
}

.wcpr-redeem-toggle {
    border: 0 !important;
    background: var(--wcpr-brand) !important;
    color: #fff !important;
    border-radius: 999px !important;
    min-height: 48px;
    padding: 10px 22px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: none !important;
}

.wcpr-redeem-toggle[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* The HTML hidden attribute must always win over display rules below. */
.wcpr-checkout-box [hidden] {
    display: none !important;
}

.wcpr-checkout-redeem-form {
    grid-column: 1 / -1;
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin: 2px 0 0;
}

.wcpr-points-input-wrap {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.wcpr-checkout-box .wcpr-points-input-wrap input#wcpr-points-input {
    display: block;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: 48px !important;
    min-height: 48px;
    margin: 0 !important;
    padding: 0 44px 0 16px !important;
    border: 1px solid #cdd8d1 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #141914;
    font-size: 16px !important;
    line-height: 48px;
    box-shadow: none !important;
    -moz-appearance: textfield;
}

.wcpr-checkout-box .wcpr-points-input-wrap input#wcpr-points-input:focus {
    border-color: var(--wcpr-brand) !important;
    outline: 0;
}

.wcpr-points-input-wrap input::-webkit-outer-spin-button,
.wcpr-points-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wcpr-clear-points {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: #65706a !important;
    font-size: 22px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
}

.wcpr-clear-points:hover {
    background: #edf1ee !important;
    color: #18221c !important;
}

.wcpr-apply-points {
    flex: 0 0 auto;
    min-height: 48px;
    margin: 0 !important;
    padding: 0 26px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--wcpr-brand) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: none !important;
}

.wcpr-apply-points[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.wcpr-message {
    grid-column: 1 / -1;
    margin-top: 4px;
    color: #9c2d2d;
    font-size: 13px;
}

.wcpr-rewards-page {
    --wcpr-accent: var(--wcpr-brand);
    --wcpr-btn: var(--wcpr-brand);
    --wcpr-border: #d9d9e0;
    --wcpr-text: #1f1f26;
    box-sizing: border-box;
}

.wcpr-rewards-page *,
.wcpr-rewards-page *::before,
.wcpr-rewards-page *::after {
    box-sizing: border-box;
}

.wcpr-rewards-page [hidden] {
    display: none !important;
}

.wcpr-section-title {
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--wcpr-brand) !important;
}

.wcpr-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 19px;
    margin: 0 0 44px;
}

.wcpr-stat {
    position: relative;
    min-height: 160px;
    padding: 20px 20px 18px;
    border: 1px solid var(--wcpr-border);
    border-radius: 10px;
    background: #fff;
    color: var(--wcpr-text);
}

.wcpr-stat__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    color: var(--wcpr-accent);
}

.wcpr-stat__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wcpr-stat__label {
    font-size: 16px;
    line-height: 1.35;
}

.wcpr-stat__value {
    margin-top: 2px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--wcpr-brand);
}

.wcpr-stat__sub {
    font-size: 16px;
    line-height: 1.35;
}

.wcpr-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    max-width: none;
    margin: 0 0 26px;
    border-bottom: 1px solid var(--wcpr-border);
}

.wcpr-tabs .wcpr-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 -1px !important;
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--wcpr-text) !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
}

.wcpr-tabs .wcpr-tabs__tab:first-child {
    padding-left: 18px !important;
    padding-right: 18px !important;
}

.wcpr-tabs__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.wcpr-tabs .wcpr-tabs__tab:hover,
.wcpr-tabs .wcpr-tabs__tab.is-active {
    color: var(--wcpr-accent) !important;
}

.wcpr-tabs .wcpr-tabs__tab.is-active {
    border-bottom-color: var(--wcpr-accent) !important;
}

.wcpr-reward-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    min-height: 230px;
    padding: 12px;
    border: 1px solid var(--wcpr-border);
    border-radius: 10px;
    background: #fff;
    color: var(--wcpr-text);
}

.wcpr-reward-card__badge {
    position: absolute;
    top: -1px;
    right: -1px;
    padding: 5px 8px;
    border: 1px solid var(--wcpr-border);
    border-radius: 0 10px 0 8px;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.wcpr-reward-card__icon {
    width: 44px;
    height: 44px;
    margin: 20px 0 16px 0;
    color: var(--wcpr-accent);
}

.wcpr-reward-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wcpr-reward-card__title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.wcpr-reward-card__desc {
    margin: 4px 0 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #5c5c68;
}

.wcpr-reward-card .wcpr-reward-card__btn {
    display: block;
    margin-top: auto;
    padding: 11px 14px;
    border-radius: 6px;
    background: var(--wcpr-btn);
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: background .18s ease;
}

.wcpr-reward-card .wcpr-reward-card__btn:hover {
    background: var(--wcpr-brand-dark);
}

.wcpr-reward-card .wcpr-reward-card__btn.is-disabled {
    background: #c9c9d3;
    cursor: not-allowed;
}

@media (max-width: 820px) {
    .wcpr-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 600px) {
    /* Points / Redeemed / Used rewards: one card, three columns, one line. */
    .wcpr-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        margin-bottom: 32px;
        border: 1px solid var(--wcpr-border);
        border-radius: 12px;
        background: #fff;
    }

    .wcpr-stat {
        min-height: 0;
        padding: 16px 6px 14px;
        border: 0;
        border-radius: 0;
        text-align: center;
    }

    .wcpr-stat + .wcpr-stat::before {
        content: "";
        position: absolute;
        top: 18%;
        bottom: 18%;
        left: 0;
        width: 1px;
        background: var(--wcpr-border);
    }

    .wcpr-stat__icon {
        width: 34px;
        height: 34px;
        margin: 0 auto 8px;
    }

    .wcpr-stat__label {
        font-size: 13px;
    }

    .wcpr-stat__value {
        font-size: 19px;
        word-break: break-word;
    }

    .wcpr-stat__sub {
        font-size: 12px;
        line-height: 1.3;
    }

    .wcpr-stat__sub--extra {
        display: none;
    }

    .wcpr-section-title {
        font-size: 18px !important;
    }

    .wcpr-tabs .wcpr-tabs__tab {
        gap: 6px;
        padding: 10px 6px !important;
        font-size: 16px !important;
    }

    .wcpr-tabs .wcpr-tabs__tab:first-child {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .wcpr-tabs__icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .wcpr-reward-card {
        max-width: none;
    }
}

.wcpr-activity-table .wcpr-pos {
    color: #1f7a45;
    font-weight: 700;
}

.wcpr-activity-table .wcpr-neg {
    color: #b3261e;
    font-weight: 700;
}

.wcpr-orders-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e8e6;
    border-radius: 18px;
}

.wcpr-orders-table {
    min-width: 760px;
    margin: 0 !important;
    border: 0 !important;
}

.wcpr-orders-table th,
.wcpr-orders-table td {
    padding: 15px 16px !important;
}

.wcpr-orders-table .wcpr-empty {
    text-align: center;
    padding: 32px 20px !important;
    opacity: .7;
}

.wcpr-pagination {
    margin-top: 18px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.wcpr-pagination a {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e5e2;
    border-radius: 10px;
    text-decoration: none;
}

.wcpr-pagination a.is-current {
    background: var(--wcpr-brand);
    color: #fff;
    border-color: var(--wcpr-brand);
}

@media (max-width: 700px) {
    .wcpr-account-card {
        padding: 20px;
        border-radius: 20px;
    }

    .wcpr-account-card__top {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-bottom: 20px;
    }

    .wcpr-account-card__divider {
        width: 100%;
        height: 1px;
    }

    .wcpr-account-card__redeem {
        font-size: 19px;
        min-height: 60px;
    }

    .wcpr-checkout-box {
        grid-template-columns: 52px 1fr;
        gap: 13px;
    }

    .wcpr-checkout-box__icon {
        width: 50px;
        height: 50px;
    }

    .wcpr-redeem-toggle {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
}

/* Balance card sits above the My Account navigation, spanning the full width. */
.wcpr-account-card--top {
    display: block;
    width: 100%;
    max-width: 100%;
    clear: both;
    flex: 0 0 100%;
    grid-column: 1 / -1;
}

.wcpr-account-card--top .wcpr-account-card__redeem {
    display: flex;
    width: 100%;
}

.woocommerce-account .woocommerce:has(> .wcpr-account-card--top) {
    flex-wrap: wrap;
}

.wcpr-checkout-box__note {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #5c6770;
}

/* Single product: "Purchase and earn N points" */
.wcpr-product-points {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
    font-size: 15px;
    line-height: 1.4;
}

.wcpr-product-points[hidden] {
    display: none !important;
}

.wcpr-product-points__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--wcpr-brand);
}

.wcpr-product-points strong {
    color: var(--wcpr-brand);
    font-weight: 700;
}

/* Inside the stock line: "971 in stock | Earn 102 points" */
.stock .wcpr-stock-points,
.wcpr-stock-points {
    display: inline;
    color: #4a4f57;
    font-weight: 400;
}

.wcpr-stock-points__sep {
    margin: 0 10px;
    color: #b8bec6;
}

.wcpr-stock-points strong {
    color: var(--wcpr-brand);
    font-weight: 700;
}

.wcpr-stock-points__amount,
.wcpr-product-points__amount {
    color: var(--wcpr-brand);
    font-weight: 700 !important;
}
