/* Frontend Single Ticket View Styles */

.nexlifydesk-frontend-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    padding: 16px;
    margin: 20px 0;
}

.nexlifydesk-frontend-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.nexlifydesk-frontend-container .header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nexlifydesk-frontend-container .ticket-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.nexlifydesk-frontend-container .ticket-title {
    font-size: 25px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    line-height: 1.3;
}

.nexlifydesk-frontend-container .ticket-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nexlifydesk-frontend-container .ticket-id {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 12px;
}

.nexlifydesk-frontend-container .status,
.nexlifydesk-frontend-container .priority {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexlifydesk-frontend-container .status.open { background: #e6fffa; color: #00b894; border: 1px solid #00b894; }
.nexlifydesk-frontend-container .status.pending { background: #fff3cd; color: #f39c12; border: 1px solid #f39c12; }
.nexlifydesk-frontend-container .status.resolved { background: #e8f5e8; color: #27ae60; border: 1px solid #27ae60; }
.nexlifydesk-frontend-container .status.closed { background: #f8f9fa; color: #6c757d; border: 1px solid #6c757d; }

.nexlifydesk-frontend-container .priority.high { background: #ffe6e6; color: #e74c3c; border: 1px solid #e74c3c; }
.nexlifydesk-frontend-container .priority.urgent { background: #e74c3c; color: #fff; border: 1px solid #c0392b; }
.nexlifydesk-frontend-container .priority.medium { background: #fff3cd; color: #f39c12; border: 1px solid #f39c12; }
.nexlifydesk-frontend-container .priority.low { background: #e8f5e8; color: #27ae60; border: 1px solid #27ae60; }

.nexlifydesk-frontend-container .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.nexlifydesk-frontend-container .main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nexlifydesk-frontend-container .ticket-details,
.nexlifydesk-frontend-container .sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nexlifydesk-frontend-container .ticket-details { order: 2; }
.nexlifydesk-frontend-container .sidebar { order: 1; }

.nexlifydesk-frontend-container .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.nexlifydesk-frontend-container .description {
    background: #f8f9fa;
    font-size: 16px;
    font-weight: 400;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid #667eea;
    line-height: 1.6;
}

.nexlifydesk-frontend-container .conversation { margin-top: 24px; }

.nexlifydesk-frontend-container .message {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    position: relative;
}

.nexlifydesk-frontend-container .message.user {
    background: #dce6ff !important;
    color: #333 !important;
    font-size: 16px;
    font-weight: 400;
    margin-left: 20px;
    border-radius: 18px 18px 6px 18px;
    flex-direction: row;
}

.nexlifydesk-frontend-container .message.agent {
    background: #f8f9fa !important;
    font-size: 16px;
    font-weight: 400;
    color: #333 !important;
    border: 1px solid #e2e8f0 !important;
    margin-right: 20px;
    border-radius: 18px 18px 18px 6px;
    flex-direction: row;
}

.nexlifydesk-frontend-container .conversation .message.user,
.nexlifydesk-frontend-container #nexlifydesk-replies-list .message.user {
    background: #dce6ff !important;
    color: #333 !important;
    margin-left: 20px;
    border-radius: 18px 18px 6px 18px;
}

.nexlifydesk-frontend-container .conversation .message.agent,
.nexlifydesk-frontend-container #nexlifydesk-replies-list .message.agent {
    background: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #e2e8f0 !important;
    margin-right: 20px;
    border-radius: 18px 18px 18px 6px;
}

.nexlifydesk-frontend-container .message-newly-added.user {
    background: #dce6ff !important;
    color: #333 !important;
    margin-left: 20px;
    border-radius: 18px 18px 6px 18px;
}

.nexlifydesk-frontend-container .message-newly-added.agent {
    background: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #e2e8f0 !important;
    margin-right: 20px;
    border-radius: 18px 18px 18px 6px;
}

.nexlifydesk-frontend-container .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.nexlifydesk-frontend-container .message-author {
    font-weight: 600;
    font-size: 14px;
}

.nexlifydesk-frontend-container .message-time {
    font-size: 12px;
    color: #666;
}

.nexlifydesk-frontend-container .message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    position: relative;
}

.nexlifydesk-frontend-container .message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.nexlifydesk-frontend-container .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nexlifydesk-frontend-container .message-content {
    flex: 1;
    min-width: 0;
}

.nexlifydesk-frontend-container .message-content .message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.nexlifydesk-frontend-container .message-content .message-header strong {
    font-weight: 600;
}

.nexlifydesk-frontend-container .message-content .message-header .role-label {
    color: #666;
    font-size: 12px;
}

.nexlifydesk-frontend-container .message-content .message-header .timestamp {
    color: #666;
    font-size: 12px;
    margin-left: auto;
}

.nexlifydesk-frontend-container .message-content .message-body {
    font-size: 14px;
    line-height: 1.5;
}

.nexlifydesk-frontend-container .message-time {
    font-size: 12px;
    opacity: 0.7;
}

.nexlifydesk-frontend-container .sidebar-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
}

.nexlifydesk-frontend-container .sidebar-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexlifydesk-frontend-container .sidebar-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
    word-break: break-word;
}

.nexlifydesk-frontend-container .actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nexlifydesk-frontend-container .btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    flex: 1;
    min-width: 140px;
    text-decoration: none;
    text-align: center;
}

.nexlifydesk-frontend-container .btn-primary {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: white;
}

.nexlifydesk-frontend-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 65, 255, 0.4);
}

.nexlifydesk-frontend-container .btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e2e8f0;
}

.nexlifydesk-frontend-container .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.nexlifydesk-frontend-container .attachments { margin-top: 16px; }

.nexlifydesk-frontend-container .attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}
.nexlifydesk-frontend-container .message.user .attachment {
    background: rgba(255,255,255,0.1);
}
.nexlifydesk-frontend-container .message.agent .attachment {
    background: #e9ecef;
}

.nexlifydesk-frontend-container .attachment a {
    size: 18px !important;
    text-decoration: none;
    font-weight: 500;
}
.nexlifydesk-frontend-container .message.user .attachment a {
    color: #333;
}
.nexlifydesk-frontend-container .message.agent .attachment a {
    color: #333;
}

.nexlifydesk-frontend-container .attachment-icon {
    font-size: 16px;
}

.nexlifydesk-frontend-container .nexlifydesk-reply-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.nexlifydesk-frontend-container .nexlifydesk-reply-form .form-group {
    margin-bottom: 16px;
}

.nexlifydesk-frontend-container .nexlifydesk-reply-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.nexlifydesk-frontend-container .nexlifydesk-reply-form textarea,
.nexlifydesk-frontend-container .nexlifydesk-reply-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.nexlifydesk-frontend-container .nexlifydesk-reply-form textarea {
    min-height: 120px;
}

.nexlifydesk-frontend-container .nexlifydesk-reply-form .description {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    border: none;
    padding: 0;
    background: none;
}

.nexlifydesk-frontend-container .nexlifydesk-closed-message {
    margin-top: 24px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
}

.nexlifydesk-frontend-container .back-link {
    margin-top: 24px;
}

.nexlifydesk-frontend-container .back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.nexlifydesk-frontend-container .nexlifydesk-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.nexlifydesk-frontend-container .nexlifydesk-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.nexlifydesk-frontend-container .nexlifydesk-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.nexlifydesk-frontend-container .nexlifydesk-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.nexlifydesk-frontend-container .nexlifydesk-message p {
    margin: 0;
}

@media (max-width: 768px) {
    .nexlifydesk-frontend-container { padding: 12px; }
    .nexlifydesk-frontend-container .header { padding: 16px; margin-bottom: 16px; }
    .nexlifydesk-frontend-container .ticket-title { font-size: 20px; }
    .nexlifydesk-frontend-container .ticket-info { flex-direction: column; align-items: flex-start; gap: 12px; }
    .nexlifydesk-frontend-container .user-avatar { align-self: flex-end; margin-top: -8px; }
    .nexlifydesk-frontend-container .main-content { gap: 16px; }
    .nexlifydesk-frontend-container .ticket-details, .sidebar { padding: 16px; }
    .nexlifydesk-frontend-container .message.user { margin-left: 10px; }
    .nexlifydesk-frontend-container .message.agent { margin-right: 10px; }
    .nexlifydesk-frontend-container .actions { flex-direction: column; gap: 8px; }
    .nexlifydesk-frontend-container .btn { min-width: auto; width: 100%; }
}

@media (min-width: 769px) {
    .nexlifydesk-frontend-container .main-content {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 24px;
    }
    .nexlifydesk-frontend-container .ticket-details { order: 1; padding: 24px; }
    .nexlifydesk-frontend-container .sidebar { order: 2; padding: 24px; height: fit-content; }
    .nexlifydesk-frontend-container .sidebar-item { background: transparent; padding: 0; border: none; margin-bottom: 20px; }
    .nexlifydesk-frontend-container .sidebar-label { font-size: 14px; text-transform: none; letter-spacing: normal; }
    .nexlifydesk-frontend-container .sidebar-value { font-size: 16px; }
}

/* Frontend Ticket Form Styles */
.nexlifydesk-frontend-ticket-form-ui {
    min-height: 100vh;
    padding: 2rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nexlifydesk-frontend-ticket-form-ui .form-container {
    max-width: 40rem;
    margin: 0 auto;
}

.nexlifydesk-frontend-ticket-form-ui .form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin: 1rem 0;
}

.nexlifydesk-frontend-ticket-form-ui .form-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.nexlifydesk-frontend-ticket-form-ui .form-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.nexlifydesk-frontend-ticket-form-ui .form-header p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
    color: white;
}

.nexlifydesk-frontend-ticket-form-ui form {
    padding: 2rem;
}

.nexlifydesk-frontend-ticket-form-ui .form-group {
    margin-bottom: 1.5rem;
}

.nexlifydesk-frontend-ticket-form-ui .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.nexlifydesk-frontend-ticket-form-ui label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.nexlifydesk-frontend-ticket-form-ui .required {
    color: #ef4444;
}

.nexlifydesk-frontend-ticket-form-ui input[type="text"],
.nexlifydesk-frontend-ticket-form-ui textarea,
.nexlifydesk-frontend-ticket-form-ui select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.nexlifydesk-frontend-ticket-form-ui input[type="text"]:focus,
.nexlifydesk-frontend-ticket-form-ui textarea:focus,
.nexlifydesk-frontend-ticket-form-ui select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.nexlifydesk-frontend-ticket-form-ui textarea {
    min-height: 5rem;
    resize: none;
}

.nexlifydesk-frontend-ticket-form-ui .file-input-wrapper {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.nexlifydesk-frontend-ticket-form-ui .file-input-wrapper:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.nexlifydesk-frontend-ticket-form-ui .file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

.nexlifydesk-frontend-ticket-form-ui .file-input-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
}

.nexlifydesk-frontend-ticket-form-ui .upload-icon {
    width: 2rem;
    height: 2rem;
    color: #3b82f6;
}

.nexlifydesk-frontend-ticket-form-ui .upload-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

.nexlifydesk-frontend-ticket-form-ui .file-info {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.nexlifydesk-frontend-ticket-form-ui .submit-btn {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nexlifydesk-frontend-ticket-form-ui .submit-btn:hover {
    background: #1d4ed8;
}

.nexlifydesk-frontend-ticket-form-ui .submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.nexlifydesk-frontend-ticket-form-ui .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.nexlifydesk-frontend-ticket-form-ui .button-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nexlifydesk-frontend-ticket-form-ui .login-prompt {
    padding: 2rem;
    text-align: center;
}

.nexlifydesk-frontend-ticket-form-ui .login-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.nexlifydesk-frontend-ticket-form-ui .login-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.nexlifydesk-frontend-ticket-form-ui .login-btn.primary {
    background: #3b82f6;
    color: white;
}

.nexlifydesk-frontend-ticket-form-ui .login-btn.primary:hover {
    background: #1d4ed8;
}

.nexlifydesk-frontend-ticket-form-ui .login-btn.secondary {
    background: white;
    color: #3b82f6;
    border: 1px solid #e5e7eb;
}

.nexlifydesk-frontend-ticket-form-ui .login-btn.secondary:hover {
    background: #f3f4f6;
}

.nexlifydesk-frontend-ticket-form-ui .success-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.nexlifydesk-frontend-ticket-form-ui .success-actions {
    padding: 2rem;
    text-align: center;
}

.nexlifydesk-frontend-ticket-form-ui .view-ticket-btn {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nexlifydesk-frontend-ticket-form-ui .view-ticket-btn:hover {
    background: #1d4ed8;
}

.nexlifydesk-frontend-ticket-form-ui #nexlifydesk-message {
    margin: 0 2rem 1rem 2rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.nexlifydesk-form-messages.success {
    background: #ecfdf5;
    color: #065f46;
    size: 16px;
    border: 1px solid #a7f3d0;
}
.nexlifydesk-form-messages.error {
    background: #fef2f2;
    color: #991b1b;
    size: 16px;
    border: 1px solid #fecaca;
}

.nexlifydesk-frontend-ticket-form-ui #nexlifydesk-message.error {
    background: #fef2f2;
    color: #991b1b;
    size: 16px;
    border: 1px solid #fecaca;
}

@media (max-width: 768px) {
    .nexlifydesk-frontend-ticket-form-ui {
        padding: 1rem 0.5rem;
    }
    
    .nexlifydesk-frontend-ticket-form-ui .form-row {
        grid-template-columns: 1fr;
    }
    
    .nexlifydesk-frontend-ticket-form-ui .form-header,
    .nexlifydesk-frontend-ticket-form-ui form {
        padding: 1.5rem;
    }
    
    .nexlifydesk-frontend-ticket-form-ui .login-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .nexlifydesk-frontend-ticket-form-ui .login-btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Frontend Ticket List Styles --- */
.nexlifydesk-table-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Header */
.nexlifydesk-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nexlifydesk-table-header h1 {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.nexlifydesk-header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.nexlifydesk-btn-primary {
    padding: 8px 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    display: inline-block;
}

.nexlifydesk-btn-primary:hover {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
}

.nexlifydesk-view-btn {
    padding: 6px 10px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
}

.nexlifydesk-view-btn:hover {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
}

/* Table styles */
.nexlifydesk-ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.nexlifydesk-ticket-table th,
.nexlifydesk-ticket-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.nexlifydesk-ticket-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.nexlifydesk-ticket-table tr:hover {
    background: #f1f1f1;
}

.nexlifydesk-subject-cell {
    max-width: 300px;
}

.nexlifydesk-ticket-preview {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* Status badges */
.nexlifydesk-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-weight: normal;
    text-transform: capitalize;
}

.nexlifydesk-status.open {
    background: #28a745;
}

.nexlifydesk-status.pending {
    background: #ffc107;
    color: #333;
}

.nexlifydesk-status.in-progress {
    background: #ffc107;
    color: #333;
}

.nexlifydesk-status.resolved {
    background: #28a745;
}

.nexlifydesk-status.closed {
    background: #dc3545;
}

/* Priority badges */
.nexlifydesk-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-weight: normal;
    text-transform: capitalize;
}

.nexlifydesk-priority.low {
    background: #28a745;
}

.nexlifydesk-priority.medium {
    background: #ffc107;
    color: #333;
}

.nexlifydesk-priority.high {
    background: #fd7e14;
}

.nexlifydesk-priority.urgent {
    background: #dc3545;
}

/* No tickets state */
.nexlifydesk-no-tickets-table {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.nexlifydesk-no-tickets-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.nexlifydesk-no-tickets-table h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.nexlifydesk-no-tickets-table p {
    color: #666;
    margin-bottom: 20px;
}

/* Footer */
.nexlifydesk-table-footer {
    text-align: center;
    color: #777;
    font-size: 14px;
}

.nexlifydesk-table-footer p {
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .nexlifydesk-table-container {
        margin: 10px;
        padding: 15px;
    }
    
    .nexlifydesk-ticket-table,
    .nexlifydesk-ticket-table thead,
    .nexlifydesk-ticket-table tbody,
    .nexlifydesk-ticket-table th,
    .nexlifydesk-ticket-table td,
    .nexlifydesk-ticket-table tr {
        display: block;
    }

    .nexlifydesk-ticket-table thead tr {
        display: none;
    }

    .nexlifydesk-ticket-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
        background: #fff;
    }

    .nexlifydesk-ticket-table td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
        padding-bottom: 8px;
        padding-top: 8px;
    }

    .nexlifydesk-ticket-table td:before {
        content: attr(data-label) ":";
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #333;
    }

    .nexlifydesk-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .nexlifydesk-table-header h1 {
        font-size: 20px;
    }

    .nexlifydesk-header-actions {
        width: 100%;
    }

    .nexlifydesk-subject-cell {
        max-width: none;
    }

    .nexlifydesk-ticket-preview {
        margin-top: 5px;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .nexlifydesk-table-container {
        margin: 5px;
        padding: 10px;
    }
    
    .nexlifydesk-table-header h1 {
        font-size: 18px;
    }

    .nexlifydesk-ticket-table td {
        padding-left: 45%;
        font-size: 14px;
    }

    .nexlifydesk-ticket-table td:before {
        width: 40%;
        font-size: 12px;
    }
}