/**
 * WC Referral Wallet — Styles frontend (Mon Compte)
 */

.wcrw-wallet-wrap {
    max-width: 800px;
}

/* ── Résumé (3 cartes) ──────────────────────── */

.wcrw-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.wcrw-summary__card {
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.wcrw-summary__card--balance {
    background: #eef7ee;
    border-color: #b7ddb7;
}

.wcrw-summary__label {
    display: block;
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.wcrw-summary__value {
    display: block;
    font-size: 1.6em;
    font-weight: 700;
    color: #1a1a1a;
}

.wcrw-summary__card--balance .wcrw-summary__value {
    color: #2e7d32;
}

/* ── Sections ────────────────────────────────── */

.wcrw-section {
    margin-bottom: 32px;
}

.wcrw-section h3 {
    font-size: 1.15em;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.wcrw-section__desc {
    color: #555;
    margin-bottom: 16px;
}

.wcrw-section--info {
    background: #f0f7f0;
    border: 1px solid #b7ddb7;
    border-radius: 8px;
    padding: 20px 24px;
}

.wcrw-section--info h3 {
    border-bottom-color: #b7ddb7;
    color: #2e7d32;
}

.wcrw-section--info p {
    color: #444;
    margin: 0;
}

/* ── Lien de parrainage ──────────────────────── */

.wcrw-referral-link {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.wcrw-share-help {
    font-size: 0.85em;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px;
}

.wcrw-referral-link input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    background: #fafafa;
}

.wcrw-referral-link .button {
    white-space: nowrap;
}

.wcrw-btn-copy-msg {
    white-space: nowrap;
}

.wcrw-btn-whatsapp {
    background-color: #25d366 !important;
    color: #fff !important;
    border-color: #25d366 !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wcrw-btn-whatsapp:hover {
    background-color: #1da851 !important;
    border-color: #1da851 !important;
    color: #fff !important;
}

.wcrw-btn-facebook {
    background-color: #1877f2 !important;
    color: #fff !important;
    border-color: #1877f2 !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wcrw-btn-facebook:hover {
    background-color: #1558b0 !important;
    border-color: #1558b0 !important;
    color: #fff !important;
}

.wcrw-btn-email {
    background-color: #555 !important;
    color: #fff !important;
    border-color: #555 !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wcrw-btn-email:hover {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.wcrw-referral-code-display {
    font-size: 0.9em;
    color: #777;
}

/* ── Tableau ─────────────────────────────────── */

.wcrw-table {
    width: 100%;
    font-size: 0.92em;
}

.wcrw-table th {
    text-align: left;
    font-weight: 600;
    padding: 10px 8px;
    border-bottom: 2px solid #ddd;
}

.wcrw-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* ── Badges ──────────────────────────────────── */

.wcrw-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wcrw-badge--credit,
.wcrw-badge--bonus,
.wcrw-badge--approved,
.wcrw-badge--completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.wcrw-badge--debit,
.wcrw-badge--withdrawal {
    background: #fff3e0;
    color: #e65100;
}

.wcrw-badge--pending,
.wcrw-badge--processing {
    background: #e3f2fd;
    color: #1565c0;
}

.wcrw-badge--rejected,
.wcrw-badge--cancelled {
    background: #ffebee;
    color: #c62828;
}

.wcrw-badge--adjustment {
    background: #f3e5f5;
    color: #6a1b9a;
}

/* ── Montants ────────────────────────────────── */

.wcrw-amount--positive {
    color: #2e7d32;
    font-weight: 600;
}

.wcrw-amount--negative {
    color: #c62828;
    font-weight: 600;
}

/* ── Formulaire retrait ──────────────────────── */

.wcrw-withdrawal-form {
    max-width: 480px;
}

.wcrw-form-row {
    margin-bottom: 16px;
}

.wcrw-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.wcrw-form-row input,
.wcrw-form-row select,
.wcrw-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
}

.wcrw-form-row small {
    display: block;
    color: #888;
    margin-top: 4px;
}

#wcrw-switch-bank-link {
    font-size: 0.9em;
    color: #2e7d32;
    text-decoration: underline;
}

/* ── Vide ────────────────────────────────────── */

.wcrw-empty {
    color: #999;
    font-style: italic;
    padding: 20px 0;
}

/* ── QR Code ─────────────────────────────────── */

.wcrw-qr-section {
    margin-top: 20px;
}

.wcrw-qr-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8fdf8;
    border: 1px solid #d4e8d4;
    border-radius: 8px;
    padding: 18px;
}

.wcrw-qr-card img {
    border-radius: 8px;
    border: 2px solid #e8f5e9;
    flex-shrink: 0;
}

.wcrw-qr-info p {
    margin: 0 0 6px;
    font-size: 0.92em;
    color: #444;
}

.wcrw-qr-desc {
    color: #777 !important;
    font-size: 0.85em !important;
    margin-bottom: 12px !important;
}

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

@media (max-width: 600px) {
    .wcrw-summary {
        grid-template-columns: 1fr;
    }

    .wcrw-referral-link {
        flex-direction: column;
    }

    .wcrw-table {
        font-size: 0.82em;
    }

    .wcrw-table th:nth-child(5),
    .wcrw-table td:nth-child(5) {
        display: none;
    }

    .wcrw-qr-card {
        flex-direction: column;
        text-align: center;
    }
}
