/**
 * Smart Support Public Styles
 */

/* =======================
   INLINE STYLE REPLACEMENTS
   ======================= */

/* =======================
   APPROVAL NOTICE STYLES
   ======================= */
.smart-support-notice {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.smart-support-notice-warning {
    border-left-color: #f0ad4e;
    background: #fcf8e3;
}

.smart-support-notice-error {
    border-left-color: #d9534f;
    background: #f2dede;
}

.smart-support-notice-success {
    border-left-color: #5cb85c;
    background: #dff0d8;
}

.smart-support-notice .notice-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.smart-support-notice .notice-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}

.smart-support-notice .notice-text {
    flex: 1;
}

.smart-support-notice .notice-text strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.smart-support-notice .notice-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* =======================
   TICKET LIMIT MODAL STYLES
   ======================= */
.smart-support-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    z-index: 10000;
    margin: auto;
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.limit-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.limit-icon {
    font-size: 32px;
    line-height: 1;
    margin-top: 4px;
}

.limit-message {
    flex: 1;
}

.limit-message p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.limit-message p:first-child {
    font-weight: 500;
    color: #333;
}

.limit-message ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

.limit-message li {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}

.modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-primary {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.modal-footer .btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.modal-footer .btn-secondary {
    background: #f0f0f0;
    color: #333;
    border-color: #d0d0d0;
}

.modal-footer .btn-secondary:hover {
    background: #e0e0e0;
    border-color: #c0c0c0;
}

/* =======================
   DISABLED SUBMIT BUTTON STYLES
   ======================= */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
}

.btn:disabled:hover {
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
}

.form-help-text {
    margin: 10px 0 0 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

/* Display utilities */
.hidden { display: none !important; }
.flex { display: flex !important; }
.inline { display: inline !important; }
.inline-block { display: inline-block !important; }

/* Flex utilities */
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; }
.flex-end { display: flex; justify-content: flex-end; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-gap-15 { display: flex; gap: 15px; }
.flex-gap-20 { display: flex; gap: 20px; }

/* Margin utilities */
.margin-top-10 { margin-top: 10px !important; }
.margin-top-15 { margin-top: 15px !important; }
.margin-top-18 { margin-top: 18px !important; }
.margin-bottom-10 { margin-bottom: 10px !important; }
.margin-bottom-15 { margin-bottom: 15px !important; }
.margin-bottom-18 { margin-bottom: 18px !important; }
.margin-0 { margin: 0 !important; }

/* Padding utilities */
.padding-0 { padding: 0 !important; }

/* Width utilities */
.width-100 { width: 100% !important; }
.width-100vw { width: 100vw !important; }
.min-width-320 { min-width: 320px !important; }

/* Height utilities */
.height-100vh { height: 100vh !important; }

/* Position utilities */
.position-fixed { position: fixed !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.left-0 { left: 0 !important; }
.top-10 { top: 10px !important; }
.right-10 { right: 10px !important; }
.top-50 { top: 50% !important; }
.left-50 { left: 50% !important; }

/* Transform utilities */
.transform-center { transform: translate(-50%, -50%) !important; }

/* Z-index utilities */
.z-index-1000 { z-index: 1000 !important; }
.z-index-1001 { z-index: 1001 !important; }

/* Background utilities */
.bg-white { background: #fff !important; }
.bg-none { background: none !important; }
.bg-rgba-black-35 { background: rgba(0,0,0,0.35) !important; }

/* Border utilities */
.border-none { border: none !important; }
.border-radius-8 { border-radius: 8px !important; }
.border-radius-3 { border-radius: 3px !important; }

/* Box shadow utilities */
.box-shadow-modal { box-shadow: 0 4px 24px rgba(0,0,0,0.18) !important; }

/* Font utilities */
.font-size-12 { font-size: 12px !important; }
.font-size-15 { font-size: 15px !important; }
.font-size-16 { font-size: 16px !important; }
.font-size-20 { font-size: 20px !important; }
.font-size-22 { font-size: 22px !important; }

/* Font weight utilities */
.font-weight-600 { font-weight: 600 !important; }

/* Color utilities */
.color-888 { color: #888 !important; }
.color-23282d { color: #23282d !important; }
.color-646970 { color: #646970 !important; }
.color-00a32a { color: #00a32a !important; }
.color-d63638 { color: #d63638 !important; }
.color-f0f0f1 { color: #f0f0f1 !important; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer !important; }

/* Flex utilities for specific components */
.flex-1 { flex: 1 !important; }

/* =======================
   COMPONENT-SPECIFIC STYLES
   ======================= */

/* Widget elements */
.widget-form {
    display: none;
}

.widget-ticket-form {
    display: none;
}

.widget-my-tickets-view {
    display: none;
}

.widget-tickets-loading {
    display: none;
}

/* File input elements */
.file-input-text {
    display: none;
}

.selected-files {
    display: none;
}

.btn-loading {
    display: none;
}

.preview-modal {
    display: none;
}

/* Attachment list */
.attachment-list {
    display: none;
}

/* Customer info display */
.customer-info {
    display: none;
}

.agent-info {
    display: none;
}

/* Department color options */
.department-color-option {
    color: var(--color);
}

/* Variables */
:root {
    --ss-primary-color: #007cba;
    --ss-secondary-color: #00a32a;
    --ss-error-color: #dc3232;
    --ss-warning-color: #f56e28;
    --ss-success-color: #00a32a;
    --ss-border-color: #ddd;
    --ss-background-color: #fff;
    --ss-text-color: #333;
    --ss-light-gray: #f8f9fa;
    --ss-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --ss-border-radius: 6px;
    --ss-transition: all 0.3s ease;
}

/* Form Styles */
.smart-support-form {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    background: var(--ss-background-color);
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    box-shadow: var(--ss-shadow);
}

/* Full width styling for Submit a Support Ticket page */
.support-create-view .smart-support-form {
    max-width: 100%;
    margin: 10px 0;
    padding: 30px;
}

.support-create-view .smart-support-form .modern-ticket-form {
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
}

/* Ensure form elements take full width with reduced spacing */
.support-create-view .smart-support-form .form-row {
    margin-bottom: 15px;
}

.support-create-view .smart-support-form .form-group {
    margin-bottom: 15px;
}

/* Create ticket form uses general form-control styling - no overrides needed */

.support-create-view .smart-support-form textarea {
    min-height: 200px;
}

/* Enhanced styling for full width form */
.support-create-view .smart-support-form h3 {
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
    color: var(--ss-primary-color);
}

.support-create-view .smart-support-form .form-group label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.support-create-view .smart-support-form .editor-wrapper {
    border: 2px solid var(--ss-border-color);
    border-radius: 8px;
}

.support-create-view .smart-support-form .editor-wrapper:focus-within {
    border-color: var(--ss-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.support-create-view .smart-support-form .form-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--ss-border-color);
}

/* Create ticket buttons use general button styling - no overrides needed */

/* File upload area styling for full width */
.support-create-view .smart-support-form .file-upload-area {
    margin-top: 12px;
}

.support-create-view .smart-support-form .file-upload-box {
    border: 2px dashed var(--ss-border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: var(--ss-transition);
}

.support-create-view .smart-support-form .file-upload-box:hover {
    border-color: var(--ss-primary-color);
    background-color: rgba(0, 124, 186, 0.05);
}

/* Responsive adjustments for full width form */
@media (max-width: 768px) {
    .support-create-view .smart-support-form {
        margin: 5px 0;
        padding: 20px;
    }
    
    /* Create ticket form uses general form-control styling - no overrides needed */
    
    .support-create-view .smart-support-form textarea {
        min-height: 150px;
    }
    
    .support-create-view .smart-support-form h3 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .support-create-view .smart-support-form .form-group label {
        font-size: 14px;
    }
    
    /* Create ticket buttons use general button styling - no overrides needed */
    
    .support-create-view .smart-support-form .file-upload-box {
        padding: 20px;
    }
}

.smart-support-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--ss-text-color);
    font-size: 1.5em;
    font-weight: 600;
}

.smart-support-form .form-group {
    margin-bottom: 20px;
}

.smart-support-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--ss-text-color);
}

.smart-support-form .required {
    color: var(--ss-error-color);
}

.smart-support-form input[type="text"],
.smart-support-form input[type="email"],
.smart-support-form select,
.smart-support-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    font-size: 14px;
    transition: var(--ss-transition);
    box-sizing: border-box;
}

.smart-support-form input:focus,
.smart-support-form select:focus,
.smart-support-form textarea:focus {
    outline: none;
    border-color: var(--ss-primary-color);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.smart-support-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-height: 40px;
    gap: 6px;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn-secondary {
    background-color: #6b7280;
    border-color: #6b7280;
    color: #ffffff;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    border-color: #4b5563;
    color: #ffffff;
}

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

/* Messages */
.smart-support-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--ss-border-radius);
    font-weight: 500;
}

.smart-support-message.success {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.smart-support-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.smart-support-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Floating Widget */
.smart-support-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.smart-support-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.smart-support-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.smart-support-widget.top-right {
    top: 20px;
    right: 20px;
}

.smart-support-widget.top-left {
    top: 20px;
    left: 20px;
}

.widget-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color, var(--ss-primary-color));
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: var(--ss-shadow);
    transition: var(--ss-transition);
    font-weight: 500;
}

.widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.widget-text {
    font-size: 14px;
}

.widget-form {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    max-width: 90vw;
    background: var(--ss-background-color);
    border-radius: var(--ss-border-radius);
    box-shadow: var(--ss-shadow);
    border: 1px solid var(--ss-border-color);
    animation: slideUp 0.3s ease;
}

.smart-support-widget.top-right .widget-form,
.smart-support-widget.top-left .widget-form {
    bottom: auto;
    top: 70px;
}

.smart-support-widget.bottom-left .widget-form,
.smart-support-widget.top-left .widget-form {
    right: auto;
    left: 0;
}

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

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ss-border-color);
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius) var(--ss-border-radius) 0 0;
}

.widget-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ss-text-color);
}

.widget-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-close:hover {
    color: var(--ss-error-color);
}

.widget-content {
    padding: 20px;
}

.widget-content .smart-support-form {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
}

.widget-content .form-group {
    margin-bottom: 16px;
}

.widget-content input,
.widget-content select,
.widget-content textarea {
    padding: 10px;
    font-size: 13px;
}

.widget-content textarea {
    min-height: 80px;
}

.widget-login-prompt {
    text-align: center;
    padding: 20px 0;
}

.widget-login-prompt p {
    margin-bottom: 16px;
    color: var(--ss-text-color);
}

.widget-login-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.widget-login-buttons .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Widget User Dashboard */
.widget-user-dashboard {
    min-height: 200px;
}

.widget-user-info h4 {
    margin: 0 0 15px 0;
    color: var(--ss-primary-color);
    font-size: 16px;
    font-weight: 600;
}

.widget-user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.btn-small {
    font-size: 12px;
    padding: 6px 12px;
}

.btn-link {
    background: none;
    color: var(--ss-primary-color);
    text-decoration: underline;
    border: none;
}

.btn-link:hover {
    background: none;
    color: #005a87;
    text-decoration: none;
}

/* Widget Tickets List */
.widget-tickets-list {
    max-height: 250px;
    overflow-y: auto;
}

.widget-ticket-item {
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--ss-border-color);
    border-radius: 4px;
    background: var(--ss-light-gray);
}

.widget-ticket-item:last-child {
    margin-bottom: 0;
}

.widget-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.widget-ticket-subject {
    font-weight: 500;
    font-size: 13px;
    color: var(--ss-text-color);
    text-decoration: none;
    flex: 1;
    margin-right: 8px;
}

.widget-ticket-subject:hover {
    color: var(--ss-primary-color);
}

.widget-ticket-meta {
    font-size: 11px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
}

.widget-status-badge.state-opened {
    background: #d4edda;
    color: #155724;
}

.widget-status-badge.state-closed {
    background: #d1ecf1;
    color: #0c5460;
}

.widget-status-badge.state-delayed {
    background: #fff3cd;
    color: #856404;
}

.widget-tickets-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.widget-form-actions,
.widget-tickets-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--ss-border-color);
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

/* My Tickets Dashboard */
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tickets-actions {
    display: flex;
    gap: 10px;
}

.tickets-filters {
    background: var(--ss-light-gray);
    padding: 20px;
    border-radius: var(--ss-border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--ss-border-color);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--ss-text-color);
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    font-size: 14px;
}

/* Buttons group in filter forms - keep Filter and Clear in same row */
.filter-group:has(.btn) {
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
    min-width: auto;
}

/* Fallback for browsers that don't support :has() */
.filter-group .btn + .btn {
    margin-left: 10px;
    margin-top: 0;
}

.filter-group .btn {
    margin-top: 0;
}

.tickets-table-wrapper {
    overflow-x: auto;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ss-background-color);
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
}

.tickets-table th,
.tickets-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ss-border-color);
}

.tickets-table th {
    background: var(--ss-light-gray);
    font-weight: 600;
    color: var(--ss-text-color);
    font-size: 14px;
}

.tickets-table tr:hover {
    background: var(--ss-light-gray);
}

.ticket-link {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.ticket-number {
    font-family: monospace;
    background: var(--ss-light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.ticket-id .ticket-number {
    background: var(--ss-primary-color);
    color: #fff;
    margin-right: 0;
}

.ticket-id {
    width: 120px;
    min-width: 120px;
}

.ticket-id .ticket-link {
    font-weight: 600;
}

/* File attachments styling */
.ticket-attachments,
.reply-attachments {
    margin-top: 15px;
    padding: 15px;
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
}

.ticket-attachments h4,
.reply-attachments h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--ss-border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.attachment-item:hover {
    border-color: var(--ss-primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.attachment-icon {
    font-size: 18px;
    min-width: 20px;
}

.attachment-details {
    flex: 1;
    min-width: 0;
}

.attachment-link {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
}

.attachment-link:hover {
    color: var(--ss-accent-color);
    text-decoration: underline;
}

.attachment-size {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Waiting badges */
.status-badge.waiting-support {
    background: #fff4e5; /* soft amber */
    color: #8a6d3b;
    border: 1px solid #fad7a0;
    font-size: 10px;
    padding: 2px 6px;
}

.status-badge.waiting-customer {
    background: #e6fffa; /* soft mint */
    color: #0f766e;
    border: 1px solid #a7f3d0;
    font-size: 10px;
    padding: 2px 6px;
}

.ticket-activity-inline {
    margin: 8px 0 12px;
}

.status-badge.state-opened {
    background: #d4edda;
    color: #155724;
}

.status-badge.state-closed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.state-delayed {
    background: #fff3cd;
    color: #856404;
}

.ticket-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 3px;
    transition: var(--ss-transition);
}

.action-btn:hover {
    background: var(--ss-light-gray);
}

.view-btn:hover {
    background: #e3f2fd;
}

.close-btn:hover {
    background: #ffebee;
}

.no-tickets {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Login and Registration Forms */
.smart-support-login-form,
.smart-support-register-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 30px;
    background: var(--ss-background-color);
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    box-shadow: var(--ss-shadow);
}

.smart-support-login-form h3,
.smart-support-register-form h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--ss-primary-color);
    font-size: 1.8em;
    font-weight: 600;
}

.smart-support-login-form .form-group,
.smart-support-register-form .form-group {
    margin-bottom: 20px;
}

.smart-support-login-form label,
.smart-support-register-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--ss-text-color);
}

.smart-support-login-form input[type="text"],
.smart-support-login-form input[type="email"],
.smart-support-login-form input[type="password"],
.smart-support-register-form input[type="text"],
.smart-support-register-form input[type="email"],
.smart-support-register-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.smart-support-login-form input:focus,
.smart-support-register-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.smart-support-login-form .btn,
.smart-support-register-form .btn {
    width: 100%;
    font-weight: 600;
    margin-top: 10px;
}

.form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ss-border-color);
}

.form-links p {
    margin: 5px 0;
    font-size: 14px;
}

.form-links a {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Checkbox styling for remember me */
.smart-support-login-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.1);
}

.smart-support-login-form label:has(input[type="checkbox"]),
.smart-support-register-form label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

/* Ticket Actions */
.ticket-actions {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.ticket-actions h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.ticket-actions .btn {
    margin-right: 10px;
    margin-bottom: 5px;
}

.ticket-actions .text-muted {
    font-size: 13px;
    color: #6c757d;
}

/* Action buttons in ticket list */
.action-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-right: 5px;
}

.action-btn:hover {
    background-color: #f8f9fa;
}

.action-btn.close-btn {
    color: #dc3545;
}

.action-btn.close-btn:hover {
    background-color: #f8d7da;
}

.action-btn.reopen-btn {
    color: #28a745;
}

.action-btn.reopen-btn:hover {
    background-color: #d4edda;
}

.action-btn.view-btn {
    color: #007bff;
}

.action-btn.view-btn:hover {
    background-color: #e3f2fd;
}

/* My Tickets */
.smart-support-my-tickets {
    max-width: 800px;
    margin: 20px 0;
}

.smart-support-my-tickets h3 {
    margin-bottom: 20px;
    color: var(--ss-text-color);
    font-size: 1.5em;
    font-weight: 600;
}

.tickets-list {
    display: grid;
    gap: 16px;
}

.ticket-item {
    background: var(--ss-background-color);
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    padding: 20px;
    transition: var(--ss-transition);
}

.ticket-item:hover {
    box-shadow: var(--ss-shadow);
    transform: translateY(-2px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.ticket-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.ticket-header h4 a {
    color: var(--ss-primary-color);
    text-decoration: none;
}

.ticket-header h4 a:hover {
    text-decoration: underline;
}

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

.ticket-number {
    font-family: monospace;
    background: var(--ss-light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.ticket-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
}

.ticket-status.status-new {
    background: #f0f6fc;
    color: #0d47a1;
}

.ticket-status.status-working_on {
    background: #fff8e1;
    color: #e65100;
}

.ticket-status.status-on_hold {
    background: #ffeaa7;
    color: #880e4f;
}

.ticket-date {
    color: #666;
}

.ticket-excerpt {
    color: #666;
    line-height: 1.5;
}

/* Single Ticket */
.smart-support-single-ticket {
    max-width: 800px;
    margin: 20px 0;
}

.smart-support-single-ticket .ticket-header {
    background: var(--ss-light-gray);
    padding: 20px;
    border-radius: var(--ss-border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--ss-border-color);
}

.smart-support-single-ticket .ticket-header h2 {
    margin: 0 0 12px 0;
    color: var(--ss-text-color);
}

.smart-support-single-ticket .ticket-content {
    background: var(--ss-background-color);
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    padding: 20px;
}

.original-message {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ss-border-color);
}

.reply-content,
.original-message {
    font-size: 14px;
}

.ticket-replies h3 {
    margin-bottom: 20px;
    color: var(--ss-text-color);
}

.reply-item {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
    border-left: 4px solid var(--ss-primary-color);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.reply-header strong {
    color: var(--ss-text-color);
}

.reply-date {
    color: #666;
}

.reply-content {
    line-height: 1.6;
    color: var(--ss-text-color);
}

.reply-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--ss-border-color);
}

.reply-form h3 {
    margin-bottom: 16px;
    color: var(--ss-text-color);
}

.ticket-details .reply-content,
.ticket-details .original-message {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smart-support-form {
        margin: 10px;
        padding: 16px;
    }
    
    .smart-support-widget {
        font-size: 14px;
    }
    
    .widget-form {
        width: 300px;
        max-width: 85vw;
    }
    
    .widget-button {
        padding: 10px 16px;
    }
    
    .widget-text {
        display: none;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ticket-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .smart-support-widget.bottom-right,
    .smart-support-widget.top-right {
        right: 10px;
    }
    
    .smart-support-widget.bottom-left,
    .smart-support-widget.top-left {
        left: 10px;
    }
    
    .smart-support-widget.bottom-right,
    .smart-support-widget.bottom-left {
        bottom: 10px;
    }
    
    .smart-support-widget.top-right,
    .smart-support-widget.top-left {
        top: 10px;
    }
    
    .widget-form {
        width: 280px;
        max-width: 90vw;
    }
}

/* Loading States */
.smart-support-loading {
    opacity: 0.6;
    pointer-events: none;
}

.smart-support-loading .btn {
    position: relative;
}

.smart-support-loading .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.smart-support-form input:focus,
.smart-support-form select:focus,
.smart-support-form textarea:focus,
.btn:focus {
    outline: 2px solid var(--ss-primary-color);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

/* Unified Support Page */
.smart-support-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.support-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--ss-border-color);
}

.support-page-header h2 {
    margin: 0;
    color: var(--ss-text-color);
    font-size: 2em;
    font-weight: 600;
}

.support-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.support-user-info span {
    color: var(--ss-text-color);
}

.logout-link {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Support Navigation */
.support-page-nav {
    margin-bottom: 30px;
}

.support-nav {
    display: flex;
    gap: 2px;
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
    padding: 4px;
    overflow: hidden;
}

.support-nav .nav-link {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--ss-text-color);
    background: transparent;
    border-radius: calc(var(--ss-border-radius) - 2px);
    font-weight: 500;
    transition: var(--ss-transition);
}

.support-nav .nav-link:hover {
    background: rgba(0, 124, 186, 0.1);
    color: var(--ss-primary-color);
}

.support-nav .nav-link.active {
    background: var(--ss-primary-color);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

/* Support Page Content */
.support-page-content {
    background: var(--ss-background-color);
    border-radius: var(--ss-border-radius);
    box-shadow: var(--ss-shadow);
    overflow: hidden;
}

/* Support Views */
.support-login-view,
.support-register-view {
    padding: 40px;
    text-align: center;
}

.login-form-container,
.register-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.form-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ss-border-color);
    font-size: 14px;
}

.form-footer p {
    margin: 10px 0;
}

.form-footer a {
    color: var(--ss-primary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Dashboard View */
.support-dashboard-view {
    padding: 30px;
}

.support-dashboard-view .tickets-filters {
    background: var(--ss-light-gray);
    padding: 20px;
    border-radius: var(--ss-border-radius);
    margin-bottom: 30px;
}

.support-dashboard-view .filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.support-dashboard-view .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.support-dashboard-view .filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.support-dashboard-view .filter-group select,
.support-dashboard-view .filter-group input[type="text"],
.support-dashboard-view .filter-group input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.support-dashboard-view .filter-group input[type="text"]:focus,
.support-dashboard-view .filter-group input[type="search"]:focus,
.support-dashboard-view .filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.support-dashboard-view .filter-group input[type="text"]::placeholder,
.support-dashboard-view .filter-group input[type="search"]::placeholder {
    color: #9ca3af;
}

/* Buttons group in unified dashboard filter forms */
.support-dashboard-view .filter-group:has(.btn) {
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
    min-width: auto;
}

/* Fallback for browsers that don't support :has() */
.support-dashboard-view .filter-group .btn + .btn {
    margin-left: 10px;
    margin-top: 0;
}

.support-dashboard-view .filter-group .btn {
    margin-top: 0;
}

.support-dashboard-view .no-tickets {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.support-dashboard-view .no-tickets h4 {
    margin: 0 0 10px 0;
    color: var(--ss-text-color);
    font-size: 1.3em;
}

.support-dashboard-view .no-tickets p {
    margin: 0 0 20px 0;
}

/* Create Ticket View */
.support-create-view {
    padding: 30px;
}

.create-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ss-border-color);
}

.create-ticket-header h3 {
    margin: 0;
    color: var(--ss-text-color);
}

.create-ticket-form .smart-support-form {
    margin: 0;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* Ticket View */
.support-ticket-view {
    padding: 30px;
}

.ticket-view-header {
    margin-bottom: 20px;
}

.ticket-details {
    background: var(--ss-background-color);
}

.ticket-details .ticket-header {
    padding: 20px;
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
    margin-bottom: 20px;
}

.ticket-details .ticket-header h2 {
    margin: 0 0 10px 0;
    color: var(--ss-text-color);
}

.ticket-details .ticket-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
}

.ticket-details .ticket-meta span {
    background: var(--ss-background-color);
    padding: 5px 10px;
    border-radius: calc(var(--ss-border-radius) / 2);
    border: 1px solid var(--ss-border-color);
}

.ticket-details .ticket-content {
    padding: 20px;
}

.ticket-details .original-message {
    background: var(--ss-light-gray);
    padding: 20px;
    border-radius: var(--ss-border-radius);
    margin-bottom: 30px;
    border-left: 4px solid var(--ss-primary-color);
}

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

.ticket-details .ticket-replies h3 {
    margin: 0 0 20px 0;
    color: var(--ss-text-color);
    border-bottom: 2px solid var(--ss-border-color);
    padding-bottom: 10px;
}

.ticket-details .reply-item {
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
    padding: 15px;
    margin-bottom: 15px;
}

.ticket-details .reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.ticket-details .reply-header strong {
    color: var(--ss-text-color);
}

.ticket-details .reply-date {
    color: #666;
    font-size: 12px;
}

.ticket-details .reply-content {
    color: var(--ss-text-color);
    line-height: 1.6;
}

.ticket-details .reply-form {
    background: var(--ss-light-gray);
    padding: 20px;
    border-radius: var(--ss-border-radius);
}

.ticket-details .reply-form h3 {
    margin: 0 0 15px 0;
    color: var(--ss-text-color);
}

/* Responsive Design for Support Page */
@media (max-width: 768px) {
    .smart-support-page {
        padding: 10px;
    }
    
    .support-page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .support-nav {
        flex-direction: column;
        gap: 5px;
    }
    
    .support-nav .nav-link {
        flex: none;
    }
    
    .support-dashboard-view,
    .support-create-view,
    .support-ticket-view {
        padding: 20px;
    }
    
    .support-dashboard-view .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .support-dashboard-view .filter-group {
        min-width: auto;
    }
    
    .create-ticket-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .ticket-details .ticket-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .support-login-view,
    .support-register-view {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .support-dashboard-view .tickets-table-wrapper {
        overflow-x: auto;
    }
    
    .support-dashboard-view .tickets-table {
        min-width: 600px;
    }
    
    .ticket-details .ticket-header,
    .ticket-details .original-message,
    .ticket-details .reply-item,
    .ticket-details .reply-form {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .smart-support-widget {
        display: none;
    }
    
    .smart-support-form,
    .smart-support-single-ticket,
    .smart-support-page {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .support-page-nav {
        display: none;
    }
}

/* Modern Ticket Form Styles */
.modern-ticket-form,
.modern-reply-form {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group.full-width {
    flex: 1 1 100%;
}

.modern-ticket-form .form-group,
.modern-reply-form .form-group {
    margin-bottom: 12px;
}

.modern-ticket-form .form-group label,
.modern-reply-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

.modern-ticket-form .form-group .required,
.modern-reply-form .form-group .required {
    color: #dc2626;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* Editor Wrapper */
.editor-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.editor-wrapper .wp-editor-container {
    border: none;
}

.editor-wrapper .mce-tinymce {
    border: none !important;
    box-shadow: none !important;
}

.editor-wrapper .mce-toolbar-grp {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

.editor-wrapper .mce-btn {
    border: none !important;
    background: transparent !important;
    color: #6c757d !important;
}

.editor-wrapper .mce-btn:hover {
    background: #e9ecef !important;
    color: #495057 !important;
}

.editor-wrapper .mce-btn.mce-active {
    background: #007cba !important;
    color: #ffffff !important;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preview-btn:hover {
    background: #f8f9fa;
    border-color: #9ca3af;
}

.preview-icon {
    font-size: 14px;
}

/* File Upload Area */
.file-upload-area {
    margin-top: 6px;
}



.file-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.file-input-wrapper {
    flex: 1;
    position: relative;
}

.file-input-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-input-display {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    color: #6b7280;
    background: #ffffff;
    min-height: 32px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-input-display:hover {
    border-color: #9ca3af;
}

.file-input-wrapper:has(.file-input-field:focus) .file-input-display {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.file-input-placeholder {
    color: #6b7280;
    font-style: italic;
}

.file-input-text {
    color: #374151;
}

.file-input-buttons {
    display: flex;
    gap: 6px;
}

.browse-btn,
.add-more-btn {
    padding: 6px 12px;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 32px;
}

.browse-btn:hover,
.add-more-btn:hover {
    background: #f3f4f6;
    border-color: #6b7280;
}

.add-more-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.file-upload-info {
    margin-top: 6px;
    padding: 6px;
    background: #f3f4f6;
    border-radius: 4px;
}

.selected-files {
    margin-top: 12px;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
}

.selected-files h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #0369a1;
}

.file-list {
    margin: 0;
    padding-left: 16px;
    color: #374151;
    font-size: 13px;
}

.file-list li {
    margin-bottom: 4px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.form-actions .btn {
    margin-bottom: 5px;
}

.modern-ticket-form .btn,
.modern-reply-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    min-height: 40px;
}

/* Modern form buttons use general button styling - no overrides needed */

.btn-outline-primary {
    background-color: transparent;
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-outline-primary:hover {
    background-color: #3b82f6;
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Preview Modal */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.preview-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.preview-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #374151;
}

.preview-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.preview-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.preview-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.preview-content {
    color: #374151;
    line-height: 1.6;
}

.preview-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

/* Text Utilities */
.text-muted {
    color: #6b7280 !important;
}

/* Responsive Design for Modern Forms */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .modern-ticket-form,
    .modern-reply-form {
        padding: 16px;
    }
    
    .file-input-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .file-input-buttons {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .preview-modal {
        padding: 10px;
    }
    
    .preview-modal-content {
        max-height: 90vh;
    }
}

/* Widget specific styles */
.smart-support-form.widget .modern-ticket-form {
    padding: 16px;
    box-shadow: none;
    border: none;
}

.smart-support-form.widget .form-row {
    margin-bottom: 16px;
}

.smart-support-form.widget .form-actions {
    margin-top: 16px;
    padding-top: 16px;
}

/* Reply form specific styles */
.smart-support-reply-form .modern-reply-form {
    border-color: #e5e7eb;
    background: #f9fafb;
}

.ticket-reply-form {
    margin-top: 20px;
} 

/* --- Improved Login & Registration Form Styles --- */
.smart-support-login-form, .smart-support-register-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 32px 28px 24px 28px;
    background: #fff;
    border: 1.5px solid var(--ss-border-color);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.smart-support-login-form h3, .smart-support-register-form h3 {
    text-align: center;
    margin-bottom: 28px;
    color: var(--ss-primary-color);
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -1px;
}
.smart-support-login-form .form-group, .smart-support-register-form .form-group {
    margin-bottom: 22px;
}
.smart-support-login-form label, .smart-support-register-form label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #222;
    font-size: 15px;
}
/* Duplicate styling removed - using consistent form-control styling above */
/* Focus state handled by consistent styling above */
    background: #fff;
}
/* Duplicate button styling removed - using consistent styling above */
/* Button hover states handled by general button styling */
.smart-support-login-form .form-links,
.smart-support-register-form .form-links {
    text-align: center;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    font-size: 15px;
    color: #666;
}
.smart-support-login-form .form-links a,
.smart-support-register-form .form-links a {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 3px;
}
.smart-support-login-form .form-links a:hover,
.smart-support-register-form .form-links a:hover {
    text-decoration: underline;
}
.smart-support-login-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    accent-color: var(--ss-primary-color);
    transform: scale(1.1);
}
.smart-support-login-form label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
    color: #444;
}
@media (max-width: 600px) {
    .smart-support-login-form, .smart-support-register-form {
        padding: 18px 6vw 14px 6vw;
    }
    .smart-support-login-form h3, .smart-support-register-form h3 {
        font-size: 1.3em;
    }
} 

/* reCAPTCHA Styles */
.smart-support-recaptcha {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.smart-support-recaptcha > div {
    margin: 0 auto;
}

/* reCAPTCHA v2 checkbox styling */
.smart-support-recaptcha .g-recaptcha {
    transform-origin: left top;
    transform: scale(1);
}

/* reCAPTCHA v2 compact size */
.smart-support-recaptcha .g-recaptcha[data-size="compact"] {
    transform: scale(0.9);
}

/* reCAPTCHA v3 hidden input styling */
.smart-support-recaptcha input[type="hidden"] {
    display: none;
}

/* Form with reCAPTCHA enabled */
.smart-support-form[data-recaptcha-enabled="true"] {
    position: relative;
}

/* Invisible reCAPTCHA styling */
.smart-support-form[data-recaptcha-invisible="true"] .smart-support-recaptcha {
    display: none;
}

/* reCAPTCHA error message styling */
.recaptcha-error {
    color: #dc3232;
    font-size: 14px;
    margin-top: 5px;
    text-align: center;
}

/* Responsive reCAPTCHA */
@media (max-width: 480px) {
    .smart-support-recaptcha .g-recaptcha {
        transform: scale(0.85);
    }
    
    .smart-support-recaptcha .g-recaptcha[data-size="compact"] {
        transform: scale(0.75);
    }
}

/* Dark theme support for reCAPTCHA */
@media (prefers-color-scheme: dark) {
    .smart-support-recaptcha .g-recaptcha {
        filter: invert(1) hue-rotate(180deg);
    }
} 

/* Dashboard Search and Filters */
.tickets-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group.search-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.filter-group input[type="text"],
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--ss-primary-color);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.filter-group input[type="text"]::placeholder {
    color: #999;
    font-style: italic;
}

/* Filter form buttons use general button styling - no overrides needed */

/* Filter form button colors use general button styling - no overrides needed */

/* Search Results Highlighting */
.ticket-row.highlighted {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.ticket-subject .search-highlight {
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* Responsive Design for Filters */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        min-width: auto;
        width: 100%;
    }
    
    .filter-group.search-group {
        min-width: auto;
    }
    
    /* Filter form buttons use general button styling - no overrides needed */
}

@media (max-width: 480px) {
    .tickets-filters {
        padding: 15px;
    }
    
    .filter-group label {
        font-size: 13px;
    }
    
    .filter-group input[type="text"],
    .filter-group select {
        font-size: 13px;
        padding: 6px 10px;
    }
} 

/* Search Results Info */
.search-results-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #1976d2;
}

.search-results-info p {
    margin: 0;
    font-weight: 500;
}

.search-results-info .search-term {
    font-weight: 600;
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    margin: 0 2px;
} 

/* Quick Search Section */
.quick-search-section {
    margin-bottom: 20px;
}

.quick-search-box {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quick-search-form {
    margin: 0;
}

.quick-search-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-search-input-group input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.quick-search-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--ss-primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.quick-search-input-group input[type="text"]::placeholder {
    color: #6c757d;
    font-style: italic;
}

.quick-search-btn {
    background: var(--ss-primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.quick-search-btn:hover {
    background: #005a87;
}

.search-icon {
    font-size: 16px;
}

/* Responsive Quick Search */
@media (max-width: 768px) {
    .quick-search-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .quick-search-btn {
        width: 100%;
        padding: 10px;
    }
} 

/* Reply Rating System */
.reply-rating {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .star {
    font-size: 18px;
    color: #ddd;
    transition: color 0.2s ease;
    user-select: none;
}

.rating-stars .star.filled {
    color: #ffd700;
}

.rating-stars .star:hover {
    color: #ffd700;
}

.rating-stars .star:hover ~ .star {
    color: #ddd;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.average-rating {
    font-weight: 600;
    color: var(--ss-text-color);
}

.total-ratings {
    color: #999;
}

/* Rating not available message */
.rating-not-available {
    font-size: 12px;
    color: #999;
    font-style: italic;
    text-align: right;
    margin-top: 5px;
}

/* Admin Rating Display */
.reply-rating-display {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-stars-display {
    display: flex;
    gap: 2px;
}

.rating-stars-display .star {
    font-size: 16px;
    color: #ddd;
}

.rating-stars-display .star.filled {
    color: #ffd700;
}

.reply-rating-display .rating-info {
    font-size: 12px;
    color: #666;
}

.reply-rating-display .average-rating {
    font-weight: 600;
    color: #333;
}

/* Message Display */
.smart-support-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.smart-support-message.success {
    background-color: #28a745;
}

.smart-support-message.error {
    background-color: #dc3545;
}

.smart-support-message.info {
    background-color: #17a2b8;
} 

/* --- Front-end Ticket Container Preview System --- */

/* Smart Support Form Layout (Front-end) */
.smart-support-form-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.smart-support-form-layout .form-main {
    width: 100%;
}

/* Ticket Meta Information */
.ticket-meta-info {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-item strong {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.meta-item span {
    color: #6b7280;
    font-size: 14px;
    text-align: right;
}

/* Ticket View Header */
.ticket-view-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-view-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Subject Field */
.subject-field {
    margin-bottom: 30px;
}

.ticket-subject-display {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

/* Ticket Message */
.ticket-message {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.message-header {
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-info img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.author-details {
    flex: 1;
}

.author-name-role {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.author-name-role strong {
    font-weight: 600;
    color: #111827;
}

.author-role {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-role {
    background: #dbeafe;
    color: #1e40af;
}

.agent-role {
    background: #dcfce7;
    color: #166534;
}

.message-meta {
    font-size: 12px;
    color: #6b7280;
}

.message-content {
    padding: 20px;
    line-height: 1.6;
    color: #374151;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Reply Items */
.ticket-replies {
    margin-bottom: 30px;
}

.reply-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.reply-item:last-child {
    margin-bottom: 0;
}

/* Reply Form Section */
.reply-form-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

/* Ticket Actions */
.ticket-actions {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.ticket-actions h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

/* Status and State Badges */
.status-badge, .state-badge, .priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-new {
    background: #f0f6fc;
    color: #0d47a1;
}

.status-badge.status-working_on {
    background: #fff8e1;
    color: #e65100;
}

.status-badge.status-on_hold {
    background: #ffeaa7;
    color: #880e4f;
}

.state-badge.state-opened {
    background: #d4edda;
    color: #155724;
}

.state-badge.state-closed {
    background: #f8d7da;
    color: #721c24;
}

.state-badge.state-delayed {
    background: #fff3cd;
    color: #856404;
}

.priority-badge.priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

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

.priority-badge.priority-high {
    background: #f8d7da;
    color: #721c24;
}

.priority-badge.priority-urgent {
    background: #f5c6cb;
    color: #721c24;
    animation: pulse 2s infinite;
}

/* Reply Form Integration */
.reply-form-section .smart-support-reply-form {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.reply-form-section .form-group {
    margin-bottom: 20px;
}

.reply-form-section .form-group:last-child {
    margin-bottom: 0;
}

.reply-form-section .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.reply-form-section .editor-wrapper {
    position: relative;
}

.reply-form-section .editor-footer {
    display: flex;
    justify-content: flex-end;
    padding: 8px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
}

.reply-form-section .attachments-heading {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.reply-form-section .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.reply-form-section .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 20px;
}

.reply-form-section .form-actions-primary {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.reply-form-section .form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 44px;
}

.reply-form-section .form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.reply-form-section .form-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.reply-form-section .form-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reply-form-section .form-actions .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #f59e0b;
}

.reply-form-section .form-actions .btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.reply-form-section .form-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
}

.reply-form-section .form-actions .btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.reply-form-section .form-actions .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.reply-form-section .form-actions .btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.reply-form-section .form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reply-form-section .form-actions-info {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
}

.reply-form-section .form-actions-info .text-muted {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.reply-form-section .form-actions .btn .btn-text {
    font-weight: 500;
}

.reply-form-section .form-actions .btn .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reply-form-section .form-actions .btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smart-support-form-layout {
        padding: 16px;
    }
    
    .ticket-meta-info {
        padding: 16px;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .meta-item span {
        text-align: left;
    }
    
    .ticket-subject-display {
        font-size: 20px;
    }
    
    .message-header {
        padding: 12px 16px;
    }
    
    .message-content {
        padding: 16px;
    }
    
    .reply-form-section {
        padding: 16px;
    }
    
    .reply-form-section .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .reply-form-section .form-actions-primary {
        flex-direction: column;
        width: 100%;
    }
    
    .reply-form-section .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .reply-form-section .form-actions-info {
        margin-top: 8px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .smart-support-form-layout {
        padding: 12px;
    }
    
    .author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .author-name-role {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Subject Field */
.subject-field {
    margin-bottom: 20px;
}

.ticket-subject-display {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

/* Ticket Meta Information */
.ticket-meta-info {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-item strong {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.meta-item span {
    color: #6b7280;
    font-size: 13px;
    text-align: right;
}

/* Ticket View Header */
.ticket-view-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-view-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Ticket Message */
.ticket-message {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.message-header {
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.author-details {
    flex: 1;
}

.author-name-role {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.author-name-role strong {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.author-role {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-role {
    background: #dbeafe;
    color: #1e40af;
}

.agent-role {
    background: #dcfce7;
    color: #166534;
}

.message-meta {
    font-size: 11px;
    color: #6b7280;
}

.message-content {
    padding: 16px;
    line-height: 1.5;
    color: #374151;
    font-size: 14px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Reply Items */
.ticket-replies {
    margin-bottom: 20px;
}

.reply-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.reply-item:last-child {
    margin-bottom: 0;
}

/* Reply Form Section */
.reply-form-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

/* Ticket Actions */
.ticket-actions {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

.ticket-actions h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

/* Status and State Badges */
.status-badge, .state-badge, .priority-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reply Form Integration */
.reply-form-section .smart-support-reply-form {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.reply-form-section .form-group {
    margin-bottom: 16px;
}

.reply-form-section .form-group:last-child {
    margin-bottom: 0;
}

.reply-form-section .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.reply-form-section .editor-wrapper {
    position: relative;
}

.reply-form-section .editor-footer {
    display: flex;
    justify-content: flex-end;
    padding: 6px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 6px;
}

.reply-form-section .attachments-heading {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.reply-form-section .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.reply-form-section .form-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 8px 12px;
}

.reply-form-section .form-actions .btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
}

.reply-form-section .form-actions .btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smart-support-form-layout {
        padding: 12px;
    }
    
    .ticket-meta-info {
        padding: 12px;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .meta-item span {
        text-align: left;
    }
    
    .ticket-subject-display {
        font-size: 18px;
    }
    
    .message-header {
        padding: 10px 12px;
    }
    
    .message-content {
        padding: 12px;
        font-size: 13px;
    }
    
    .reply-form-section {
        padding: 12px;
    }
    
    .reply-form-section .form-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .reply-form-section .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .smart-support-form-layout {
        padding: 8px;
    }
    
    .author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .author-name-role {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .ticket-subject-display {
        font-size: 16px;
    }
}

/* Tickets Table - Size Optimizations */
.tickets-table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ss-background-color);
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    font-size: 13px;
}

.tickets-table th,
.tickets-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--ss-border-color);
    vertical-align: top;
}

.tickets-table th {
    background: var(--ss-light-gray);
    font-weight: 600;
    color: var(--ss-text-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tickets-table tr:hover {
    background: var(--ss-light-gray);
}

.ticket-link {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

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

.ticket-number {
    font-family: monospace;
    background: var(--ss-light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    font-weight: 600;
}

.ticket-id {
    width: 100px;
    min-width: 100px;
    max-width: 120px;
}

.ticket-subject {
    min-width: 200px;
    max-width: 300px;
}

.ticket-department {
    width: 120px;
    min-width: 120px;
    max-width: 150px;
}

.ticket-status {
    width: 100px;
    min-width: 100px;
    max-width: 120px;
}

.ticket-date {
    width: 120px;
    min-width: 120px;
    max-width: 140px;
    font-size: 12px;
}

.ticket-actions {
    width: 80px;
    min-width: 80px;
    max-width: 100px;
    text-align: center;
}

.ticket-subject .ticket-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.ticket-department {
    font-size: 12px;
    color: #666;
}

.ticket-date small {
    display: block;
    color: #999;
    font-size: 11px;
    margin-top: 2px;
}

.action-btn {
    display: inline-block;
    padding: 4px 6px;
    margin: 0 2px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: var(--ss-light-gray);
}

.view-btn {
    color: var(--ss-primary-color);
}

.close-btn {
    color: #dc3545;
}

.reopen-btn {
    color: #28a745;
}

/* Filter Form Optimizations */
.tickets-filters {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
    border: 1px solid var(--ss-border-color);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--ss-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    padding: 6px 10px;
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    font-size: 12px;
    min-height: 32px;
}

.filter-group.search-group {
    min-width: 200px;
    flex: 1;
}

.filter-group:has(.btn) {
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
    min-width: auto;
}

/* Filter group buttons use general button styling - no overrides needed */

/* Dashboard Settings */
.dashboard-settings-bar {
    margin-bottom: 8px;
    display: flex;
    justify-content: flex-end;
    padding: 8px 0;
}

#dashboard-settings-toggle {
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    padding: 8px !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
    cursor: pointer !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
}

#dashboard-settings-toggle:hover {
    background-color: var(--ss-light-gray);
}

/* Dashboard Settings Modal */
.dashboard-settings-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 999998 !important;
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dashboard-settings-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18) !important;
    padding: 24px !important;
    min-width: 400px !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    z-index: 999999 !important;
    display: none !important;
    border: 1px solid #ddd !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dashboard-settings-modal.show {
    display: block !important;
}

.dashboard-settings-modal-backdrop.show {
    display: block !important;
}

.dashboard-settings-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dashboard-settings-close:hover {
    background-color: #f0f0f1;
    color: #333;
}

.dashboard-settings-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    padding-right: 40px;
}

.dashboard-settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-settings-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
}

.dashboard-settings-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.dashboard-settings-submit {
    align-self: flex-start;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .dashboard-settings-modal {
        min-width: 320px;
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
}

/* Search Results Info */
.search-results-info {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    font-size: 12px;
    color: #1976d2;
}

/* No Tickets Message */
.no-tickets {
    text-align: center;
    padding: 40px 20px;
    background: var(--ss-light-gray);
    border-radius: var(--ss-border-radius);
    border: 1px solid var(--ss-border-color);
}

.no-tickets h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--ss-text-color);
}

.no-tickets p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #666;
}

/* Responsive Design for Tickets Table */
@media (max-width: 768px) {
    .tickets-table {
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 6px 8px;
    }
    
    .ticket-id {
        width: 80px;
        min-width: 80px;
        max-width: 100px;
    }
    
    .ticket-subject {
        min-width: 150px;
        max-width: 200px;
    }
    
    .ticket-department {
        width: 100px;
        min-width: 100px;
        max-width: 120px;
    }
    
    .ticket-status {
        width: 80px;
        min-width: 80px;
        max-width: 100px;
    }
    
    .ticket-date {
        width: 100px;
        min-width: 100px;
        max-width: 120px;
    }
    
    .ticket-actions {
        width: 60px;
        min-width: 60px;
        max-width: 80px;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-group.search-group {
        min-width: auto;
    }
    
    .filter-group:has(.btn) {
        flex-direction: row;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .tickets-table-wrapper {
        overflow-x: auto;
    }
    
    .tickets-table {
        min-width: 600px;
        font-size: 11px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 4px 6px;
    }
    
    .ticket-number {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .action-btn {
        font-size: 12px;
        padding: 2px 4px;
    }
}

/* Registration Form Layout */
.smart-support-register-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.smart-support-register-form h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
    color: var(--ss-text-color);
}

.smart-support-register-form .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.smart-support-register-form .form-row .form-group {
    flex: 1;
    min-width: 0;
}

.smart-support-register-form .form-group {
    margin-bottom: 16px;
}

.smart-support-register-form .form-group:last-child {
    margin-bottom: 0;
}

.smart-support-register-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--ss-text-color);
    font-size: 13px;
}

/* Form group input styling handled by general input styles above */

.smart-support-register-form .required {
    color: #dc2626;
    font-weight: 600;
}

/* Duplicate button styling removed - using consistent styling above */

.smart-support-register-form .form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ss-border-color);
}

.smart-support-register-form .form-links p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.smart-support-register-form .form-links a {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.smart-support-register-form .form-links a:hover {
    text-decoration: underline;
}

/* Responsive Design for Registration Form */
@media (max-width: 768px) {
    .smart-support-register-form {
        padding: 16px;
    }
    
    .smart-support-register-form .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .smart-support-register-form .form-group {
        margin-bottom: 12px;
    }
    
    /* Responsive input styling handled by general form-control styles */
}

@media (max-width: 480px) {
    .smart-support-register-form {
        padding: 12px;
    }
    
    .smart-support-register-form h3 {
        font-size: 18px;
    }
}

/* Login Form Layout */
.smart-support-login-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.smart-support-login-form h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
    color: var(--ss-text-color);
}

.smart-support-login-form .form-group {
    margin-bottom: 16px;
}

.smart-support-login-form .form-group:last-child {
    margin-bottom: 0;
}

.smart-support-login-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--ss-text-color);
    font-size: 13px;
}

/* Form group input styling handled by general input styles above */

.smart-support-login-form .form-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.smart-support-login-form .required {
    color: #dc2626;
    font-weight: 600;
}

/* Duplicate button styling removed - using consistent styling above */

.smart-support-login-form .form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ss-border-color);
}

.smart-support-login-form .form-links p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.smart-support-login-form .form-links p:last-child {
    margin-bottom: 0;
}

.smart-support-login-form .form-links a {
    color: var(--ss-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.smart-support-login-form .form-links a:hover {
    text-decoration: underline;
}

/* Responsive Design for Login Form */
@media (max-width: 768px) {
    .smart-support-login-form {
        padding: 16px;
    }
    
    .smart-support-login-form .form-group {
        margin-bottom: 12px;
    }
    
    /* Responsive input styling handled by general form-control styles */
}

@media (max-width: 480px) {
    .smart-support-login-form {
        padding: 12px;
    }
    
    .smart-support-login-form h3 {
        font-size: 18px;
    }
}
.widget-content .smart-support-form {
    height: 400px;
    overflow-y: scroll;
}

/* Powered by footer */
.ss-powered-by {
    margin-top: 10px;
    font-size: 10px;
    color: #6b7280;
    text-align: center;
}
.ss-powered-by a {
    color: inherit;
    text-decoration: underline;
}

/* Dashboard Actions column: remove container/backgrounds */
.support-dashboard-view .tickets-table .ticket-actions {
    background: transparent !important;
    border: none !important;
}

.support-dashboard-view .ticket-actions .action-btn,
.support-dashboard-view .ticket-actions .action-btn:hover,
.support-dashboard-view .ticket-actions .view-btn:hover,
.support-dashboard-view .ticket-actions .close-btn:hover,
.support-dashboard-view .ticket-actions .reopen-btn:hover {
    background: transparent !important;
}

/* Terms and Privacy Policy Checkbox Styling */
.form-group label a {
    color: #007cba;
    text-decoration: underline;
}

.form-group label a:hover {
    color: #005a87;
    text-decoration: none;
}

/* Remove checkbox border/outline and fix alignment */
.form-group input[type="checkbox"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    margin-right: 8px !important;
}

.form-group input[type="checkbox"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Fix checkbox alignment to match other form elements */
.form-group label {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Terms Checkbox Container - Clean and Aligned */
.terms-checkbox-container {
    margin: 15px 0;
    width: 100%;
    clear: both;
}

.terms-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
    width: 100%;
}

.terms-checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    flex-shrink: 0;
}

.terms-text {
    flex: 1;
    line-height: 1.4;
}

.terms-text a {
    color: #007cba;
    text-decoration: underline;
}

.terms-text a:hover {
    color: #005a87;
    text-decoration: none;
}

/* Disabled submit button styling */
#register-submit-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}