/* ==========================================================================
   WP Reward Points — Frontend Styles
   All colour/size values are overridden by inline dynamic CSS from the
   UI Customizer in Settings. These are the structural / layout rules.
   ========================================================================== */

/* ── Product page points wrap ─────────────────────────────────────────── */
.wprp-product-points-wrap {
    margin: 10px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    clear: both;
}

/* Logged-in earn message */
.wprp-product-points,
.wprp-points-logged-in {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fffbea;
    border-left: 4px solid #f0c040;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: .95rem;
    margin: 0;
    line-height: 1.5;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.wprp-points-logged-in strong,
.wprp-product-points strong {
    font-weight: 700;
    white-space: nowrap;
}

/* Guest earn message */
.wprp-points-guest {
    background: #f0f6ff;
    border-left: 4px solid #93c5fd;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: .9rem;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    line-height: 1.5;
    max-width: 100%;
    box-sizing: border-box;
}

.wprp-points-teaser {
    font-weight: 500;
    white-space: nowrap;
}

.wprp-points-login-nudge {
    font-size: .85rem;
    color: #374151;
    display: inline;
}

.wprp-points-login-nudge a {
    color: #2563eb;
    text-decoration: underline;
    white-space: nowrap;
}

/* ── Points = Currency value badge ────────────────────────────────────── */
.wprp-value-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin: 0;
    white-space: nowrap;
}

/* ── Custom promo text ────────────────────────────────────────────────── */
.wprp-promo-text {
    background: #fff7ed;
    border-left: 3px solid #fb923c;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: .88rem;
    color: #78350f;
    margin: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Category / shop page promo text banner ───────────────────────────── */
.wprp-cat-promo-text {
    background: linear-gradient(135deg, #fffbea 0%, #fef3c7 100%);
    border: 1px solid #f0c040;
    border-radius: 6px;
    padding: 12px 18px;
    font-size: .95rem;
    margin: 0 0 20px;
    color: #78350f;
    width: 100%;
    box-sizing: border-box;
}

/* ── Loop / archive cards badge ───────────────────────────────────────── */
.wprp-loop-badge {
    display: inline-block;
    background: #fffbea;
    border: 1px solid #f0c040;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: .76rem;
    font-weight: 600;
    color: #92400e;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Social sharing for guests (preview, non-clickable) ──────────────── */
.wprp-social-guest {
    background: #f7f9fc;
}

.wprp-share-btn-preview {
    cursor: default;
    opacity: 0.72;
    pointer-events: none;
    user-select: none;
}

.wprp-social-guest-nudge {
    margin: 8px 0 0;
    font-size: .85rem;
    color: #374151;
}

.wprp-social-guest-nudge a {
    color: #2563eb;
    text-decoration: underline;
}

/* ── Social share section (logged-in) ────────────────────────────────── */
.wprp-social-share {
    margin: 18px 0;
    padding: 14px 16px;
    background: #f7f9fc;
    border: 1px solid #dce3ec;
    border-radius: 6px;
}

.wprp-social-title {
    margin: 0 0 10px;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wprp-social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wprp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 4px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: .82rem;
    font-weight: 600;
    transition: opacity .2s, transform .15s;
    line-height: 1.3;
}

.wprp-share-btn:hover { opacity: .85; transform: translateY(-1px); }
.wprp-share-btn.wprp-shared { opacity: .55; cursor: default; }

.wprp-share-pts {
    background: rgba(255,255,255,.22);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: .76rem;
}

/* ── Notices ──────────────────────────────────────────────────────────── */
.wprp-notice { padding: 10px 16px; border-radius: 4px; margin: 10px 0; font-size: .9rem; }
.wprp-notice-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.wprp-notice-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* ── Cart ─────────────────────────────────────────────────────────────── */
.wprp-cart-pts {
    color: #856404;
    background: #fff3cd;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: .78rem;
    margin-left: 6px;
}

.wprp-cart-total-row th,
.wprp-cart-total-row td { color: #1a7a3c; font-weight: 600; }

/* ── Redeem box ───────────────────────────────────────────────────────── */
.wprp-redeem-box {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 6px 0;
}

.wprp-redeem-box p { margin: 4px 0; font-size: .9rem; }

.wprp-redeem-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.wprp-redeem-controls input[type="number"] {
    width: 110px;
    padding: 6px 8px;
    border: 1px solid #9ae6b4;
    border-radius: 4px;
    font-size: .9rem;
}

.wprp-applied { font-weight: 600; color: #1a7a3c; margin: 6px 0 8px !important; }

#wprp-redeem-msg {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
    min-height: 1.2em;
}

/* ── Thank you page ───────────────────────────────────────────────────── */
.wprp-thankyou-points { background: #fffbea; border-left: 4px solid #f0c040; }

/* ── My Account ───────────────────────────────────────────────────────── */
.wprp-account-summary {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 16px 0;
}

.wprp-account-summary h3 { margin-top: 0; }

.wprp-referral-section {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f7f9fc;
    border: 1px solid #dce3ec;
    border-radius: 6px;
}

.wprp-referral-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
}

.wprp-referral-link-box input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .85rem;
}

.wprp-history-table { width: 100%; }
.wprp-history-table .wprp-positive { color: #1a7a3c; font-weight: 600; }
.wprp-history-table .wprp-negative { color: #c0392b; font-weight: 600; }
.wprp-referrals-table { width: 100%; font-size: .88rem; margin-top: 10px; }

/* ── Referral — share message box ────────────────────────────────────── */
.wprp-share-message-box {
    margin-top: 14px;
}
.wprp-share-message-label {
    margin-bottom: 4px;
    font-size: .88rem;
}
.wprp-share-message-textarea {
    width: 100%;
    font-size: .85rem;
    border: 1px solid #dce3ec;
    border-radius: 4px;
    padding: 8px 10px;
    resize: vertical;
    background: #fafafa;
    color: #374151;
    box-sizing: border-box;
    min-height: 90px;
}
