/* استایل‌های بخش پشتیبانی */
.chinyab-support-wrapper {
    direction: rtl;
}

.chinyab-support-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.chinyab-support-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.chinyab-support-new-ticket-btn {
    padding: 12px 24px !important;
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chinyab-support-new-ticket-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    border: none !important;
}

.chinyab-support-new-ticket-form {
    background: #f9fafb;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.chinyab-support-new-ticket-form h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.chinyab-support-form-field {
    margin-bottom: 20px;
}

.chinyab-support-form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.chinyab-support-form-field .required {
    color: #d63638;
}

.chinyab-support-form-field input[type="text"],
.chinyab-support-form-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    transition: all 0.3s ease;
}

.chinyab-support-form-field input[type="text"]:focus,
.chinyab-support-form-field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chinyab-support-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.chinyab-support-submit-btn {
    padding: 12px 24px !important;
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chinyab-support-submit-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    border: none !important;
}

.chinyab-support-cancel-btn {
    padding: 12px 24px !important;
    background: #e5e7eb !important;
    color: #374151 !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chinyab-support-cancel-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    border: none !important;
}

.chinyab-support-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.chinyab-support-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.chinyab-support-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.chinyab-support-tickets-list {
    margin-top: 30px;
}

.chinyab-support-tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chinyab-support-tickets-table thead {
    background: #f9fafb;
}

.chinyab-support-tickets-table th {
    padding: 15px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
}

.chinyab-support-tickets-table td {
    padding: 15px;
    text-align: right;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.chinyab-support-tickets-table tbody tr:hover {
    background: #f9fafb;
}

.chinyab-support-tickets-table tbody tr:last-child td {
    border-bottom: none;
}

.chinyab-ticket-status,
.chinyab-ticket-priority {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.chinyab-ticket-status.status-open {
    background: #d1fae5;
    color: #065f46;
}

.chinyab-ticket-status.status-needs_response {
    background: #fee2e2;
    color: #991b1b;
}

.chinyab-ticket-status.status-closed {
    background: #e5e7eb;
    color: #374151;
}

.chinyab-ticket-priority.priority-low {
    background: #dbeafe;
    color: #1e40af;
}

.chinyab-ticket-priority.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.chinyab-ticket-priority.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.chinyab-ticket-view-btn {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.chinyab-ticket-view-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.chinyab-support-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.chinyab-support-empty p {
    margin: 0;
    font-size: 16px;
}

/* ریسپانسیو بخش پشتیبانی */
@media (max-width: 768px) {
    .chinyab-support-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .chinyab-support-new-ticket-btn {
        width: 100%;
    }
    
    .chinyab-support-new-ticket-form {
        padding: 20px;
    }
    
    .chinyab-support-tickets-table {
        font-size: 12px;
    }
    
    .chinyab-support-tickets-table th,
    .chinyab-support-tickets-table td {
        padding: 10px;
    }
    
    .chinyab-support-form-actions {
        flex-direction: column;
    }
    
    .chinyab-support-submit-btn,
    .chinyab-support-cancel-btn {
        width: 100%;
    }
}

/* استایل‌های صفحه جزئیات تیکت در بخش حساب کاربری */
.chinyab-ticket-detail-view {
    direction: rtl;
}

.chinyab-ticket-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.chinyab-ticket-back-btn {
    padding: 8px 16px !important;
    background: #e5e7eb !important;
    color: #374151 !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chinyab-ticket-back-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    border: none !important;
}

.chinyab-ticket-detail-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.chinyab-ticket-detail-info {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chinyab-ticket-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.chinyab-ticket-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chinyab-ticket-detail-meta-item strong {
    font-weight: 600;
    color: #374151;
}

.chinyab-ticket-detail-content-body {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.chinyab-ticket-detail-content-body h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.chinyab-ticket-content-text {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
    color: #374151;
}

.chinyab-ticket-detail-replies {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.chinyab-ticket-detail-replies h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.chinyab-ticket-detail-reply {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.chinyab-ticket-detail-reply.admin-reply {
    background: #eff6ff;
    border-color: #3b82f6;
}

.chinyab-ticket-detail-reply.user-reply {
    background: #f0fdf4;
    border-color: #10b981;
}

.chinyab-ticket-detail-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.chinyab-ticket-detail-reply-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chinyab-ticket-detail-reply-author img {
    border-radius: 50%;
}

.chinyab-ticket-detail-reply-author-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chinyab-ticket-detail-reply-author-info strong {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.chinyab-ticket-detail-reply-date {
    font-size: 13px;
    color: #6b7280;
}

.chinyab-ticket-detail-reply-content {
    line-height: 1.8;
    color: #374151;
}

.chinyab-ticket-detail-reply-content p {
    margin: 0 0 10px 0;
}

.chinyab-ticket-detail-reply-content p:last-child {
    margin-bottom: 0;
}

.chinyab-ticket-detail-reply-form {
    background: #f9fafb;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.chinyab-ticket-detail-reply-form h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.chinyab-ticket-reply-content-field {
    margin-bottom: 20px;
}

.chinyab-ticket-reply-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Vazir', 'IRANYekan', 'Tahoma', 'Arial', sans-serif !important;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

.chinyab-ticket-reply-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chinyab-ticket-reply-file-field {
    margin-bottom: 20px;
}

.chinyab-ticket-reply-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #374151;
}

.chinyab-ticket-reply-file-label:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.chinyab-ticket-reply-file-icon {
    font-size: 18px;
}

.chinyab-ticket-reply-file-text {
    font-weight: 500;
}

.chinyab-ticket-reply-file-limit {
    color: #6b7280;
    font-size: 12px;
}

.chinyab-ticket-reply-file-input {
    display: none;
}

.chinyab-ticket-reply-file-preview {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
}

.chinyab-file-name {
    color: #059669;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chinyab-file-name::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
}

.chinyab-file-error {
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chinyab-file-error::before {
    content: "✗";
    color: #ef4444;
    font-weight: bold;
}

/* استایل فایل ضمیمه در بخش کاربر */
.chinyab-ticket-detail-attachment,
.chinyab-ticket-detail-reply-attachment {
    margin-top: 15px;
    padding: 12px 16px;
    background: #f0f6ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chinyab-ticket-detail-attachment strong,
.chinyab-ticket-detail-reply-attachment strong {
    color: #1e40af;
    font-weight: 600;
}

.chinyab-ticket-detail-attachment-link,
.chinyab-ticket-detail-reply-attachment-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.chinyab-ticket-detail-attachment-link:hover,
.chinyab-ticket-detail-reply-attachment-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.chinyab-ticket-detail-attachment-link span,
.chinyab-ticket-detail-reply-attachment-link span {
    font-size: 18px;
}

.chinyab-ticket-reply-submit-btn {
    padding: 12px 24px !important;
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chinyab-ticket-reply-submit-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    border: none !important;
}

.chinyab-ticket-reply-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.chinyab-ticket-reply-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.chinyab-ticket-reply-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* ریسپانسیو صفحه جزئیات تیکت */
@media (max-width: 768px) {
    .chinyab-ticket-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .chinyab-ticket-detail-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .chinyab-ticket-detail-reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .chinyab-ticket-detail-info {
        padding: 20px;
    }
}

