/* customers-mobile.css */

/* ابتدا مطمئن شویم که جدول اصلی در موبایل مخفی می‌شود */
@media screen and (max-width: 767px) {
    /* مخفی کردن جدول اصلی در موبایل */
    .desktop-table {
        display: none !important;
    }
    
    /* نمایش کارت‌های موبایل */
    .mobile-customers-view {
        display: block !important;
    }
    
    /* استایل کلی برای کارت‌های موبایل */
    .customer-card-mobile {
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        margin-bottom: 16px;
    }
    
    /* هدر کارت */
    .customer-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 2px solid #f3f4f6;
    }
    
    /* اطلاعات مشتری */
    .customer-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    /* آواتار مشتری */
    .customer-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
    }
    
    /* نام مشتری */
    .customer-name {
        font-size: 16px;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 4px;
    }
    
    /* شماره مشتری */
    .customer-id {
        font-size: 14px;
        color: #6b7280;
    }
    
    /* شماره ردیف */
    .customer-index {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 16px;
    }
    
    /* بخش تماس */
    .customer-contact {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
    }
    
    /* کارت اطلاعات */
    .info-card {
        background: #f9fafb;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        border: 1px solid #e5e7eb;
    }
    
    /* ردیف اطلاعات */
    .info-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .info-row:last-child {
        margin-bottom: 0;
    }
    
    /* برچسب اطلاعات */
    .info-label {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
    }
    
    /* مقدار اطلاعات */
    .info-value {
        font-size: 14px;
        font-weight: 600;
        color: #1f2937;
    }
    
    /* مدت گذشته */
    .days-ago-badge {
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        margin: 16px 0;
        font-weight: 700;
        font-size: 16px;
    }
    
    /* دکمه مشاهده جزئیات */
    .view-details-btn {
        display: block;
        width: 100%;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 16px;
        text-decoration: none;
        border: none;
        cursor: pointer;
    }
    
    .view-details-btn:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    }
    
    /* حالت خالی */
    .empty-state-mobile {
        padding: 24px 16px;
        text-align: center;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        margin: 16px;
    }
    
    /* آمار کلی در موبایل */
    .grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* مخفی کردن صفحه‌بندی دسکتاپ در موبایل */
    .flex-col.md\:flex-row.justify-between.items-center.p-6.border-t.bg-gradient-to-r.from-gray-100.to-gray-200 {
        display: none !important;
    }
    
    /* صفحه‌بندی موبایل */
    .mobile-pagination {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 16px;
        background: white;
        border-top: 1px solid #e5e7eb;
    }
    
    .mobile-pagination button {
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 2px solid #3b82f6;
        background: white;
        color: #3b82f6;
        font-weight: 600;
    }
    
    .mobile-pagination button:disabled {
        border-color: #9ca3af;
        color: #9ca3af;
        cursor: not-allowed;
    }
    
    .mobile-pagination .page-info {
        font-weight: 600;
        color: #4b5563;
        padding: 8px 12px;
        background: #f3f4f6;
        border-radius: 8px;
    }
}

/* برای دسکتاپ */
@media screen and (min-width: 768px) {
    .mobile-customers-view {
        display: none !important;
    }
    
    .desktop-table {
        display: block !important;
    }
    
    .mobile-pagination {
        display: none !important;
    }
}

/* برای موبایل‌های خیلی کوچک */
@media screen and (max-width: 374px) {
    .customer-avatar {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .customer-name {
        font-size: 15px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .view-details-btn {
        font-size: 14px;
        padding: 10px;
    }
}