/*
 * MWP Frontend Styles — Spin Wheel · Loyalty · Referral
 */
/* Fonts loaded via wp_enqueue_style in class-assets.php */

:root {
    --mwp-purple: #6C63FF;
    --mwp-pink:   #FF6584;
    --mwp-teal:   #43B89C;
    --mwp-amber:  #F59E0B;
}

/* ─── Spin Wheel Wrap ───────────────────────────────────────────────── */
.mwp-spin-wheel-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
}

.mwp-wheel-outer {
    position: relative;
    display: inline-block;
}
#mwp-wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 8px 40px rgba(108,99,255,.25), 0 2px 8px rgba(0,0,0,.1);
    max-width: 100%;
    display: block;
}
.mwp-wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 28px solid #FF6584;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
    z-index: 2;
}

/* Spin Button */
.mwp-spin-btn {
    background: linear-gradient(135deg, #6C63FF, #FF6584);
    color: #fff;
    border: none;
    padding: 14px 44px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108,99,255,.35);
    transition: transform .2s, box-shadow .2s, opacity .2s;
    letter-spacing: -0.3px;
}
.mwp-spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(108,99,255,.45);
}
.mwp-spin-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Result Box */
.mwp-spin-result {
    background: linear-gradient(135deg, #6C63FF, #43B89C);
    color: #fff;
    padding: 18px 28px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    animation: mwp-pop .4s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 8px 28px rgba(67,184,156,.3);
    max-width: 380px;
}
.mwp-coupon-reveal {
    display: inline-block;
    background: rgba(255,255,255,.2);
    border-radius: 8px;
    padding: 8px 20px;
    margin: 10px 0;
    font-size: 22px;
    letter-spacing: 3px;
    font-family: 'JetBrains Mono', monospace;
}
.mwp-copy-coupon-btn {
    background: #fff;
    color: #6C63FF;
    border: none;
    padding: 8px 22px;
    border-radius: 30px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    font-size: 14px;
    transition: background .2s, color .2s;
}
.mwp-copy-coupon-btn:hover { background: #F0F2F7; }

@keyframes mwp-pop {
    from { transform: scale(.6); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

/* ─── Popup Overlay ─────────────────────────────────────────────────── */
.mwp-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}
.mwp-popup-inner {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    animation: mwp-pop .45s cubic-bezier(.34,1.56,.64,1);
    direction: rtl;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}
.mwp-popup-close {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #F0F2F7;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 15px;
    color: #64748B;
    transition: background .2s, color .2s;
    display: flex; align-items: center; justify-content: center;
}
.mwp-popup-close:hover { background: #FF6584; color: #fff; }
.mwp-popup-eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: #6C63FF;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.mwp-popup-title {
    font-size: 22px;
    font-weight: 800;
    color: #1E2433;
    margin: 0 0 20px;
    letter-spacing: -0.4px;
}

/* ─── My Coupons Widget ─────────────────────────────────────────────── */
.mwp-my-coupons { font-family: 'IBM Plex Sans Arabic', sans-serif; direction: rtl; }
.mwp-my-coupons h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.mwp-coupon-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border: 2px dashed #E5E9F0;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: border-color .2s;
}
.mwp-coupon-card:hover { border-color: #6C63FF; }
.mwp-coupon-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #6C63FF;
    letter-spacing: 1px;
}
.mwp-coupon-date { font-size: 12px; color: #94A3B8; }

/* ─── Loyalty Widget ────────────────────────────────────────────────── */
.mwp-account-loyalty {
    background: linear-gradient(135deg, #6C63FF, #a29bfe);
    border-radius: 16px;
    padding: 20px;
    color: #fff;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
    margin: 16px 0;
}
.mwp-loyalty-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.2);
}
.mwp-tier-icon { font-size: 28px; }
.mwp-loyalty-header strong { font-size: 28px; font-weight: 800; }
.mwp-tier-label {
    margin-right: auto;
    background: rgba(255,255,255,.2);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
}

.mwp-redeem-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mwp-redeem-form input {
    padding: 9px 14px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    width: 100px;
    font-family: inherit;
}
.mwp-redeem-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,.25); }
.button.mwp-redeem-btn {
    background: #fff !important;
    color: #6C63FF !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    padding: 9px 20px !important;
    cursor: pointer;
    font-size: 14px !important;
    height: auto !important;
}
.mwp-redeem-msg { width: 100%; margin-top: 6px; }

/* ─── Referral Box ──────────────────────────────────────────────────── */
.mwp-referral-box {
    background: #F8F9FC;
    border: 2px solid #E5E9F0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
}
.mwp-referral-box p { font-size: 14px; color: #64748B; margin-bottom: 10px; }
.mwp-referral-link-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #6C63FF;
    border-radius: 10px;
    font-size: 13px;
    color: #1E2433;
    background: #fff;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 10px;
}
.mwp-copy-btn {
    background: #6C63FF;
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .2s;
}
.mwp-copy-btn:hover { background: #5551E4; transform: translateY(-1px); }

/* ─── Loyalty Shortcode Widget ──────────────────────────────────────── */
.mwp-loyalty-widget {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6C63FF, #a29bfe);
    color: #fff;
    border-radius: 50px;
    padding: 10px 20px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
}
.mwp-points-count { font-size: 18px; font-weight: 800; }
.mwp-tier { background: rgba(255,255,255,.25); padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
