/* باشگاه مشتریان ووکامرس - استایل فرانت‌اند راست‌چین */

.wcc-wrap,
.wcc-wallet-page,
.wcc-employee-dashboard,
.wcc-referral-page {
        direction: rtl;
        font-family: "Vazirmatn", "IRANSans", "Tahoma", Arial, sans-serif;
        color: #2c3e50;
        line-height: 1.8;
}

/* === کارت موجودی کیف پول === */
.wcc-balance-card {
        background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
        color: #fff;
        border-radius: 12px;
        padding: 32px;
        text-align: center;
        margin-bottom: 24px;
        box-shadow: 0 6px 18px rgba(21, 101, 192, 0.25);
}

.wcc-balance-label {
        font-size: 14px;
        opacity: 0.9;
        margin-bottom: 8px;
}

.wcc-balance-amount {
        font-size: 36px;
        font-weight: 700;
        margin-bottom: 16px;
}

/* رنگ "تومان" در کارت موجودی - سفید */
.wcc-balance-card .woocommerce-Price-currencySymbol,
.wcc-balance-card .woocommerce-Price-amount bdi {
        color: #fff !important;
        font-weight: 700;
}

.wcc-balance-card .woocommerce-Price-currencySymbol {
        font-size: 22px;
        margin-left: 4px;
}

.wcc-balance-meta {
        display: flex;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
        font-size: 13px;
}

.wcc-balance-meta .wcc-role-badge {
        background: rgba(255, 255, 255, 0.2);
        padding: 4px 12px;
        border-radius: 20px;
        font-weight: 600;
}

.wcc-balance-meta .wcc-info {
        display: flex;
        align-items: center;
        gap: 4px;
}

/* === کارت کوپن === */
.wcc-coupon-card {
        background: #fff;
        border: 2px dashed #1565c0;
        border-radius: 8px;
        padding: 24px;
        margin-bottom: 24px;
        text-align: center;
}

.wcc-coupon-card h3 {
        color: #1565c0;
        margin-top: 0;
        font-size: 18px;
}

.wcc-coupon-code {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin: 16px 0;
}

.wcc-coupon-code code,
.wcc-referral-code code {
        background: #f5f5f5;
        border: 1px solid #ddd;
        padding: 12px 24px;
        font-size: 20px;
        font-weight: 700;
        color: #1565c0;
        border-radius: 6px;
        letter-spacing: 1px;
}

.wcc-coupon-discount {
        font-size: 14px;
        color: #666;
        margin: 8px 0;
}

/* === جعبه اطلاعات === */
.wcc-info-box {
        background: #f9f9f9;
        border-right: 4px solid #1565c0;
        padding: 16px 20px;
        margin-bottom: 24px;
        border-radius: 4px;
}

.wcc-info-box h4 {
        margin: 0 0 12px 0;
        color: #1565c0;
        font-size: 15px;
}

.wcc-info-box ul {
        margin: 0;
        padding-right: 16px;
}

.wcc-info-box li {
        margin-bottom: 6px;
        font-size: 13px;
        color: #555;
}

/* === جدول تراکنش‌ها === */
.wcc-transactions-section h3 {
        margin-bottom: 16px;
        font-size: 18px;
}

.wcc-transactions-table,
.wcc-table {
        width: 100%;
        border-collapse: collapse;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wcc-transactions-table th,
.wcc-transactions-table td,
.wcc-table th,
.wcc-table td {
        padding: 12px;
        text-align: right;
        border-bottom: 1px solid #f0f0f0;
        font-size: 13px;
}

.wcc-transactions-table th,
.wcc-table th {
        background: #f8f9fa;
        color: #2c3e50;
        font-weight: 600;
}

.wcc-transactions-table tr:last-child td,
.wcc-table tr:last-child td {
        border-bottom: none;
}

.wcc-transactions-table tr:hover,
.wcc-table tr:hover {
        background: #fafbfc;
}

/* === بادج‌ها === */
.wcc-badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        background: #e9ecef;
        color: #495057;
}

.wcc-badge-type-cashback { background: #d4edda; color: #155724; }
.wcc-badge-type-refund { background: #f8d7da; color: #721c24; }
.wcc-badge-type-wallet_payment { background: #cce5ff; color: #004085; }
.wcc-badge-type-admin_adjust { background: #fff3cd; color: #856404; }
.wcc-badge-type-referral_bonus { background: #d1ecf1; color: #0c5460; }

.wcc-badge-success { background: #d4edda; color: #155724; }
.wcc-badge-danger { background: #f8d7da; color: #721c24; }
.wcc-badge-neutral { background: #e9ecef; color: #495057; }

/* === مبالغ === */
.wcc-amount-positive {
        color: #28a745;
        font-weight: 600;
}

.wcc-amount-negative {
        color: #dc3545;
        font-weight: 600;
}

/* === پیام‌ها === */
.wcc-message {
        padding: 16px 20px;
        border-radius: 6px;
        margin: 16px 0;
        font-size: 14px;
}

.wcc-message-info {
        background: #d1ecf1;
        color: #0c5460;
        border-right: 4px solid #17a2b8;
}

.wcc-message-success {
        background: #d4edda;
        color: #155724;
        border-right: 4px solid #28a745;
}

.wcc-message-warning {
        background: #fff3cd;
        color: #856404;
        border-right: 4px solid #ffc107;
}

.wcc-message-error {
        background: #f8d7da;
        color: #721c24;
        border-right: 4px solid #dc3545;
}

/* === گزینه کیف پول در صفحه پرداخت === */
.wcc-wallet-option {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 20px;
        margin: 16px 0;
}

.wcc-wallet-option h3 {
        margin-top: 0;
        color: #1565c0;
        font-size: 16px;
}

.wcc-wallet-option p {
        margin: 6px 0;
        font-size: 13px;
}

.wcc-wallet-applied {
        background: #d4edda;
        padding: 10px;
        border-radius: 4px;
}

/* === داشبورد کارمند === */
.wcc-hero {
        background: linear-gradient(135deg, #4a90e2 0%, #5ba0f2 100%);
        color: #fff;
        padding: 24px;
        border-radius: 12px;
        margin-bottom: 24px;
}

.wcc-hero h2 {
        margin: 0 0 8px 0;
        font-size: 22px;
        color: #fff;
}

.wcc-hero p {
        margin: 0;
        opacity: 0.95;
        font-size: 14px;
}

/* === گرید آمار === */
.wcc-stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
}

.wcc-stat-card {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
        transition: transform 0.2s, box-shadow 0.2s;
}

.wcc-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wcc-stat-icon {
        font-size: 32px;
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 50%;
        flex-shrink: 0;
}

.wcc-stat-content {
        display: flex;
        flex-direction: column;
}

.wcc-stat-value {
        font-size: 22px;
        font-weight: 700;
        color: #2c3e50;
        line-height: 1.4;
}

.wcc-stat-label {
        font-size: 12px;
        color: #6c757d;
}

/* === کارت معرف === */
.wcc-referral-card,
.wcc-rules-card {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 24px;
        margin-bottom: 24px;
}

.wcc-referral-card h3,
.wcc-rules-card h3 {
        margin-top: 0;
        color: #1565c0;
        font-size: 18px;
}

.wcc-referral-code,
.wcc-referral-link {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 12px 0;
        flex-wrap: wrap;
}

.wcc-referral-link label {
        font-size: 13px;
        color: #555;
        min-width: 100px;
}

.wcc-referral-input {
        flex: 1;
        min-width: 200px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 13px;
        background: #f9f9f9;
        direction: ltr;
        text-align: left;
}

.wcc-help {
        font-size: 12px;
        color: #999;
        margin-top: 8px;
}

/* === دکمه‌های اشتراک === */
.wcc-share-buttons {
        display: flex;
        gap: 8px;
        margin-top: 16px;
        flex-wrap: wrap;
}

.wcc-share {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        border-radius: 4px;
        color: #fff !important;
        text-decoration: none !important;
        font-size: 13px;
        font-weight: 600;
        transition: opacity 0.2s;
}

.wcc-share:hover {
        opacity: 0.85;
}

.wcc-share-telegram { background: #0088cc; }
.wcc-share-whatsapp { background: #25d366; }
.wcc-share-facebook { background: #3b5998; }

/* === گرید داشبورد === */
.wcc-dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-top: 24px;
}

@media (max-width: 768px) {
        .wcc-dashboard-grid {
                grid-template-columns: 1fr;
        }

        .wcc-balance-amount {
                font-size: 28px;
        }

        .wcc-stats-grid {
                grid-template-columns: 1fr;
        }

        .wcc-coupon-code,
        .wcc-referral-code,
        .wcc-referral-link {
                flex-direction: column;
                align-items: stretch;
        }
}

.wcc-dashboard-col h3 {
        margin-top: 0;
        font-size: 16px;
        color: #2c3e50;
}

/* === اعلان‌ها در سایت === */
#wcc-notifications-container {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 9999;
        max-width: 350px;
}

.wcc-notification {
        background: #fff;
        border-right: 4px solid #17a2b8;
        border-radius: 4px;
        padding: 12px 36px 12px 16px;
        margin-bottom: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        position: relative;
        animation: wcc-slide-in 0.3s ease-out;
}

.wcc-notification-success { border-right-color: #28a745; }
.wcc-notification-warning { border-right-color: #ffc107; }
.wcc-notification-error { border-right-color: #dc3545; }

.wcc-notification-close {
        position: absolute;
        top: 8px;
        left: 8px;
        cursor: pointer;
        font-size: 18px;
        color: #999;
        font-weight: bold;
}

.wcc-notification-close:hover {
        color: #333;
}

.wcc-notification p {
        margin: 0;
        font-size: 13px;
        color: #2c3e50;
}

@keyframes wcc-slide-in {
        from {
                transform: translateX(-100%);
                opacity: 0;
        }
        to {
                transform: translateX(0);
                opacity: 1;
        }
}

/* === استایل ادمین === */
.wcc-wrap .wcc-stats-grid {
        margin: 20px 0;
}

.wcc-wrap .wcc-stat-card {
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 4px;
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
}

.wcc-wrap .wcc-stat-icon {
        font-size: 28px;
}

.wcc-wrap .wcc-dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 20px;
}

@media (max-width: 1200px) {
        .wcc-wrap .wcc-dashboard-grid {
                grid-template-columns: 1fr;
        }
}

.wcc-card {
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 4px;
        padding: 20px;
        margin: 20px 0;
}

.wcc-form-inline p {
        display: inline-block;
        margin-left: 10px;
        vertical-align: middle;
}

.wcc-filter-form {
        background: #f9f9f9;
        padding: 12px;
        border-radius: 4px;
        margin: 12px 0;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
}

.wcc-filter-form select,
.wcc-filter-form input {
        min-width: 150px;
}

.wcc-code {
        background: #f0f0f1;
        padding: 4px 8px;
        border-radius: 3px;
        font-family: monospace;
        font-weight: 600;
        color: #1565c0;
}

.wcc-badge {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 600;
        background: #e5e5e5;
        color: #444;
}

.wcc-badge-success { background: #d4edda; color: #155724; }
.wcc-badge-danger { background: #f8d7da; color: #721c24; }
.wcc-badge-neutral { background: #e5e5e5; color: #444; }

.wcc-amount-positive { color: #28a745; font-weight: 600; }
.wcc-amount-negative { color: #dc3545; font-weight: 600; }
