/**
 * Developer: amirhossinbanavand
 * Website: banclub.ir
 */

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.tickets-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.tickets-title svg {
    fill: var(--primary-purple);
    width: 28px;
    height: 28px;
}

.btn-new-ticket {
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(142, 45, 226, 0.3);
}

.btn-new-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 45, 226, 0.4);
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.ticket-card:hover {
    background: var(--glass-hover);
    border-color: var(--primary-purple);
    transform: translateX(-5px);
}

.ticket-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.ticket-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(142,45,226,0.2), rgba(74,0,224,0.2));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-purple);
    border: 1px solid rgba(142,45,226,0.3);
}

.ticket-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ticket-user {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-id {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 10px;
}

.ticket-preview {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.ticket-time {
    font-size: 12px;
    color: var(--text-muted);
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-open { background: rgba(255, 75, 75, 0.1); color: var(--danger); border: 1px solid rgba(255, 75, 75, 0.2); }
.status-open::before { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.status-answered { background: rgba(0, 230, 118, 0.1); color: var(--success); border: 1px solid rgba(0, 230, 118, 0.2); }
.status-answered::before { background: var(--success); }

.status-closed { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); }
.status-closed::before { background: var(--text-muted); }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 5, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover { color: var(--danger); }
.close-modal svg { width: 24px; height: 24px; fill: currentColor; }

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 15px rgba(142, 45, 226, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-submit-ticket {
    width: 100%;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-ticket:hover {
    box-shadow: 0 8px 20px rgba(142, 45, 226, 0.4);
}

@media (max-width: 768px) {
    .ticket-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .ticket-meta {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding-top: 15px;
    }
    .ticket-preview {
        max-width: 100%;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}