/* ==========================================================================
   WF Credit History Shortcode — [wf_credit_history]
   ========================================================================== */

/* Wrapper */
.wf-ch-wrap {
    font-family: 'Inter', 'Mulish', sans-serif;
    color: #1a1a2e;
    width: 100%;
}

/* ---- Header ---- */
.wf-ch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e8eaf6;
}

.wf-ch-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #1C1C84;
}

.wf-ch-current-credits {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f0fb;
    border: 1px solid #c5c6e8;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 14px;
    color: #1C1C84;
}

.wf-ch-current-credits strong {
    font-size: 18px;
    font-weight: 700;
}

/* ---- Notice / Empty state ---- */
.wf-ch-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.wf-ch-notice--warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #795500;
}

.wf-ch-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fafbff;
    border: 2px dashed #d0d2e8;
    border-radius: 12px;
    color: #8b8eaf;
    text-align: center;
}

.wf-ch-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    opacity: 0.5;
}

.wf-ch-empty p {
    margin: 0;
    font-size: 15px;
}

/* ---- Table wrapper (horizontal scroll on small screens) ---- */
.wf-ch-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e8eaf6;
    box-shadow: 0 2px 12px rgba(28, 28, 132, 0.06);
}

/* ---- Table ---- */
.wf-ch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

.wf-ch-table thead tr {
    background: #1C1C84;
    color: #ffffff;
}

.wf-ch-table thead th {
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.wf-ch-table thead th.wf-ch-num {
    text-align: center;
}

.wf-ch-table tbody tr {
    border-bottom: 1px solid #f0f1fa;
    transition: background 0.15s ease;
}

.wf-ch-table tbody tr:last-child {
    border-bottom: none;
}

.wf-ch-table tbody tr:hover {
    background: #f5f6ff;
}

.wf-ch-table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    color: #333355;
}

/* Date column */
.wf-ch-table .wf-ch-date {
    white-space: nowrap;
    font-size: 13px;
    color: #6b6b99;
}

/* Action / Transaction column */
.wf-ch-table .wf-ch-action {
    font-weight: 500;
    max-width: 220px;
}

/* Source page column */
.wf-ch-table .wf-ch-page {
    max-width: 200px;
}

.wf-ch-table .wf-ch-page a {
    color: #1C1C84;
    text-decoration: none;
    font-size: 13px;
    word-break: break-word;
}

.wf-ch-table .wf-ch-page a:hover {
    text-decoration: underline;
    color: #2d2da0;
}

/* Numeric columns */
.wf-ch-table .wf-ch-num {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Change badges ---- */
.wf-ch-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    min-width: 44px;
    text-align: center;
}

.wf-ch-badge--plus {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.wf-ch-badge--minus {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f48fb1;
}

.wf-ch-badge--zero {
    background: #f3f3f3;
    color: #888;
    border: 1px solid #ddd;
}

/* ---- Pagination ---- */
.wf-ch-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.wf-ch-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #d0d2e8;
    background: #ffffff;
    color: #1C1C84;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.wf-ch-page-btn:hover {
    background: #f0f0fb;
    border-color: #1C1C84;
    color: #1C1C84;
    text-decoration: none;
}

.wf-ch-page-btn--current {
    background: #1C1C84;
    color: #ffffff;
    border-color: #1C1C84;
    cursor: default;
    pointer-events: none;
}

.wf-ch-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    color: #8b8eaf;
    font-size: 14px;
}

.wf-ch-total {
    margin: 10px 0 0;
    font-size: 12px;
    color: #9999bb;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .wf-ch-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wf-ch-table thead th,
    .wf-ch-table tbody td {
        padding: 10px 12px;
    }

    .wf-ch-title {
        font-size: 18px;
    }
}
