.tickets-list-wrapper {
    margin: 20px 0;
}

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.tickets-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.new-ticket-btn {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.new-ticket-btn:hover {
    background: #e60000;
    color: #fff;
}

.no-tickets {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.tickets-table thead {
    background: #ff0000;
    color: #fff;
}

.tickets-table th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
}

.tickets-table td {
    padding: 15px;
    border-top: 1px solid #eee;
}

.tickets-table tbody tr:hover {
    background: #f9f9f9;
}

.status-badge, .priority-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-open {
    background: #e3f2fd;
    color: #1976d2;
}

.status-answered {
    background: #fff3e0;
    color: #f57c00;
}

.status-closed {
    background: #e8f5e9;
    color: #388e3c;
}

.priority-low {
    background: #e8f5e9;
    color: #388e3c;
}

.priority-normal {
    background: #fff3e0;
    color: #f57c00;
}

.priority-high {
    background: #ffebee;
    color: #c62828;
}

.new-ticket-wrapper, .ticket-view-wrapper {
    margin: 20px 0;
}

.ticket-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.ticket-form .form-row {
    margin-bottom: 20px;
}

.ticket-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ticket-form .required {
    color: #ff0000;
}

.ticket-form input[type="text"],
.ticket-form select,
.ticket-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.ticket-form textarea {
    resize: vertical;
    min-height: 150px;
}

.ticket-form button {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ticket-form button:hover {
    background: #e60000;
}

.ticket-form .button-secondary {
    background: #666;
}

.ticket-form .button-secondary:hover {
    background: #555;
}

.ticket-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    display: none;
}

.ticket-message.success {
    background: #e8f5e9;
    color: #388e3c;
    display: block;
}

.ticket-message.error {
    background: #ffebee;
    color: #c62828;
    display: block;
}

.ticket-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ticket-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.ticket-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-conversation {
    margin: 30px 0;
}

.ticket-message-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ticket-original {
    border-right: 4px solid #ff0000;
}

.ticket-admin-reply {
    border-right: 4px solid #4caf50;
    background: #f1f8f4;
}

.ticket-user-reply {
    border-right: 4px solid #2196f3;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.message-header strong {
    color: #333;
    font-size: 16px;
}

.message-date {
    color: #999;
    font-size: 13px;
}

.message-content {
    color: #555;
    line-height: 1.8;
}

.ticket-reply-form {
    padding: 30px;
    margin-top: 30px;
}

.ticket-reply-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.ticket-closed-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

.ticket-view-admin {
    max-width: 1200px;
}

.ticket-info-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket-info-box h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ticket-meta p {
    margin: 10px 0;
    font-size: 14px;
}

.ticket-actions {
    padding: 25px;
    margin-top: 30px;
}

.ticket-status-update {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.ticket-status-update h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.ticket-status-update select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-left: 10px;
}

.ticket-badge {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 5px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    vertical-align: middle;
}

.woocommerce-MyAccount-navigation ul li.has-ticket-badge a .ticket-badge,
.woocommerce-MyAccount-navigation ul li.tickets a .ticket-badge,
.woocommerce-MyAccount-navigation ul li a .ticket-badge {
    float: left;
    margin-right: 8px;
    margin-top: 2px;
    margin-left: 0;
}

.ticket-admin-badge {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 5px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    vertical-align: middle;
}

#adminmenu .ticket-admin-badge {
    margin-right: 0;
    margin-left: 5px;
}

/* Admin Bar Notification Styles */
#wpadminbar .tickets-admin-bar-notification .ab-icon {
    font-size: 20px;
    width: 26px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    margin-right: 5px;
}

#wpadminbar .tickets-admin-bar-notification .ticket-admin-bar-badge {
    display: inline-block;
    background: #dc3232;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

#wpadminbar .tickets-admin-bar-notification:hover .ticket-admin-bar-badge {
    background: #b52727;
    animation: none;
}

/* Admin Tickets Styles */
.tickets-admin-wrap {
    margin: 20px 0;
}

.tickets-admin-wrap .wp-heading-inline {
    margin-bottom: 20px;
    display: inline-block;
}

.tickets-filters {
    height:20px;
    margin: 15px 0 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border-radius: 4px;
}

.tickets-filters .subsubsub {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.tickets-filters .subsubsub li {
    display: inline-block;
    margin: 0;
}

.tickets-filters .subsubsub li a {
    padding: 5px 10px;
    text-decoration: none;
    color: #2271b1;
    transition: all 0.2s;
}

.tickets-filters .subsubsub li a:hover {
    color: #135e96;
}

.tickets-filters .subsubsub li a.current {
    font-weight: 600;
    color: #1d2327;
}

.tickets-admin-table {
    margin-top: 20px;
}

.tickets-admin-table thead th {
    background: #f6f7f7;
    font-weight: 600;
    padding: 12px;
    border-bottom: 1px solid #c3c4c7;
}

.tickets-admin-table tbody td {
    padding: 12px;
    border-top: 1px solid #c3c4c7;
    vertical-align: middle;
}

.tickets-admin-table tbody tr:hover {
    background: #f6f7f7;
}

.tickets-admin-table .check-column {
    width: 40px;
    text-align: center;
}


.tickets-admin-table .ticket-status-select {
    padding-right:40px !important;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 13px;
    min-width: 150px;
    cursor: pointer;
    background: #fff;
    height: auto;
    line-height: 1.5;
    box-sizing: border-box;
    appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    direction: rtl;
    text-align: right;
}
.tickets-admin-table .ticket-status-select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.tickets-admin-table .ticket-status-select:disabled {
    opacity: 0.6;
    cursor: wait;
    background-color: #f0f0f1;
}

.ticket-actions-cell {
    white-space: nowrap;
}

.ticket-actions-cell .button {
    margin-left: 5px;
    margin-right: 5px;
}

.tickets-admin-table .delete-ticket-btn {
    color: #b32d2e;
    border-color: #b32d2e;
    background: transparent;
}

.tickets-admin-table .delete-ticket-btn:hover {
    color: #fff;
    background: #b32d2e;
    border-color: #b32d2e;
}

.tickets-admin-table .delete-ticket-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tickets-admin-table .no-tickets-found {
    text-align: center;
    padding: 40px;
    color: #646970;
    font-style: italic;
}

.tablenav.top {
    margin: 20px 0;
    padding: 10px 0;
}

.tablenav .bulkactions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tablenav .bulkactions select {
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    font-size: 13px;
    min-width: 150px;
}

.tablenav .bulkactions .button {
    padding: 4px 12px;
    font-size: 13px;
    height: auto;
    line-height: 1.8;
}
.ticket-view-admin .ticket-info-box, .ticket-view-admin .ticket-conversation, .ticket-view-admin .ticket-actions {
    background:none !important;
    box-shadow:none !important;
    border:none !important;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .tickets-table {
        font-size: 13px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 10px 8px;
    }
    
    .ticket-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .tickets-filters .subsubsub {
        flex-wrap: wrap;
    }
    
    .tickets-admin-table {
        font-size: 12px;
    }
    
    .tickets-admin-table th,
    .tickets-admin-table td {
        padding: 8px;
    }
    
    .tablenav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

