/* Reset و فونت پایه */
body {
    font-family: YekanBakh, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* فرم‌ها */
.wts-ticket-form, 
.wts-reply-form {
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    font-family: YekanBakh;
    border: 1px solid #f3f3f3;

}
a.page-numbers {
    color: #4c4c4c !important;
}

.wts-form-group {
    margin-bottom: 20px;
}

.wts-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #484848;
}

.wts-form-group input[type="text"],
.wts-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: YekanBakh;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.wts-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.wts-submit {
    border: none;
    border-radius: 10px;
    background: #1E6DF3;
    color: #fff;
    font-weight: 400;
    width: 200px;
    padding: 15px;
    margin: 10px calc(50% - 100px);
    display: block;
    cursor: pointer;
    font-family: YekanBakh;
    transition: all 0.3s ease;
}

.wts-submit:hover {
    background: #1557c0;
}

/* سیستم کارت‌گونه تیکت‌ها */
.wts-tickets-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: YekanBakh;
}

.wts-ticket-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    font-family: YekanBakh;
}

.wts-ticket-filters::-webkit-scrollbar {
    display: none;
}

.wts-filter-chip {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-radius: 10px;
    background: #f4f4f4;
    color: #333;
    text-decoration: none;
    font-weight: 300;
    font-family: YekanBakh;
    transition: all 0.3s ease;
}

.wts-filter-chip:hover {
    background: #1e6df3;
    color: white !important;
}

.wts-filter-chip.active {
    background: #1e6df3 !important;
    color: white !important;
}
.wts-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wts-ticket-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: all 0.3s ease;
    font-family: YekanBakh;
    border: 1px solid #eaeaea;
}

.wts-ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.wts-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wts-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #484848;
    margin: 0 0 12px;
    line-height: 1.4;
}
.wts-card-title a {
    color:#353535 !Important;
}
a.wts-filter-chip{
    color:#353535 !Important;
}



.wts-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 300;
}

.wts-card-footer {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.wts-button {
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: YekanBakh;
    transition: all 0.3s ease;
    font-weight: 300;
}

.wts-view-btn {
    background: #1e6df3;
    color: white;
    flex-grow: 1;
}

.wts-view-btn:hover {
    background: #1557c0;
}

.wts-close-btn {
    background: #f4f4f4;
    color: #646f61;
}

.wts-close-btn:hover {
    background: #e0e0e0;
}

/* وضعیت‌ها */
.wts-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 300;
}

.wts-status-pending {
    background: #fff0d9;
    color: #ff9800;
}

.wts-status-in_progress {
    background: #d6edff;
    color: #2196f3;
}

.wts-status-answered {
    background: #e9ffea;
    color: #4caf50;
}

.wts-status-closed {
    background: #ffe4e2;
    color: #f44336;
}
.wts-status-customer_reply {
    background: #f7e2ff;
    color: #9C34C2;
}

.wts-date {
    font-size: 12px;
    color: #666;
}

.wts-single-info-box {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 20px;
    padding-left: 50px;
    padding-right: 50px;
    align-items: flex-start;
}

/* صفحه نمایش تیکت */
.wts-single-ticket {
    width: calc(100% - 400px);
    font-family: YekanBakh;
}
.chat-box {
    width: 400px;
        position: sticky;
    top: 50px;
}

.wts-ticket-header h2 {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 27px;
    color: #484848;
    font-weight: 300;
}

.wts-ticket-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.wts-back-button {
    color: #333 !important;
    background: #F4F4F4;
    padding: 10px 20px;
    border-radius: 10px;
    margin: 0;
    font-weight: 300;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
}



.wts-ticket-conversation {
    margin: 20px 0;
    height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.wts-message {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 20px;
    background: #e3f2fd;
    font-family: YekanBakh;
}


.wts-message.wts-admin {
    background: #e8f5e9;
}

.wts-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 300;
}

.wts-message-header span {
    color: #333;
}



.wts-message {
    max-width: 80%;
    position: relative;
    margin-bottom: 20px;
}

.wts-message.wts-customer {
    margin-right: auto;
    margin-left: 20%;
    border-radius: 20px 20px 0px 20px;
}

.wts-message.wts-admin {
    margin-left: auto; /* پیام ادمین در سمت چپ */
    margin-right: 20%;
        border-radius: 20px 20px 20px 0px;
}

/* برای موبایل */
@media (max-width: 768px) {
    .wts-message {
        max-width: 90%;
    }
    
    .wts-message.wts-customer {
        margin-left: 10%;
    }
    
    .wts-message.wts-admin {
        margin-right: 10%;
    }
}

.wts-message p {
    font-size: 16px;
    color: #333;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
}

.wts-close-form {
    margin-top: 20px;
}

.wts-close-button {
    border: none;
    padding: 10px 20px;
    background: #F4F4F4;
    color: #646f61 !important;
    border-radius: 10px;
    float: left;
    font-weight: 300;
    cursor: pointer;
    font-family: YekanBakh;
}

a.wts-button.wts-close-btn {
    color: #4e4d60 !important;
}

a.wts-button.wts-view-btn {
    background: #eef0ff;
    color: #1e6df3 !important;
}

/* صفحه‌بندی */
.wts-pagination {
    text-align: center;
    margin: 30px 0;
    font-family: YekanBakh;
}

.wts-pagination a, 
.wts-pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #f4f4f4;
    font-weight: 300;
}

.wts-pagination a:hover {
    background: #e0e0e0;
}

.wts-pagination .current {
    background: #1e6df3;
    color: white;
}

/* حالت‌های مختلف */
.wts-notice, 
.wts-error, 
.wts-success {
    padding: 15px;
    border-radius: 8px;
    font-family: YekanBakh;
    font-weight: 300;
    margin-bottom:20px;
}

.wts-notice {
    background: #e3f2fd;
    border-right: 4px solid #2196f3;
}

.wts-error {
    background: #ffebee;
    border-right: 4px solid #f44336;
}

.wts-success {
    background: #e8f5e9;
    border-right: 4px solid #4caf50;
}

.wts-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    font-family: YekanBakh;
}

.wts-empty-state svg {
    margin-bottom: 15px;
    color: #9ca3af;
}

.wts-empty-state p {
    color: #666;
    margin-bottom: 20px;
    font-weight: 300;
}



@media (max-width: 1190px) {

    
    .wts-single-info-box {
    display: flex;
    flex-direction: column;
    padding:0px;
}
    .wts-single-ticket {
    width: 100%;
}
    
    
    .chat-box {
    width: 100%;
}
    
}



/* ریسپانسیو */
@media (max-width: 768px) {
    .wts-tickets-grid {
        grid-template-columns: 1fr;
    }
    
    .wts-ticket-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .wts-filter-chip {
        width: 100%;
        text-align: center;
    }
    
    .wts-card-footer {
        flex-direction: row-reverse;
    }
    

    
    .wts-ticket-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wts-ticket-conversation {
        height: auto;
        max-height: 500px;
    }
    
    
    
    h2.h2-wts-ticket-header {
    font-size:15px;
    }
    
    
    
}

.wts-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #484848;
    line-height: 1.4;
    margin-bottom: 10px !important;
}

.wts-ticket-card {
    display: flex
;
    flex-direction: column;
}
.wts-pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 5px;
}

.wts-pagination a, 
.wts-pagination span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #f4f4f4;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.wts-pagination a:hover {
    background: #e0e0e0;
}

.wts-pagination .current {
    background: #1e6df3;
    color: white;
    border-color: #1e6df3;
}

.wts-pagination .dots {
    background: transparent;
    border: none;
}

/* اسپینر لودینگ */
.wts-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e6df3;
    border-radius: 50%;
    animation: wts-spin 1s linear infinite;
    margin-bottom: 15px;
}

input.wts-submit {
    border-radius: 8px;
    margin-right: calc(50% - 60px);
    margin-left: auto;
    width: 120px;
    border: none;
    color: #fff;
    background: #1e6df3;
    box-shadow: 0px 0px 10px 0px rgba(30.000000000000068, 108.99999999999987, 242.99999999999991, 0.18);
    font-weight: 300;
    padding: 12px;
}

input.wts-submit:hover{
        background: #1e6df3;

}

input.wts-submit:focus{
        background: #1e6df3;

}


input.wts-close-button {
    border: none;
    color: red !important;
    font-weight: 300;
    background: #ff00001a;
    border-radius: 8px;
}

input.wts-close-button:hover{
        background: #ff00001a;
}
input.wts-close-button:focus{
        background: #ff00001a;
}


form.wts-reply-form textarea {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background:#f8f9fa;
}

form.wts-reply-form h3 {
    font-weight: 300 !important;
    color: #4c4b4c !important;
}



@keyframes wts-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* انیمیشن‌ها */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wts-ticket-card {
    animation: cardEntrance 0.4s ease-out forwards;
    opacity: 0;
}


.wts-ticket-card:nth-child(1) { animation-delay: 0.1s; }
.wts-ticket-card:nth-child(2) { animation-delay: 0.2s; }
.wts-ticket-card:nth-child(3) { animation-delay: 0.3s; }
.wts-ticket-card:nth-child(4) { animation-delay: 0.4s; }
.wts-ticket-card:nth-child(5) { animation-delay: 0.5s; }
.wts-ticket-card:nth-child(6) { animation-delay: 0.6s; }
.wts-ticket-card:nth-child(7) { animation-delay: 0.7s; }
.wts-ticket-card:nth-child(8) { animation-delay: 0.8s; }
.wts-ticket-card:nth-child(9) { animation-delay: 0.9s; }
