/* استایل‌های سیستم تیکت پشتیبانی */

/* استایل‌های عمومی */
.customer-club-tickets-tab {
    width: 100%;
}

.customer-club-tickets-tab,
.customer-club-admin .tickets-management {
    font-family: inherit;
}

/* کارت‌های آمار */
.customer-club-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    background: #0073aa;
    color: white;
    flex-shrink: 0;
}

.stats-icon.open {
    background: #d63638;
}

.stats-icon.pending {
    background: #dba617;
}

.stats-icon.closed {
    background: #00a32a;
}

.stats-icon .dashicons {
    font-size: 24px;
}

.stats-content h3 {
    font-size: 28px;
    margin: 0 0 5px 0;
    color: #1d2327;
    font-weight: 700;
}

.stats-content p {
    margin: 0;
    color: #646970;
    font-size: 14px;
    font-weight: 500;
}

/* فیلترها */
.filters-wrapper,
.tickets-filters {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d2327;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* دکمه‌ها */
.button {
    transition: all 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: #0073aa;
    border-color: #0073aa;
}

.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Modal */
.ticket-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.ticket-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ticket-modal-header {
    background: #0073aa;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-modal-header h2,
.ticket-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.ticket-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: white;
    transition: color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ticket-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.ticket-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* پیام‌های تیکت */
.ticket-message {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
    transition: all 0.2s ease;
}

.ticket-message:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ticket-message.admin-reply {
    background: #e7f3ff;
    border-color: #0073aa;
    margin-left: 20px;
}

.ticket-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.ticket-message.admin-reply .ticket-message-header {
    border-bottom-color: #0073aa;
}

.ticket-author {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.ticket-date {
    color: #646970;
    font-size: 12px;
}

.ticket-message-content {
    color: #1d2327;
    line-height: 1.6;
    font-size: 14px;
}

/* فرم‌ها */
.new-ticket-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.new-ticket-form h3 {
    margin-top: 0;
    color: #1d2327;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d2327;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* آیتم‌های تیکت */
.ticket-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ticket-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #f0f0f1;
}

.ticket-info h4 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

.ticket-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-meta span {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f0f0f1;
    color: #646970;
    font-weight: 500;
}

.ticket-actions {
    display: flex;
    gap: 10px;
}

.ticket-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f9f9f9;
    color: #646970;
    font-size: 14px;
}

.ticket-preview > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* نشان‌های اولویت و وضعیت */
.priority-badge,
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high {
    background: #d63638;
    color: white;
}

.priority-medium {
    background: #dba617;
    color: white;
}

.priority-normal {
    background: #0073aa;
    color: white;
}

.priority-low {
    background: #646970;
    color: white;
}

.status-open {
    background: #d63638;
    color: white;
}

.status-pending {
    background: #dba617;
    color: white;
}

.status-closed {
    background: #00a32a;
    color: white;
}

/* پیام عدم وجود تیکت */
.no-tickets {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.no-tickets-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-tickets h3 {
    margin-bottom: 10px;
    color: #1d2327;
    font-size: 20px;
}

.no-tickets p {
    color: #646970;
    margin-bottom: 20px;
    font-size: 14px;
}

/* جدول */
.table-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wp-list-table {
    margin: 0;
    border: none;
}

.wp-list-table th,
.wp-list-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f1;
}

.wp-list-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.wp-list-table td {
    font-size: 14px;
    color: #646970;
}

.wp-list-table tr:hover {
    background: #f9f9f9;
}

/* بارگذاری */
.loading-message {
    text-align: center;
    padding: 40px;
    color: #646970;
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .customer-club-stats-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-card {
        padding: 15px;
    }
    
    .stats-content h3 {
        font-size: 24px;
    }
    
    .filters-wrapper,
    .tickets-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .ticket-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .ticket-meta {
        justify-content: flex-start;
    }
    
    .ticket-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ticket-message.admin-reply {
        margin-left: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stats-icon {
        margin-left: 0;
    }
    
    .ticket-preview {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ticket-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .ticket-actions .button {
        width: 100%;
    }
}
