/**
 * Scoped Modern 2026 UIkit 3 styling for com_support
 * Integrates seamlessly with YOOtheme Pro without polluting global styles.
 */

.com-support-wrapper {
    position: relative;
    width: 100%;
}

/* Status Pulse Dot */
.status-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-dot 2s infinite;
    margin-right: 6px;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Header Elements */
.com-support-header-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #34627e 0%, #284d63 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(52, 98, 126, 0.28);
    flex-shrink: 0;
}

.com-support-btn-primary {
    background: #34627e;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 9px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(52, 98, 126, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    border: none;
}

.com-support-btn-primary:hover {
    transform: translateY(-2px);
    background: #305973;
    box-shadow: 0 8px 22px rgba(52, 98, 126, 0.35);
    color: #ffffff !important;
}

/* 2026 Modern KPI Stat Cards */
.com-support-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 22px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.com-support-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.com-support-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.com-support-stat-label {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
    color: #64748b;
    margin: 0;
}

.com-support-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.com-support-stat-card.stat-warning .com-support-stat-icon {
    background: #fffbeb;
    color: #d97706;
}

.com-support-stat-card.stat-primary .com-support-stat-icon {
    background: #f0f5f8;
    color: #34627e;
}

.com-support-stat-card.stat-success .com-support-stat-icon {
    background: #ecfdf5;
    color: #059669;
}

.com-support-stat-card.stat-muted .com-support-stat-icon {
    background: #f8fafc;
    color: #64748b;
}

.com-support-stat-number {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    margin: 10px 0 4px 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.com-support-stat-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* Modern Segmented Navigation Tabs & Container */
.com-support-tabs-container,
.com-support-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 14px rgba(0, 0, 0, 0.03);
    padding: 22px;
}

.com-support-status-chip {
    display: inline-flex;
    align-items: center;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.com-support-id-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.74rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.com-support-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}

.com-support-badge.badge-new {
    background: #f0f5f8;
    color: #234960;
    border: 1px solid #c0d6e4;
}

.com-support-badge.badge-waiting {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.com-support-badge.badge-answered,
.com-support-badge.badge-replied {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.com-support-badge.badge-resolved {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.com-support-search-input {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding-left: 36px !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
    width: 200px;
}

.com-support-search-input:focus {
    background: #ffffff !important;
    border-color: #34627e !important;
    box-shadow: 0 0 0 3px rgba(52, 98, 126, 0.14) !important;
    width: 240px;
}

.com-support-wrapper .uk-form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
    letter-spacing: 0.2px;
}

.com-support-wrapper .uk-input,
.com-support-wrapper .uk-select,
.com-support-wrapper .uk-textarea {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #0f172a;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.com-support-wrapper .uk-input:focus,
.com-support-wrapper .uk-select:focus,
.com-support-wrapper .uk-textarea:focus {
    background-color: #ffffff;
    border-color: #34627e;
    box-shadow: 0 0 0 3px rgba(52, 98, 126, 0.14);
    outline: none;
}

.com-support-segmented-tabs {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    display: inline-flex;
    gap: 4px;
    list-style: none;
    margin: 0;
}

.com-support-segmented-tabs > li {
    padding: 0;
}

.com-support-segmented-tabs > li > a {
    padding: 7px 18px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #64748b;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.com-support-segmented-tabs > li.uk-active > a {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.com-support-tab-count {
    background: #e2e8f0;
    color: #334155;
    font-weight: 700;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 11px;
}

.com-support-segmented-tabs > li.uk-active .com-support-tab-count {
    background: #34627e;
    color: #ffffff;
}

/* Modern Ticket Item Cards */
.com-support-ticket-item {
    display: block;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    color: inherit;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.com-support-ticket-item:hover {
    background: #ffffff;
    border-color: #9bbecf;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px -4px rgba(52, 98, 126, 0.12);
    color: inherit;
}

.com-support-ticket-item.is-new-ticket {
    border-left: 4px solid #34627e;
}

.com-support-ticket-item.is-waiting-reply {
    border-left: 4px solid #f59e0b;
}

.com-support-ticket-item.is-answered,
.com-support-ticket-item.is-replied {
    border-left: 4px solid #94a3b8;
}

.com-support-ticket-item.is-resolved {
    border-left: 4px solid #10b981;
    opacity: 0.92;
}

.com-support-ticket-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #0f172a;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.com-support-ticket-item:hover .com-support-ticket-title {
    color: #34627e;
}

.com-support-ticket-meta {
    font-size: 0.82rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.com-support-ticket-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.com-support-mini-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
}

.com-support-ticket-arrow {
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.com-support-ticket-item:hover .com-support-ticket-arrow {
    color: #34627e;
    transform: translateX(4px);
}

/* Product Tag Pill */
.com-support-product-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.2s ease;
}

.com-support-ticket-item:hover .com-support-product-pill {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

/* SLA Guarantee Banner */
.com-support-sla-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #475569;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

/* Conversation Thread Messages (Chat Style) */
.com-support-thread {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 24px 0;
    width: 100%;
}

.com-support-msg-row {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
}

.com-support-row-client {
    justify-content: flex-start;
}

.com-support-row-staff {
    justify-content: flex-end;
}

.com-support-msg-bubble {
    padding: 20px 24px;
    position: relative;
    width: 88%;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

/* Client / Customer on the Left (even width) */
.com-support-msg-client {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #64748b;
    border-radius: 14px 14px 14px 3px;
    margin-right: auto;
    margin-left: 0;
}

/* Staff / Support Team on the Right (even width) */
.com-support-msg-staff {
    background: #f0f5f8;
    border: 1px solid #c0d6e4;
    border-right: 5px solid #34627e;
    border-radius: 14px 14px 3px 14px;
    margin-left: auto;
    margin-right: 0;
}

.com-support-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 12px;
}

.com-support-msg-staff .com-support-msg-header {
    border-bottom-color: rgba(52, 98, 126, 0.14);
}

.com-support-msg-author {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.com-support-msg-time {
    font-size: 0.8rem;
    color: var(--uk-text-muted-color, #888);
    white-space: nowrap;
}

.com-support-msg-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--uk-text-color, #1e293b);
    word-break: break-word;
}

/* Attachment Chips */
.com-support-attach-box {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.com-support-attach-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: inherit;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.com-support-attach-chip:hover {
    background: rgba(52, 98, 126, 0.12);
    color: #34627e;
    border-color: rgba(52, 98, 126, 0.3);
}

/* Sensitive Credential Box in Sidebar */
.com-support-cred-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.88rem;
}

.com-support-cred-row:last-child {
    border-bottom: none;
}

.com-support-cred-label {
    font-weight: 500;
    color: var(--uk-text-muted-color, #666);
}

.com-support-cred-val {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-size: 0.9rem;
}

.com-support-cred-hidden {
    letter-spacing: 2px;
}

/* Modern AI toolbar */
.com-support-ai-toolbar {
    background: linear-gradient(135deg, rgba(30, 135, 240, 0.05), rgba(150, 60, 255, 0.05));
    border: 1px solid rgba(30, 135, 240, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
}

/* File Upload Area */
.com-support-upload-zone {
    border: 2px dashed rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.01);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.com-support-upload-zone:hover {
    border-color: #1e87f0;
    background: rgba(30, 135, 240, 0.02);
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .com-support-msg-bubble {
        width: 96%;
        padding: 16px 18px;
    }
    .com-support-ticket-meta {
        gap: 6px;
    }
    .com-support-msg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Predefined Canned Replies */
.com-support-quick-reply-btn {
    border-color: #cbd5e1;
    background: #ffffff;
    transition: all 0.2s ease;
}

.com-support-quick-reply-btn:hover {
    border-color: #34627e;
    background: #f0f5f8;
    color: #34627e;
}

.canned-reply-card-wrapper .uk-card:hover {
    border-color: #34627e !important;
    background-color: #fbfcfe;
}

.canned-reply-card-wrapper .uk-label-primary {
    background: #34627e;
    color: #ffffff;
}

.com-support-admin-replies .reply-row:hover {
    background-color: rgba(52, 98, 126, 0.04);
}

/* Compact Professional Striped Specification Table */
.com-support-specs-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.com-support-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.85rem;
}

.com-support-specs-table tbody tr {
    border-bottom: 1px solid #eef2f6;
    transition: background-color 0.15s ease;
}

.com-support-specs-table tbody tr:last-child {
    border-bottom: none;
}

/* Odd Rows: Clean crisp white value with soft slate label */
.com-support-specs-table tbody tr:nth-child(odd) td.spec-label {
    background-color: #f8fafc;
}
.com-support-specs-table tbody tr:nth-child(odd) td.spec-value {
    background-color: #ffffff;
}

/* Even Rows (Striped): Very light custom soft azure/slate tint */
.com-support-specs-table tbody tr:nth-child(even) td.spec-label {
    background-color: #eef2f7;
}
.com-support-specs-table tbody tr:nth-child(even) td.spec-value {
    background-color: #f7f9fc;
}

/* Row Hover: subtle soft blue tint */
.com-support-specs-table tbody tr:hover td.spec-label {
    background-color: #e0eafc;
}
.com-support-specs-table tbody tr:hover td.spec-value {
    background-color: #f0f7ff;
}

.com-support-specs-table td.spec-label {
    width: 210px;
    padding: 8px 16px;
    font-size: 0.81rem;
    font-weight: 600;
    color: #475569;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.com-support-specs-table td.spec-value {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    vertical-align: middle;
    word-break: break-word;
    transition: background-color 0.15s ease;
}

.com-support-specs-table tr.spec-row-resolved td.spec-label {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
}

.com-support-specs-table tr.spec-row-resolved td.spec-value {
    background-color: #f0fdf4 !important;
    color: #047857 !important;
}

@media (max-width: 640px) {
    .com-support-specs-table td.spec-label {
        width: 130px;
        padding: 7px 10px;
        font-size: 0.75rem;
    }
    .com-support-specs-table td.spec-value {
        padding: 7px 10px;
        font-size: 0.8rem;
    }
}

/* Compact Buttons */
.com-support-quick-reply-btn {
    border-color: #cbd5e1;
    background: #ffffff;
    padding: 3px 10px !important;
    font-size: 11px !important;
    height: auto !important;
    line-height: 1.5 !important;
    border-radius: 6px !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.com-support-quick-reply-btn:hover {
    border-color: #34627e;
    background: #f0f5f8;
    color: #34627e;
}

.com-support-ai-toolbar .ai-action-btn {
    padding: 3px 10px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    height: auto !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.15s ease;
}

.com-support-ai-toolbar .ai-action-btn:hover {
    border-color: #34627e !important;
    color: #34627e !important;
    background: #f0f5f8 !important;
}

.com-support-btn-compact {
    padding: 6px 14px !important;
    font-size: 0.84rem !important;
    height: auto !important;
    line-height: 1.4 !important;
    border-radius: 7px !important;
    font-weight: 600 !important;
}




