/* Smart Membership – EDD Dashboard Integration Styles */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

.sm-edd-tab { font-family:'Vazirmatn',Tahoma,sans-serif; direction:rtl; text-align:right; }

/* Active Card */
.sm-edd-active-card {
    background:#fff;
    border-radius:14px;
    padding:24px;
    border:1px solid #E2E8F0;
    box-shadow:0 4px 20px rgba(0,0,0,.07);
    margin-bottom:24px;
    position:relative;
}
.sm-edd-card-badge {
    display:inline-block;
    color:#fff;
    padding:6px 18px;
    border-radius:50px;
    font-size:.85rem;
    font-weight:700;
    margin-bottom:18px;
}
.sm-edd-grid4 {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin-bottom:18px;
}
.sm-edd-stat {
    background:#F8FAFC;
    border-radius:10px;
    padding:14px 10px;
    text-align:center;
    border:1px solid #E2E8F0;
}
.sm-edd-stat-val { display:block;font-size:1.05rem;font-weight:800;color:#1A1A2E;margin-bottom:4px; }
.sm-edd-stat-lbl { display:block;font-size:.72rem;color:#64748B;font-weight:500; }
.sm-warn-text    { color:#EF4444 !important; }

/* Progress */
.sm-edd-progress-wrap { margin-bottom:16px; }
.sm-edd-progress-bar  { background:#E2E8F0;border-radius:50px;height:8px;overflow:hidden;margin-bottom:6px; }
.sm-edd-progress-fill { height:100%;border-radius:50px;transition:width .5s ease; }
.sm-edd-progress-fill.warn { background:#EF4444 !important; }
.sm-edd-progress-lbl  { font-size:.76rem;color:#64748B; }

/* Actions */
.sm-edd-card-actions { display:flex;gap:10px;flex-wrap:wrap;margin-top:16px; }
.sm-edd-btn {
    display:inline-flex;align-items:center;gap:6px;
    padding:10px 22px;background:#6C63FF;color:#fff;
    border:none;border-radius:50px;font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:.88rem;font-weight:700;cursor:pointer;text-decoration:none;
    transition:all .2s;
}
.sm-edd-btn:hover { filter:brightness(1.1);color:#fff;text-decoration:none; }
.sm-edd-btn-danger { background:transparent;color:#EF4444;border:2px solid #EF4444; }
.sm-edd-btn-danger:hover { background:#EF4444;color:#fff; }

/* No Sub */
.sm-edd-no-sub { text-align:center;padding:36px 20px;background:#F8FAFC;border-radius:14px;border:2px dashed #E2E8F0;margin-bottom:24px; }
.sm-edd-no-sub-icon { font-size:2.5rem;margin-bottom:10px; }
.sm-edd-no-sub h4 { font-size:1.1rem;font-weight:700;margin:0 0 8px;color:#1A1A2E; }
.sm-edd-no-sub p  { color:#64748B;margin:0;font-size:.9rem; }

/* Plans Grid */
.sm-edd-plans-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
    margin-bottom:24px;
}
.sm-edd-plan {
    background:#fff;
    border:2px solid #E2E8F0;
    border-radius:14px;
    padding:22px 18px;
    position:relative;
    transition:all .2s;
    text-align:center;
}
.sm-edd-plan:hover { border-color:var(--pc,#6C63FF);transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,0,0,.1); }
.sm-edd-plan.featured { border-color:var(--pc,#6C63FF);box-shadow:0 4px 20px rgba(108,99,255,.2); }
.sm-edd-ribbon {
    position:absolute;top:-1px;right:-1px;
    background:var(--pc,#6C63FF);color:#fff;
    padding:4px 14px;border-radius:0 14px 0 10px;
    font-size:.72rem;font-weight:700;
}
.sm-edd-plan h4 { font-size:1.1rem;font-weight:800;margin:0 0 12px; }
.sm-edd-price { font-size:1.6rem;font-weight:800;color:#1A1A2E;margin-bottom:14px; }
.sm-edd-price small { font-size:.75rem;color:#64748B;font-weight:500; }
.sm-edd-features { list-style:none;margin:0 0 18px;padding:0;text-align:right; }
.sm-edd-features li { font-size:.83rem;color:#374151;padding:5px 0;border-bottom:1px solid #F1F5F9; }
.sm-edd-features li:last-child { border-bottom:none; }
.sm-edd-buy-btn {
    width:100%;padding:11px 20px;
    color:#fff;border:none;border-radius:50px;
    font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:.9rem;font-weight:700;cursor:pointer;
    transition:all .2s;
}
.sm-edd-buy-btn:hover { filter:brightness(1.1);transform:translateY(-2px); }

/* History */
.sm-edd-history { background:#fff;border-radius:14px;padding:20px;border:1px solid #E2E8F0; }
.sm-edd-history h5 { font-size:.95rem;font-weight:700;margin:0 0 14px;padding-bottom:12px;border-bottom:2px solid #E2E8F0; }
.sm-edd-table { width:100%;border-collapse:collapse;font-size:.83rem; }
.sm-edd-table th { background:#F8FAFC;padding:9px 12px;text-align:right;font-weight:600;color:#64748B;border-bottom:2px solid #E2E8F0; }
.sm-edd-table td { padding:9px 12px;border-bottom:1px solid #F1F5F9; }
.sm-edd-table tr:last-child td { border-bottom:none; }

.sm-edd-badge { display:inline-block;padding:2px 10px;border-radius:50px;font-size:.73rem;font-weight:700; }
.sm-edd-badge-green  { background:#D1FAE5;color:#065F46; }
.sm-edd-badge-red    { background:#FEE2E2;color:#991B1B; }
.sm-edd-badge-gray   { background:#F1F5F9;color:#475569; }
.sm-edd-badge-orange { background:#FEF3C7;color:#92400E; }

/* Buy Button Shortcode */
.sm-buy-btn-wrap { margin:12px 0; }
.sm-buy-btn {
    display:inline-flex;align-items:center;gap:8px;
    padding:13px 28px;color:#fff;border:none;border-radius:50px;
    font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:.95rem;font-weight:700;cursor:pointer;text-decoration:none;
    transition:all .2s;box-shadow:0 4px 16px rgba(0,0,0,.2);
}
.sm-buy-btn:hover { filter:brightness(1.1);transform:translateY(-2px);color:#fff;text-decoration:none; }
.sm-active-badge {
    display:inline-block;
    color:#fff;padding:10px 22px;border-radius:50px;
    font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:.9rem;font-weight:700;
}

/* Notice */
.sm-edd-notice { background:#F8FAFC;border:1px solid #E2E8F0;border-radius:10px;padding:20px;text-align:center;color:#64748B;font-family:'Vazirmatn',Tahoma,sans-serif; }

/* Responsive */
@media(max-width:640px){
    .sm-edd-grid4  { grid-template-columns:1fr 1fr; }
    .sm-edd-plans-grid { grid-template-columns:1fr; }
    .sm-edd-card-actions { flex-direction:column; }
}

/* ═══════════════════════════════════════════════════
 * sm_global_buy — دکمه جهانی خرید اشتراک
 * هم‌خوانی کامل با دکمه EDD (افزودن به سبد خرید)
 * ═══════════════════════════════════════════════════ */
.sm-global-buy {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    margin: 8px 0;
    box-sizing: border-box;
}

/* ── دکمه اصلی: همان شکل دکمه EDD، رنگ متفاوت ── */
.sm-gb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    /* رنگ بنفش/تیره — متفاوت از سبز EDD ولی هم‌شکل */
    background: #1a1a2e;
    color: #fff !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
    line-height: 1.4;
    letter-spacing: .01em;
}
/* وقتی رنگ از plan میاد (inline style) — اجازه override بده */
button.sm-gb-btn,
a.sm-gb-btn {
    background: var(--sm-gb-color, #1a1a2e);
}
.sm-gb-btn:hover,
.sm-gb-btn:focus {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0,0,0,.3);
    color: #fff !important;
    text-decoration: none !important;
}
.sm-gb-btn:active { transform: translateY(0); }

/* ── حالت sidebar ── */
.sm-gb-style-sidebar {
    text-align: center;
}
.sm-gb-style-sidebar .sm-gb-btn {
    margin-top: 0;
}

/* ── حالت inline (زیر محتوا) ── */
.sm-gb-style-inline {
    padding: 10px 0;
    border-top: 1px dashed #E2E8F0;
}

/* ── حالت card ── */
.sm-gb-style-card .sm-gb-card {
    border: 2px solid #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.sm-gb-card-head {
    color: #fff;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}
.sm-gb-card-body { padding: 14px 16px; }
.sm-gb-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1E293B;
    text-align: center;
    margin-bottom: 10px;
}
.sm-gb-price small {
    font-size: .75rem;
    font-weight: 400;
    color: #64748B;
    margin-right: 4px;
}
.sm-gb-feat-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    font-size: .82rem;
    color: #374151;
    line-height: 1.9;
}
.sm-gb-feat-list li::before { content: ''; }
.sm-gb-style-card .sm-gb-btn { border-radius: 0; }

/* ── badge اشتراک فعال ── */
.sm-gb-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: 6px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}
.sm-gb-badge.sm-gb-warn { background: #EF4444 !important; }

/* ── هشدار انقضا ── */
.sm-gb-renew-hint {
    font-size: .78rem;
    color: #EF4444;
    margin: 4px 0 8px;
    font-weight: 600;
    text-align: center;
}

/* ── ریسپانسیو ── */
@media(max-width: 480px) {
    .sm-gb-style-inline .sm-gb-btn { width: 100%; }
}
