/* متغیرهای رنگ */
:root {
    --dwp-primary: #2196F3;
    --dwp-secondary: #607D8B;
    --dwp-success: #4CAF50;
    --dwp-danger: #F44336;
    --dwp-warning: #FF9800;
    --dwp-light: #F5F5F5;
    --dwp-dark: #333333;
    --dwp-border: #E0E0E0;
    
    /* رنگ‌های کارت پذیرنده (قابل تغییر از پنل ادمین) */
    --dwp-flip-card-bg-start: #667eea;
    --dwp-flip-card-bg-end: #764ba2;
    --dwp-flip-card-text: #ffffff;
}

/* ریست و تنظیمات پایه */
* {
    box-sizing: border-box;
}

.dwp-wallets-wrapper,
.dwp-wallet-detail-wrapper,
.dwp-wallet-description-wrapper {
    direction: rtl;
    text-align: right;
    font-family: 'Tahoma', 'Arial', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   لیست کیف پول‌ها
   ============================================ */
.dwp-wallets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 1200px) {
    .dwp-wallets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .dwp-wallets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.dwp-wallet-card {
    background: #fff;
    border: 2px solid var(--dwp-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dwp-wallet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: var(--dwp-primary);
}

.dwp-wallet-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--dwp-light);
}

.dwp-wallet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dwp-wallet-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dwp-dark);
    margin: 0 0 10px 0;
}

.dwp-wallet-info {
    background: var(--dwp-light);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
}

.dwp-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.dwp-info-item:last-child {
    border-bottom: none;
}

.dwp-info-label {
    color: var(--dwp-secondary);
}

.dwp-info-value {
    font-weight: bold;
    color: var(--dwp-dark);
}

.dwp-info-value.dwp-fee {
    color: var(--dwp-warning);
}

.dwp-info-value.dwp-used {
    color: var(--dwp-danger);
}

.dwp-activation-badge {
    background: var(--dwp-success);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    display: inline-block;
}

.dwp-wallet-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* ============================================
   دکمه‌ها
   ============================================ */
.dwp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
}

.dwp-btn-primary {
    background: var(--dwp-primary);
    color: #fff;
}

.dwp-btn-primary:hover {
    background: #1976D2;
}

.dwp-btn-secondary {
    background: var(--dwp-secondary);
    color: #fff;
}

.dwp-btn-secondary:hover {
    background: #546E7A;
}

.dwp-btn-tertiary {
    background: var(--dwp-warning);
    color: #fff;
}

.dwp-btn-tertiary:hover {
    background: #F57C00;
}

/* ============================================
   کارت کیف پول (صفحه داخلی)
   ============================================ */
.dwp-wallet-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.dwp-wallet-card-header.dwp-active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.dwp-wallet-card-header.dwp-inactive {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
}

.dwp-wallet-header-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.dwp-wallet-header-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.dwp-wallet-header-amount {
    font-size: 36px;
    font-weight: bold;
    margin: 20px 0;
}

.dwp-wallet-header-label {
    font-size: 14px;
    opacity: 0.8;
}

.dwp-wallet-actions-header {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.dwp-wallet-actions-header .dwp-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.dwp-wallet-actions-header .dwp-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ============================================
   اعتبار باقیمانده
   ============================================ */
.dwp-remaining-credit {
    background: #E3F2FD;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    border: 2px solid var(--dwp-primary);
    font-size: 16px;
}

.dwp-remaining-credit strong {
    font-size: 24px;
    color: var(--dwp-primary);
    margin: 0 5px;
}

/* ============================================
   کارت‌های پذیرنده - ساده
   ============================================ */
.dwp-merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dwp-merchant-item {
    background: #fff;
    border: 2px solid var(--dwp-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.dwp-merchant-item:hover {
    border-color: var(--dwp-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.dwp-merchant-item input[type="checkbox"] {
    display: none;
}

.dwp-merchant-item input[type="checkbox"]:checked + .dwp-merchant-content {
    background: #E8F5E9;
}

.dwp-merchant-content {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dwp-merchant-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid var(--dwp-primary);
}

.dwp-merchant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dwp-merchant-content h4 {
    font-size: 16px;
    margin: 10px 0;
    color: var(--dwp-dark);
}

.dwp-merchant-description {
    font-size: 13px;
    color: var(--dwp-secondary);
    margin: 10px 0;
    line-height: 1.5;
}

.dwp-merchant-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--dwp-primary);
    margin: 15px 0;
}

.dwp-merchant-select-indicator {
    display: none;
    background: var(--dwp-success);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 10px;
}

.dwp-merchant-item input[type="checkbox"]:checked ~ .dwp-merchant-content .dwp-merchant-select-indicator {
    display: inline-block;
}

/* ============================================
   دکمه ثبت موقت
   ============================================ */
.dwp-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px solid var(--dwp-border);
    text-align: center;
}

#dwp-save-temp-btn {
    min-width: 250px;
    padding: 15px 40px;
    font-size: 16px;
}

/* ============================================
   فرم کد معرف
   ============================================ */
.dwp-referral-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.dwp-referral-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.dwp-referral-box p {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.dwp-referral-box .dwp-form-group {
    display: flex;
    gap: 10px;
}

.dwp-referral-box .dwp-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
}

.dwp-current-referral {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    border-right: 5px solid #4CAF50;
}

.dwp-current-referral strong {
    font-size: 18px;
}

/* ============================================
   بخش فعالسازی
   ============================================ */
.dwp-activation-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.dwp-activation-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.dwp-activation-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* ============================================
   Modal
   ============================================ */
.dwp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.dwp-modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
}

.dwp-modal-close {
    float: left;
    font-size: 28px;
    cursor: pointer;
}

/* ============================================
   Message boxes
   ============================================ */
.dwp-message {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.dwp-message.dwp-success {
    background: #d4edda;
    color: #155724;
}

.dwp-message.dwp-error {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================
   RESPONSIVE موبایل
   ============================================ */
@media (max-width: 768px) {
    .dwp-wallets-wrapper,
    .dwp-wallet-detail-wrapper {
        padding: 10px;
    }
    
    /* کارت‌های کیف پول */
    .dwp-wallets-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dwp-wallet-card {
        padding: 15px;
    }
    
    .dwp-wallet-image {
        height: 120px;
    }
    
    .dwp-wallet-title {
        font-size: 16px;
    }
    
    .dwp-info-item {
        font-size: 13px;
    }
    
    .dwp-wallet-actions {
        flex-direction: column;
    }
    
    .dwp-btn {
        width: 100%;
    }
    
    /* کارت header */
    .dwp-wallet-card-header {
        padding: 20px 15px;
    }
    
    .dwp-wallet-header-name {
        font-size: 20px;
    }
    
    .dwp-wallet-header-amount {
        font-size: 28px;
    }
    
    .dwp-wallet-actions-header {
        flex-direction: row;
    }
    
    /* پذیرنده‌ها */
    .dwp-merchants-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dwp-merchant-item {
        padding: 15px;
    }
    
    .dwp-merchant-image {
        width: 70px;
        height: 70px;
    }
    
    .dwp-merchant-content h4 {
        font-size: 15px;
    }
    
    .dwp-merchant-price {
        font-size: 18px;
    }
    
    .dwp-remaining-credit {
        font-size: 14px;
        padding: 15px;
    }
    
    .dwp-remaining-credit strong {
        font-size: 20px;
    }
    
    #dwp-save-temp-btn {
        width: 100%;
        min-width: auto;
    }
    
    /* فرم کد معرف */
    .dwp-referral-box {
        padding: 20px 15px;
    }
    
    .dwp-referral-box .dwp-form-group {
        flex-direction: column;
    }
    
    .dwp-referral-box .dwp-btn {
        margin-top: 10px;
    }
    
    /* فعالسازی */
    .dwp-activation-section {
        padding: 15px;
    }
    
    .dwp-activation-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .dwp-modal-content {
        margin: 20% 5%;
        padding: 20px;
    }
}

/* ============================================
   بخش تایید نهایی
   ============================================ */
.dwp-finalize-section {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    border: 3px solid var(--dwp-success);
}

.dwp-finalize-section h3 {
    color: var(--dwp-success);
    font-size: 22px;
    margin-bottom: 20px;
}

.dwp-notice {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.dwp-notice.dwp-info {
    background: #E3F2FD;
    color: #1976D2;
    border-right: 5px solid #2196F3;
}

.dwp-notice.dwp-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-right: 5px solid #4CAF50;
}

.dwp-notice p {
    margin: 5px 0;
}

.dwp-review-selections {
    margin: 20px 0;
}

.dwp-review-selections h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dwp-dark);
}

.dwp-merchant-item.dwp-selected-review {
    background: #E8F5E9;
    border: 2px solid var(--dwp-success);
    text-align: center;
    cursor: default;
}

.dwp-merchant-item.dwp-selected-review:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dwp-warning-message {
    background: #FFF3E0;
    color: #E65100;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-right: 5px solid var(--dwp-warning);
    font-weight: bold;
}

.dwp-finalize-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.dwp-finalize-actions .dwp-btn {
    flex: 1;
    padding: 15px 30px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .dwp-finalize-section {
        padding: 20px 15px;
    }
    
    .dwp-finalize-section h3 {
        font-size: 18px;
    }
    
    .dwp-finalize-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .dwp-finalize-actions .dwp-btn {
        width: 100%;
    }
}


/* ============================================
   کارت‌های Flip پذیرنده‌ها
   ============================================ */
.dwp-merchant-card-flip {
    perspective: 1000px;
    height: 320px;
}

.dwp-merchant-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.dwp-merchant-card-inner.is-flipped {
    transform: rotateY(180deg);
}

.dwp-merchant-card-front,
.dwp-merchant-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.dwp-merchant-card-front {
    background: #fff;
    border: 2px solid var(--dwp-border);
}

.dwp-merchant-card-back {
    background: linear-gradient(135deg, var(--dwp-flip-card-bg-start) 0%, var(--dwp-flip-card-bg-end) 100%);
    color: var(--dwp-flip-card-text);
    transform: rotateY(180deg);
}

.dwp-merchant-card-front:hover {
    border-color: var(--dwp-primary);
}

/* جلوی کارت */
.dwp-merchant-card-front h4 {
    font-size: 16px;
    margin: 10px 0;
    text-align: center;
}

.dwp-merchant-checkbox-label {
    width: 100%;
    cursor: pointer;
}

.dwp-merchant-checkbox {
    display: none;
}

.dwp-checkbox-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--dwp-primary);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.dwp-checkbox-btn:hover {
    background: #1976D2;
}

.dwp-merchant-checkbox:checked + .dwp-checkbox-btn {
    background: var(--dwp-success);
}

.dwp-merchant-checkbox:checked + .dwp-checkbox-btn::before {
    content: '✓ ';
}

.dwp-flip-btn,
.dwp-flip-btn-back {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.dwp-flip-btn {
    background: var(--dwp-secondary);
    color: #fff;
}

.dwp-flip-btn:hover {
    background: #546E7A;
}

.dwp-flip-btn-back {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.dwp-flip-btn-back:hover {
    background: rgba(255,255,255,0.3);
}

/* پشت کارت */
.dwp-merchant-card-back h4 {
    font-size: 16px;
    margin: 0 0 15px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.dwp-merchant-card-back .dwp-merchant-description {
    flex: 1;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    margin-bottom: 15px;
}

.dwp-merchant-card-back .dwp-merchant-price {
    font-size: 18px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dwp-merchant-card-flip {
        height: 300px;
    }
    
    .dwp-merchant-card-front,
    .dwp-merchant-card-back {
        padding: 15px;
    }
    
    .dwp-merchant-card-front h4,
    .dwp-merchant-card-back h4 {
        font-size: 14px;
    }
    
    .dwp-merchant-card-back .dwp-merchant-description {
        font-size: 12px;
    }
}


/* ============================================
   پیام‌های Inline
   ============================================ */
.dwp-warning-inline,
.dwp-info-inline {
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.dwp-warning-inline {
    background: #FFF3E0;
    color: #E65100;
    border-right: 4px solid var(--dwp-warning);
}

.dwp-info-inline {
    background: #E3F2FD;
    color: #1976D2;
    border-right: 4px solid var(--dwp-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .dwp-warning-inline,
    .dwp-info-inline {
        font-size: 12px;
        padding: 8px 12px;
    }
}


/* ============================================
   Modal Styles
   ============================================ */
.dwp-modal-large .dwp-modal-content {
    max-width: 800px;
}

.dwp-activation-modal-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.dwp-activation-modal-options .dwp-btn {
    width: 100%;
    padding: 15px;
    font-size: 15px;
}

/* گزینه‌های افزایش اعتبار */
.dwp-upgrade-options {
    margin: 20px 0;
}

.dwp-upgrade-options h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.dwp-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.dwp-upgrade-option {
    background: #fff;
    border: 2px solid var(--dwp-border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.dwp-upgrade-option:hover {
    border-color: var(--dwp-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dwp-upgrade-option img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
}

.dwp-upgrade-option h5 {
    font-size: 16px;
    margin: 10px 0;
}

.dwp-upgrade-credit {
    font-size: 18px;
    font-weight: bold;
    color: var(--dwp-primary);
    margin: 10px 0;
}

.dwp-upgrade-diff {
    font-size: 13px;
    color: var(--dwp-success);
    margin: 5px 0 15px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dwp-modal-large .dwp-modal-content {
        max-width: 95%;
        margin: 5% auto;
    }
    
    .dwp-upgrade-grid {
        grid-template-columns: 1fr;
    }
    
    .dwp-activation-modal-options .dwp-btn {
        font-size: 13px;
        padding: 12px;
    }
}


/* ============================================
   کیف پول‌های قفل شده
   ============================================ */
.dwp-wallet-locked {
    position: relative;
    opacity: 0.6;
}

.dwp-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    color: var(--dwp-danger);
    padding: 20px;
    border-radius: 10px;
    z-index: 10;
}


/* ==========================================
   Modal Fixes - اصلاحات Modal
   ========================================== */

/* Modal اصلی */
.dwp-modal {
    overflow-y: auto !important;
}

/* Modal Content */
.dwp-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal بزرگ - فول اسکرین در دسکتاپ */
.dwp-modal-large .dwp-modal-content {
    max-width: 95%;
    width: 1000px;
    max-height: 90vh;
}

/* Grid افزایش اعتبار */
.dwp-upgrade-options {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.dwp-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* فرم کد افزایش اعتبار */
#dwp-upgrade-code-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

#dwp-upgrade-code-form h4 {
    margin-top: 0;
}

#dwp-upgrade-code-form .dwp-form-group {
    margin: 15px 0;
}

#dwp-upgrade-code-form .dwp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

#dwp-upgrade-code-form .dwp-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--dwp-border);
    border-radius: 8px;
    font-size: 15px;
}

#dwp-upgrade-code-form .dwp-btn {
    margin: 5px;
}

/* دکمه بازگشت در Modal */
.dwp-modal-back-btn {
    background: var(--dwp-secondary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.dwp-modal-back-btn:hover {
    background: #546E7A;
}

/* Responsive - موبایل */
@media (max-width: 768px) {
    /* Modal */
    .dwp-modal-content {
        margin: 10px;
        padding: 20px;
        max-height: 85vh;
    }
    
    .dwp-modal-large .dwp-modal-content {
        width: calc(100% - 20px);
        max-width: none;
    }
    
    /* Grid افزایش اعتبار */
    .dwp-upgrade-grid {
        grid-template-columns: 1fr !important;
    }
    
    .dwp-upgrade-options {
        max-height: 50vh;
    }
    
    /* دکمه‌ها */
    #dwp-upgrade-code-form .dwp-btn {
        width: 100%;
        margin: 5px 0;
    }
}


/* ===========================================
   اصلاحات Modal و Scroll - v3.1
   =========================================== */

/* Override Modal برای scroll */
.dwp-modal {
    overflow-y: auto !important;
}

.dwp-modal-content {
    max-height: 90vh !important;
    overflow-y: auto !important;
    margin: 30px auto !important;
}

.dwp-modal-large .dwp-modal-content {
    max-width: 95% !important;
    width: 1100px !important;
}

/* Upgrade Grid با scroll */
.dwp-upgrade-options {
    max-height: none !important;
}

.dwp-upgrade-grid {
    max-height: 60vh !important;
    overflow-y: auto !important;
    padding: 10px !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.dwp-upgrade-option {
    background: white !important;
    border: 2px solid #E0E0E0 !important;
    padding: 20px !important;
}

.dwp-upgrade-option:hover {
    border-color: #2196F3 !important;
    box-shadow: 0 4px 12px rgba(33,150,243,0.2) !important;
}

.dwp-upgrade-option img {
    width: 100px !important;
    height: 100px !important;
    border: 3px solid #2196F3 !important;
}

.dwp-upgrade-option h5 {
    font-size: 16px !important;
    font-weight: bold !important;
    margin: 10px 0 !important;
}

.dwp-upgrade-credit {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #2196F3 !important;
}

.dwp-upgrade-diff {
    font-size: 14px !important;
    color: #4CAF50 !important;
    font-weight: bold !important;
}

/* Form Group */
.dwp-form-group {
    margin: 15px 0 !important;
}

.dwp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.dwp-form-group .dwp-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 15px;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .dwp-modal-content {
        margin: 20px !important;
        max-width: calc(100% - 40px) !important;
        padding: 20px !important;
    }
    
    .dwp-upgrade-grid {
        grid-template-columns: 1fr !important;
        max-height: 70vh !important;
    }
    
    .dwp-upgrade-option {
        padding: 15px !important;
    }
    
    .dwp-upgrade-option img {
        width: 80px !important;
        height: 80px !important;
    }
}

/* هزینه فعالسازی در کارت افزایش اعتبار */
.dwp-upgrade-fee {
    font-size: 14px;
    color: var(--dwp-warning);
    font-weight: bold;
    margin: 8px 0;
    padding: 5px 10px;
    background: #FFF3E0;
    border-radius: 5px;
}

/* دکمه‌های تمام عرض در موبایل */
@media (max-width: 768px) {
    .dwp-wallet-actions {
        flex-direction: column;
    }
    
    .dwp-wallet-actions .dwp-btn {
        width: 100%;
    }
}

/* ==========================================
   انیمیشن‌های زیبا
   ========================================== */

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* ==========================================
   کارت‌های کیف پول با انیمیشن
   ========================================== */
.dwp-wallet-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dwp-wallet-card:nth-child(1) { animation-delay: 0.1s; }
.dwp-wallet-card:nth-child(2) { animation-delay: 0.2s; }
.dwp-wallet-card:nth-child(3) { animation-delay: 0.3s; }
.dwp-wallet-card:nth-child(4) { animation-delay: 0.4s; }

.dwp-wallet-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* ==========================================
   Modal با انیمیشن
   ========================================== */
.dwp-modal {
    animation: fadeIn 0.3s ease-out;
}

.dwp-modal-content {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   دکمه‌ها با انیمیشن
   ========================================== */
.dwp-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dwp-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.dwp-btn:hover::before {
    width: 300px;
    height: 300px;
}

.dwp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dwp-btn:active {
    transform: translateY(0);
}

/* ==========================================
   Flip Cards برای پذیرنده‌ها
   ========================================== */
.dwp-merchant-card-flip {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.dwp-merchant-card-flip:nth-child(1) { animation-delay: 0.1s; }
.dwp-merchant-card-flip:nth-child(2) { animation-delay: 0.2s; }
.dwp-merchant-card-flip:nth-child(3) { animation-delay: 0.3s; }

.dwp-merchant-card-inner {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dwp-merchant-card-flip:hover .dwp-merchant-card-inner:not(.is-flipped) {
    transform: scale(1.05);
}

/* ==========================================
   Modal فعالسازی - زیبا و جذاب
   ========================================== */
.dwp-activation-modal-options {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.dwp-activation-modal-options .dwp-btn {
    padding: 20px;
    font-size: 16px;
    text-align: right;
    border-radius: 12px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dwp-activation-modal-options .dwp-btn:hover {
    transform: translateX(-5px);
    border-color: rgba(255,255,255,0.3);
}

.dwp-activation-modal-options .dwp-btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.dwp-activation-modal-options .dwp-btn-tertiary {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Form فعالسازی */
#dwp-activation-code-form {
    animation: slideInRight 0.4s ease-out;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#dwp-activation-code-form .dwp-input {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#dwp-activation-code-form .dwp-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

/* ==========================================
   Modal افزایش اعتبار - زیبا
   ========================================== */
.dwp-upgrade-option {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: white;
}

.dwp-upgrade-option:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.dwp-upgrade-option img {
    transition: transform 0.3s ease;
}

.dwp-upgrade-option:hover img {
    transform: rotate(5deg) scale(1.1);
}

/* ==========================================
   نوار اعتبار باقیمانده
   ========================================== */
.dwp-remaining-credit {
    animation: fadeInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.dwp-remaining-credit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

.dwp-remaining-credit strong {
    animation: pulse 2s ease-in-out infinite;
}

/* ==========================================
   پیام‌ها با انیمیشن
   ========================================== */
.dwp-message,
.dwp-notice {
    animation: slideInRight 0.4s ease-out;
}

.dwp-message.dwp-success::before,
.dwp-notice.dwp-success::before {
    content: '✓';
    display: inline-block;
    margin-left: 8px;
    animation: bounce 1s ease;
}

/* ==========================================
   Loading States
   ========================================== */
.dwp-btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.dwp-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Badge فعال شده
   ========================================== */
.dwp-activation-badge {
    animation: fadeInUp 0.5s ease-out, pulse 2s ease-in-out 1s;
}

/* ==========================================
   Hover Effects
   ========================================== */
.dwp-wallet-image img,
.dwp-merchant-image img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dwp-wallet-card:hover .dwp-wallet-image img,
.dwp-merchant-card-front:hover .dwp-merchant-image img {
    transform: scale(1.1);
}

/* ==========================================
   Responsive Animations
   ========================================== */
@media (max-width: 768px) {
    .dwp-wallet-card:hover {
        transform: translateY(-4px);
    }
    
    .dwp-btn:hover {
        transform: none;
    }
}

/* ==========================================
   Smooth Scrolling
   ========================================== */
html {
    scroll-behavior: smooth;
}

.dwp-wallets-wrapper,
.dwp-wallet-detail-wrapper {
    animation: fadeIn 0.5s ease-out;
}

/* ==========================================
   نمایش مبلغ اصلی کیف پول
   ========================================== */
.dwp-wallet-credit-main {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    padding: 15px 0;
    border-bottom: 1px solid var(--dwp-border);
    margin-bottom: 15px;
}

.dwp-credit-amount {
    font-size: 28px;
    font-weight: bold;
    color: var(--dwp-primary);
    direction: ltr;
}

.dwp-credit-unit {
    font-size: 14px;
    color: #666;
}

/* ==========================================
   Badge فعال/غیرفعال
   ========================================== */
.dwp-activation-badge {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}

.dwp-activation-badge.dwp-activated {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.dwp-activation-badge.dwp-not-activated {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
    color: white;
}

.dwp-status-amount {
    font-size: 16px;
    font-weight: bold;
    direction: ltr;
}

.dwp-status-unit {
    font-size: 12px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .dwp-credit-amount {
        font-size: 24px;
    }
    
    .dwp-status-amount {
        font-size: 14px;
    }
}

/* ==========================================
   فرم ثبت‌نام
   ========================================== */
.dwp-register-box {
    max-width: 500px;
    margin: 0 auto 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
}

.dwp-register-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--dwp-dark);
    font-size: 24px;
}

.dwp-register-box > p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.dwp-register-form .dwp-form-group {
    margin-bottom: 20px;
}

.dwp-register-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dwp-dark);
}

.dwp-register-form .required {
    color: var(--dwp-danger);
}

.dwp-register-form .dwp-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    direction: rtl;
}

.dwp-register-form .dwp-input:focus {
    border-color: var(--dwp-primary);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.dwp-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.dwp-btn-large {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.dwp-register-note {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: #666;
}

/* Referral Box برای کاربران لاگین شده */
.dwp-referral-box {
    max-width: 400px;
    margin: 0 auto 40px;
    padding: 25px;
    background: white;
    border: 2px solid var(--dwp-primary);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    animation: fadeInUp 0.5s ease-out;
}

.dwp-referral-box h3 {
    margin: 0 0 10px 0;
    color: var(--dwp-primary);
}

.dwp-referral-box .dwp-form-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.dwp-referral-box .dwp-input {
    flex: 1;
}

.dwp-current-referral {
    max-width: 400px;
    margin: 0 auto 30px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: fadeInUp 0.5s ease-out;
}

.dwp-current-referral strong {
    font-size: 20px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .dwp-register-box,
    .dwp-referral-box {
        margin: 0 15px 30px;
        padding: 20px;
    }
    
    .dwp-register-box h2 {
        font-size: 20px;
    }
    
    .dwp-referral-box .dwp-form-group {
        flex-direction: column;
    }
    
    .dwp-referral-box .dwp-btn {
        width: 100%;
    }
}

/* ==========================================
   تب‌های ثبت‌نام / ورود
   ========================================== */
.dwp-auth-wrapper {
    max-width: 500px;
    margin: 0 auto 40px;
}

.dwp-auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: -1px;
}

.dwp-auth-tab {
    flex: 1;
    padding: 15px;
    background: #e0e0e0;
    border: 2px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 10px 10px 0 0;
}

.dwp-auth-tab:hover {
    background: #d0d0d0;
}

.dwp-auth-tab.active {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-color: transparent;
    color: var(--dwp-primary);
}

.dwp-auth-form {
    display: none;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeIn 0.4s ease-out;
}

.dwp-auth-form.active {
    display: block;
}

.dwp-login-box h2,
.dwp-register-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--dwp-dark);
    font-size: 24px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   Modal زیبا
   ========================================== */
.dwp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.dwp-modal-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dwp-modal-container.dwp-modal-show {
    transform: scale(1);
    opacity: 1;
}

.dwp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dwp-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.dwp-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dwp-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.dwp-modal-body {
    padding: 30px 25px;
    text-align: center;
}

.dwp-modal-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.dwp-modal-footer {
    padding: 15px 25px 20px;
    text-align: center;
}

.dwp-modal-footer .dwp-btn {
    min-width: 120px;
    padding: 12px 30px;
}

/* انواع Modal */
.dwp-modal-success .dwp-modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
}

.dwp-modal-error .dwp-modal-header {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
}

.dwp-modal-warning .dwp-modal-header {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
}

.dwp-modal-info .dwp-modal-header {
    background: linear-gradient(135deg, #2196F3 0%, #03A9F4 100%);
}

/* آیکون‌ها */
.dwp-modal-success .dwp-modal-body::before {
    content: '✓';
    display: block;
    font-size: 50px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.dwp-modal-error .dwp-modal-body::before {
    content: '✕';
    display: block;
    font-size: 50px;
    color: #f44336;
    margin-bottom: 15px;
}

.dwp-modal-warning .dwp-modal-body::before {
    content: '⚠';
    display: block;
    font-size: 50px;
    color: #ff9800;
    margin-bottom: 15px;
}

.dwp-modal-info .dwp-modal-body::before {
    content: 'ℹ';
    display: block;
    font-size: 50px;
    color: #2196F3;
    margin-bottom: 15px;
}

/* انیمیشن */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dwp-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .dwp-modal-header,
    .dwp-modal-body,
    .dwp-modal-footer {
        padding-left: 15px;
        padding-right: 15px;
    }
}
