/*
 * Loyalty Points — My Account "Punkty" page styling.
 * Brand: primary #24317C, accent #5CC9F5. Lightweight, mobile-first.
 *
 * @package Waterdrop_Loyalty_Points
 */

.wdlp-points {
    --wdlp-primary: #24317C;
    --wdlp-accent: #5CC9F5;
    --wdlp-ink: #1f2430;
    --wdlp-muted: #6b7280;
    --wdlp-line: #e3e7ef;
    --wdlp-surface: #f6f8fc;
    color: var(--wdlp-ink);
}

.wdlp-points section {
    margin-bottom: 28px;
}

.wdlp-login-prompt {
    padding: 16px 18px;
    background: var(--wdlp-surface);
    border-left: 3px solid var(--wdlp-accent);
    border-radius: 6px;
}

/* ── Balance card ───────────────────────────────────────────── */

.wdlp-balance-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 24px 26px;
    background: linear-gradient(135deg, var(--wdlp-primary) 0%, #2f3f9c 100%);
    border-radius: 12px;
    color: #fff;
}

.wdlp-balance-card__primary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wdlp-balance-card__label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.85) !important;
}

.wdlp-balance-card__value {
    font-size: 44px;
    line-height: 1.05;
    font-weight: 700;
    color: #ffffff !important;
}

.wdlp-balance-card__zl {
    font-size: 15px;
    color: var(--wdlp-accent) !important;
    font-weight: 600;
}

/* Stat chips — translucent panels guarantee contrast on the dark card. */
.wdlp-balance-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wdlp-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    min-width: 130px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.wdlp-stat__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8) !important;
}

.wdlp-stat__value {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.25;
}

.wdlp-stat__value small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ── Redeem form ────────────────────────────────────────────── */

.wdlp-redeem__heading,
.wdlp-history__heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--wdlp-primary);
    margin: 0 0 12px;
}

.wdlp-redeem__notice {
    padding: 14px 16px;
    background: var(--wdlp-surface);
    border-radius: 8px;
    color: var(--wdlp-muted);
    margin: 0;
}

.wdlp-redeem__rate {
    font-size: 14px;
    color: var(--wdlp-muted);
    margin: 0 0 14px;
}

.wdlp-redeem__rules {
    font-size: 13px;
    color: var(--wdlp-muted);
    line-height: 1.5;
    margin: 0 0 16px;
}

.wdlp-redeem__form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: var(--wdlp-surface);
    border: 1px solid var(--wdlp-line);
    border-radius: 10px;
}

.wdlp-redeem__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.wdlp-redeem__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wdlp-redeem__field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--wdlp-ink);
}

.wdlp-redeem__input {
    width: 160px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wdlp-line);
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    margin-bottom: 0 !important;
}

.wdlp-redeem__input:focus {
    outline: none;
    border-color: var(--wdlp-accent);
    box-shadow: 0 0 0 3px rgba(92, 201, 245, 0.25);
}

.wdlp-redeem__hint {
    font-size: 15px;
    font-weight: 600;
    color: var(--wdlp-primary);
    margin: 0;
}

.wdlp-redeem__submit {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 8px;
    background: var(--wdlp-primary);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.wdlp-redeem__submit:hover,
.wdlp-redeem__submit:focus {
    background: #1b2660;
    color: #fff !important;
}

/* ── Coupons ────────────────────────────────────────────────── */

.wdlp-coupons__heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--wdlp-primary);
    margin: 0 0 6px;
}

.wdlp-coupons__intro {
    font-size: 14px;
    color: var(--wdlp-muted);
    margin: 0 0 14px;
}

.wdlp-coupons__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wdlp-coupons__table thead th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--wdlp-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wdlp-primary);
}

.wdlp-coupons__table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--wdlp-line);
    vertical-align: middle;
}

.wdlp-coupons__code-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.wdlp-coupons__code {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--wdlp-line);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--wdlp-primary);
    user-select: all;
}

.wdlp-copy {
    appearance: none;
    cursor: pointer;
    border: 1px solid var(--wdlp-primary);
    background: #fff;
    color: var(--wdlp-primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wdlp-copy:hover,
.wdlp-copy:focus {
    background: var(--wdlp-primary);
    color: #fff;
}

.wdlp-copy.is-copied {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

/* The "Punkty lojalnościowe" account-menu icon lives in menu-icon.css (loaded
   site-wide so it also shows in the header account dropdown). */

/* ── History table ──────────────────────────────────────────── */

.wdlp-history__empty {
    color: var(--wdlp-muted);
    margin: 0;
}

.wdlp-history__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wdlp-history__table thead th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--wdlp-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wdlp-primary);
}

.wdlp-history__table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--wdlp-line);
    vertical-align: middle;
}

.wdlp-history__points-col,
.wdlp-history__points {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.wdlp-history__points--plus {
    color: #15803d;
}

.wdlp-history__points--minus {
    color: #b91c1c;
}

.wdlp-history__pagination {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wdlp-history__pagination .page-numbers {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid var(--wdlp-line);
    border-radius: 6px;
    text-decoration: none;
    color: var(--wdlp-primary);
    font-size: 14px;
    line-height: 1;
}

.wdlp-history__pagination .page-numbers.current {
    background: var(--wdlp-primary);
    border-color: var(--wdlp-primary);
    color: #fff;
}

.wdlp-history__pagination a.page-numbers:hover {
    border-color: var(--wdlp-accent);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
    .wdlp-balance-card {
        flex-direction: column;
        align-items: stretch;
    }

    .wdlp-balance-card__stats {
        width: 100%;
    }

    .wdlp-stat {
        flex: 1 1 130px;
    }

    .wdlp-history__table thead,
    .wdlp-coupons__table thead {
        display: none;
    }

    .wdlp-history__table,
    .wdlp-history__table tbody,
    .wdlp-history__table tr,
    .wdlp-history__table td,
    .wdlp-coupons__table,
    .wdlp-coupons__table tbody,
    .wdlp-coupons__table tr,
    .wdlp-coupons__table td {
        display: block;
        width: 100%;
    }

    .wdlp-history__table tr,
    .wdlp-coupons__table tr {
        border-bottom: 2px solid var(--wdlp-line);
        padding: 6px 0;
    }

    .wdlp-history__table tbody td,
    .wdlp-coupons__table tbody td {
        border: 0;
        padding: 6px 12px;
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }

    .wdlp-history__table tbody td::before,
    .wdlp-coupons__table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--wdlp-muted);
    }

    .wdlp-history__points {
        text-align: right;
    }
}
