/**
 * Public styles
 */

.ticket-support-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ticket-support-create-ticket h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
}

.ticket-support-form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

.ticket-support-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .ticket-support-form .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.ticket-support-form .form-group {
    margin-bottom: 24px;
}

.ticket-support-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.ticket-support-form .required {
    color: #ef4444;
    margin-left: 2px;
}

.ticket-support-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fff;
    color: #1f2937 !important;
}

.ticket-support-form .form-control:hover {
    border-color: #d1d5db;
}

.ticket-support-form .form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.ticket-support-form select.form-control {
    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='%231f2937' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    color: #1f2937 !important;
    font-weight: 500;
    line-height: 1.5;
    min-height: 44px;
}

.ticket-support-form select.form-control::-ms-expand {
    display: none;
}

/* Ensure selected value text is always visible */
.ticket-support-form select.form-control:not([multiple]) {
    color: #1f2937 !important;
    background-color: #fff !important;
}

.ticket-support-form select.form-control:not([multiple]):focus {
    color: #1f2937 !important;
}

.ticket-support-form select.form-control option {
    padding: 10px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
}

.ticket-support-form select.form-control option:checked {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
}

.ticket-support-form select.form-control option.parent-category {
    font-weight: 600;
    color: #1f2937;
    padding: 12px;
    background: #f9fafb;
}

.ticket-support-form select.form-control option.subcategory-option {
    font-weight: 400;
    color: #4b5563;
    padding-left: 20px;
    font-style: italic;
}

.ticket-support-form select.form-control optgroup {
    font-weight: 600;
    color: #1f2937;
    padding: 8px 0;
}

.ticket-support-form select.form-control optgroup option {
    padding-left: 20px;
}

/* Ensure selected value is visible */
.ticket-support-form select.form-control:not([multiple]):not([size]) {
    background-color: #fff !important;
    color: #1f2937 !important;
}

.ticket-support-form select.form-control:not([multiple]):not([size]):focus {
    color: #1f2937 !important;
    background-color: #fff !important;
}

.ticket-support-form select.form-control option[value=""] {
    color: #9ca3af;
    font-style: italic;
}

/* Force text visibility - override any other styles */
.ticket-support-form select.form-control {
    -webkit-text-fill-color: #1f2937 !important;
    text-fill-color: #1f2937 !important;
}

.ticket-support-form select.form-control:focus {
    -webkit-text-fill-color: #1f2937 !important;
    text-fill-color: #1f2937 !important;
}

.ticket-support-form .form-group .description {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Rich Text Editor */
.ticket-support-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.ticket-support-editor-toolbar .editor-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #374151;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ticket-support-editor-toolbar .editor-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.ticket-support-editor-toolbar .editor-btn:active {
    transform: translateY(0);
    background: #e5e7eb;
}

.ticket-support-editor {
    min-height: 220px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    background: #fff;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    transition: all 0.2s ease;
}

.ticket-support-editor:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.ticket-support-editor:empty:before {
    content: attr(placeholder);
    color: #9ca3af;
    pointer-events: none;
}

/* Buttons */
.ticket-support-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ticket-support-btn-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border: none;
}

.ticket-support-btn-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,115,170,0.2);
}

.ticket-support-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ticket-support-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.ticket-support-form .ticket-support-btn-primary {
    width: 100%;
    margin-top: 10px;
    padding: 16px;
    font-size: 16px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-open {
    background: #0073aa;
    color: #fff;
}

.status-badge.status-in_progress {
    background: #00a0d2;
    color: #fff;
}

.status-badge.status-on_hold {
    background: #f56e28;
    color: #fff;
}

.status-badge.status-closed {
    background: #46b450;
    color: #fff;
}

/* Tickets List */
.ticket-support-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket-support-table th,
.ticket-support-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ticket-support-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Ticket View */
.ticket-support-ticket-view {
    max-width: 1000px;
}

.ticket-support-ticket-header {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.ticket-support-ticket-header h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 20px !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    word-break: normal !important;
    max-width: 100% !important;
    display: block !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    letter-spacing: normal !important;
    unicode-bidi: normal !important;
    direction: ltr !important;
    text-align: left !important;
    width: auto !important;
    min-width: 0 !important;
    text-transform: none !important;
    transform: none !important;
    float: none !important;
    clear: none !important;
    position: relative !important;
}

.ticket-support-ticket-header h2 *,
.ticket-support-ticket-header h2 span,
.ticket-support-ticket-header h2 strong,
.ticket-support-ticket-header h2 em {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    display: inline !important;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ticket-number {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.priority-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.priority-badge.priority-low {
    background-color: #10b981;
}

.priority-badge.priority-medium {
    background-color: #f59e0b;
}

/* Attachment thumbnails and animations */
.message-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.attachment-item {
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #1f2937;
    font-size: 13px;
}

.attachment-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.attachment-item.image {
    padding: 6px;
    background: #fff;
    display: inline-block;
    flex-shrink: 0;
    flex-direction: column;
}

.attachment-item.image img {
    display: block;
    max-width: 100px;
    max-height: 100px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
    object-fit: cover;
}

.attachment-item.image:hover img {
    transform: scale(1.05);
}

.attachment-item .file-size {
    color: #6b7280;
    font-size: 11px;
    pointer-events: none;
    display: block;
}

.attachment-item span {
    pointer-events: none;
    word-break: break-word;
    font-weight: 500;
}

.attachment-fade-in {
    animation: tsFadeIn 300ms ease forwards;
}

@keyframes tsFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat attachment upload loader */
.chat-attachment-upload-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    color: #1e40af;
    font-size: 14px;
    margin: 8px 0;
    animation: slideIn 300ms ease forwards;
}

.chat-attachment-upload-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #93c5fd;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
} 

.priority-badge.priority-high {
    background-color: #ef4444;
}

.priority-badge.priority-critical {
    background-color: #dc2626;
}

.ticket-support-ticket-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket-details {
    margin-bottom: 30px;
}

.ticket-description h3,
.ticket-attachments h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

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

.ticket-content p {
    margin-bottom: 12px;
}

.ticket-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.ticket-attachments {
    margin-top: 30px;
}

.attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachments-list li {
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.attachment-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.attachment-link:hover {
    text-decoration: underline;
}

.file-size {
    color: #6b7280;
    font-size: 13px;
}

.ticket-actions {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-actions label {
    font-weight: 600;
    color: #1f2937;
    margin-right: 10px;
}

/* Chat Container */
.ticket-support-chat {
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ticket-support-chat h3 {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

/* Messages Container */
.chat-messages {
    flex: 1;
    max-height: 450px;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafb;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Message Items */
.message-item-pro {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 10px;
    word-wrap: break-word;
    animation: slideIn 300ms ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-agent-pro {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    align-self: flex-start;
    border: 1px solid #93c5fd;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.message-customer-pro {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #1f2937;
    align-self: flex-end;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.message-header-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.message-author-pro {
    font-weight: 700;
    opacity: 0.9;
}

.message-time-pro {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 8px;
}

.message-content-pro {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.no-messages-pro {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9ca3af;
    text-align: center;
    font-style: italic;
}

/* Attachments in Messages */
.message-attachments-pro {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.attachment-item-pro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.8);
    overflow: hidden;
    transition: all 0.2s ease;
}

.attachment-item-pro.image {
    padding: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    max-width: 120px;
    max-height: 110px;
}

.attachment-item-pro.image img {
    max-width: 100%;
    max-height: 110px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}

.attachment-item-pro.image:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.attachment-item-pro.file {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    height: 110px;
    cursor: pointer;
}

.attachment-item-pro.file:hover {
    background: rgba(255,255,255,0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.file-icon-pro {
    font-size: 32px;
}

.file-info-pro {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.file-name-pro {
    font-size: 11px;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size-pro {
    font-size: 10px;
    opacity: 0.7;
}

/* Chat Reply Section */
.chat-reply-pro {
    padding: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.reply-header-pro {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    background: #fafbfc;
}

.reply-textarea-pro {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    min-height: 100px;
    background: #fff;
    color: #1f2937;
    transition: all 0.2s ease;
}

.reply-textarea-pro:focus {
    outline: none;
    background: #f0fdf4;
    box-shadow: inset 0 0 0 2px #86efac;
}

.reply-textarea-pro::placeholder {
    color: #9ca3af;
}

/* Attachments Section */
.reply-attachments-section-pro {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    min-height: 0;
}

.attachment-preview-pro {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.chat-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    animation: slideIn 200ms ease forwards;
}

.chat-attachment-item.image {
    padding: 0;
    gap: 0;
}

.chat-attachment-item.image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.chat-attachment-item .info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.chat-attachment-item .name {
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.chat-attachment-item .size {
    color: #9ca3af;
    font-size: 11px;
}

.chat-attachment-item .remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-attachment-item .remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Reply Footer */
.reply-footer-pro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    gap: 16px;
}

.reply-tools-pro {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tool-btn-pro {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tool-btn-pro:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.tool-icon-pro {
    display: block;
}

.reply-actions-pro {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.email-notification-pro {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #6b7280;
}

.email-notification-pro input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

.btn-send-pro {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(16,185,129,0.2);
}

.btn-send-pro:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16,185,129,0.3);
}

.btn-send-pro:active:not(:disabled) {
    transform: translateY(0);
}

.btn-send-pro:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-icon-pro {
    font-size: 16px;
    font-weight: bold;
}

/* Closed Notice */
.ticket-closed-notice-pro {
    padding: 16px 20px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    color: #92400e;
    text-align: center;
    margin: 16px;
    font-size: 14px;
}

.ticket-closed-notice {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
    margin-top: 20px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.message-header .message-author {
    font-weight: 600;
    color: inherit;
}

.message-header .message-time {
    opacity: 0.7;
    font-size: 12px;
}

.no-messages {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-style: italic;
}

/* FAQs Section */
.faqs-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.faqs-accordion-frontend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.faq-item-frontend {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.faq-question-frontend {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    transition: background 0.2s;
}

.faq-question-frontend:hover {
    background: #f9fafb;
}

.faq-icon {
    font-size: 18px;
}

.faq-question-frontend strong {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
}

.faq-toggle {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.3s;
}

.faq-answer-frontend {
    padding: 0 15px 15px 45px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

/* Custom Fields */
.custom-field-group {
    margin-bottom: 20px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Custom Fields Display */
.ticket-custom-fields,
.ticket-custom-fields-table {
    margin-top: 20px;
}

.custom-fields-table,
.ticket-custom-fields-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.custom-fields-table th,
.ticket-custom-fields-table th {
    background: #f9fafb;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    width: 200px;
}

.custom-fields-table td,
.ticket-custom-fields-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.custom-fields-table tr:last-child th,
.custom-fields-table tr:last-child td,
.ticket-custom-fields-table tr:last-child th,
.ticket-custom-fields-table tr:last-child td {
    border-bottom: none;
}

/* Notices */
.ticket-support-notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ticket-support-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Knowledge Base */
.ticket-support-kb-categories {
    margin-bottom: 30px;
}

.kb-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.kb-category-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.kb-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.kb-articles-list {
    list-style: none;
    padding: 0;
}

.kb-articles-list li {
    padding: 15px;
    background: #fff;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kb-articles-list a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.kb-articles-list a:hover {
    text-decoration: underline;
}

.article-date {
    color: #666;
    font-size: 14px;
}

/* RTL Support */
.ticket-support-container[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

.ticket-support-container[dir="rtl"] .form-row {
    direction: rtl;
}

.ticket-support-container[dir="rtl"] .message.agent {
    margin-right: auto;
    margin-left: 0;
}

.ticket-support-container[dir="rtl"] .message.customer {
    margin-left: auto;
    margin-right: 0;
}

/* Chat Attachments Upload */
.chat-attachments-upload {
    margin-bottom: 10px;
    position: relative;
}

.chat-attachments-upload input[type="file"] {
    display: none;
}

/* Upload Loader */
.chat-attachment-upload-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    color: #0369a1;
    font-size: 13px;
    font-weight: 500;
    margin: 8px 0;
    animation: slideIn 300ms ease forwards;
}

.chat-attachment-upload-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #7dd3fc;
    border-top-color: #0369a1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Attachment Preview (old style cleanup) */
.chat-attachment-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chat-attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    position: relative;
    max-width: 220px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    animation: slideIn 200ms ease forwards;
}

.chat-attachment-item.chat-attachment-image {
    padding: 4px;
    background: #fff;
    gap: 6px;
}

.chat-attachment-item .chat-attachment-preview-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border: 1px solid #e5e7eb;
}

.chat-attachment-item .chat-attachment-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.chat-attachment-item .chat-attachment-name {
    color: #1f2937;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.chat-attachment-item .chat-attachment-size {
    color: #9ca3af;
    font-size: 11px;
}

.chat-attachment-item .remove-chat-attachment {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    margin-left: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-attachment-item .remove-chat-attachment:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Attachment Viewer Modal */
.attachment-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

.attachment-viewer-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.attachment-viewer-container {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.attachment-viewer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}

.attachment-viewer-close:hover {
    background: #dc2626;
}

.attachment-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    width: 100%;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

/* Image Slider */
#attachment-slider {
    width: 100%;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.attachment-slider-track {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
}

.attachment-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-slide img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* Slider Navigation Buttons */
.attachment-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #374151;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.attachment-slider-nav:hover {
    background: #fff;
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.attachment-slider-prev {
    left: 15px;
}

.attachment-slider-next {
    right: 15px;
}

/* Slider Indicators */
.attachment-slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.attachment-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.attachment-indicator.active {
    background: #fff;
    border-color: #3b82f6;
    width: 12px;
    height: 12px;
}

.attachment-download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.attachment-download-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* Upload Loader */
.chat-attachment-upload-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #0369a1;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
    margin-top: 8px;
}

.chat-attachment-upload-loader .spinner {
    width: 18px;
    height: 18px;
    border: 3px solid #bae6fd;
    border-top-color: #0ea5e9;
    border-right-color: #0284c7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.chat-attachment-upload-loader span {
    color: #0369a1;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* reCAPTCHA Styling */
.ticket-support-form .g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: flex-start;
}

.ticket-support-form .g-recaptcha > div {
    margin: 0 !important;
}

@media (max-width: 768px) {
    .ticket-support-form .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

