/* =========================================================
   UNIQUE MODERN CUSTOMER SUPPORT CHAT STYLES
   Crafted with custom design tokens, modern micro-interactions,
   and flawless responsiveness.
========================================================= */

:root {
    --chat-primary: #15803d;
    --chat-primary-hover: #166534;
    --chat-primary-light: #f0fdf4;
    --chat-accent: #22c55e;
    --chat-bg: #f8fafc;
    --chat-card: #ffffff;
    --chat-text: #0f172a;
    --chat-muted: #64748b;
    --chat-border: #e2e8f0;
    --chat-bubble-sent: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    --chat-radius: 20px;
    --chat-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --chat-shadow: 0 12px 35px -8px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.8);
    --chat-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Wrapper */
.customer-support-page {
    padding: 0;
    background: transparent;
    font-family: var(--chat-font);
}

/* Page Header */
.support-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--chat-border);
    border-radius: var(--chat-radius);
    padding: 24px 28px;
    box-shadow: var(--chat-shadow-sm);
    position: relative;
    overflow: hidden;
}

.support-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--chat-primary), var(--chat-accent));
}

.support-breadcrumb {
    margin-bottom: 6px;
    color: var(--chat-muted);
    font-size: 13px;
    font-weight: 500;
}

.support-page-header h2 {
    margin: 0 0 6px;
    color: var(--chat-text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.support-header-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.support-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: #16a34a;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    animation: supportPulse 2s infinite;
}

@keyframes supportPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.support-time-badge {
    color: var(--chat-muted);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.support-header-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(34, 197, 94, 0.2));
    color: var(--chat-primary);
    font-size: 26px;
    flex-shrink: 0;
    border: 1px solid rgba(22, 163, 74, 0.15);
}

/* Chat Main Box */
.support-chat-wrapper {
    display: flex;
    height: 680px;
    min-height: 560px;
    background: #ffffff;
    border: 1px solid var(--chat-border);
    border-radius: var(--chat-radius);
    box-shadow: var(--chat-shadow);
    overflow: hidden;
    position: relative;
}

/* Left Sidebar - Support Team */
.support-users-panel {
    width: 340px;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid var(--chat-border);
}

.support-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.support-users-header h5 {
    margin: 0;
    color: var(--chat-text);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.support-users-header span#supportUserCount {
    display: block;
    color: var(--chat-muted);
    font-size: 12px;
    margin-top: 2px;
}

.support-online-indicator {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(22, 163, 74, 0.08);
}

.support-online-indicator span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--chat-accent);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

/* Search Box */
.support-search {
    position: relative;
    padding: 14px 18px 10px;
}

.support-search i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.support-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--chat-text);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.support-search input:focus {
    background: #ffffff;
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

/* Users List */
.support-users-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px 16px;
}

.support-users-list::-webkit-scrollbar {
    width: 5px;
}

.support-users-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Support Agent Row */
.support-user-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.support-user-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(2px);
}

.support-user-item.active {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
    border-left: 4px solid var(--chat-primary);
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.08);
}

.support-user-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.support-user-avatar img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--chat-border);
    background: #f1f5f9;
}

.support-user-online {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #ffffff;
}

.support-user-online.online {
    background: var(--chat-accent);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.support-user-info {
    flex: 1;
    min-width: 0;
}

.support-user-name {
    display: block;
    color: var(--chat-text);
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-user-last-message {
    display: block;
    margin-top: 3px;
    color: var(--chat-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.support-user-time {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.support-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--chat-primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(21, 128, 61, 0.35);
}

/* Right Area - Chat Panel */
.support-chat-panel {
    flex: 1;
    min-width: 0;
    position: relative;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

/* Empty State */
.support-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    z-index: 10;
}

.support-empty-icon-glow {
    position: relative;
    margin-bottom: 24px;
}

.support-empty-icon-glow::before {
    content: '';
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle, rgba(22, 163, 74, 0.25) 0%, rgba(22, 163, 74, 0) 70%);
    border-radius: 50%;
    filter: blur(10px);
}

.support-empty-icon {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #ffffff;
    font-size: 38px;
    position: relative;
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.3);
}

.support-empty-state h4 {
    margin: 0 0 8px;
    color: var(--chat-text);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.support-empty-state p {
    max-width: 440px;
    margin: 0 0 28px;
    color: var(--chat-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

/* Quick Prompts */
.support-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 520px;
}

.support-prompt-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--chat-border);
    border-radius: 999px;
    color: var(--chat-text);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--chat-shadow-sm);
}

.support-prompt-chip i {
    color: var(--chat-primary);
}

.support-prompt-chip:hover {
    background: var(--chat-primary-light);
    border-color: var(--chat-primary);
    color: var(--chat-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

/* Active Chat */
.support-active-chat {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Active Chat Header */
.support-chat-header {
    height: 76px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid var(--chat-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    z-index: 5;
}

.support-chat-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.support-mobile-back {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--chat-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--chat-text);
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.support-mobile-back:hover {
    background: #e2e8f0;
}

.support-avatar-wrapper {
    position: relative;
    width: 46px;
    height: 46px;
}

.support-avatar-wrapper img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--chat-border);
    background: #f1f5f9;
}

.support-avatar-status {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #ffffff;
}

.support-avatar-status.online {
    background: var(--chat-accent);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.support-chat-user h5 {
    margin: 0;
    color: var(--chat-text);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.support-verified-badge {
    color: var(--chat-primary);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(22, 163, 74, 0.1);
    padding: 2px 7px;
    border-radius: 999px;
}

.support-chat-user span#activeAdminEmail {
    display: block;
    margin-top: 2px;
    color: var(--chat-muted);
    font-size: 11.5px;
}

.support-chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-encryption-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--chat-muted);
    border: 1px solid #e2e8f0;
}

.support-encryption-badge i {
    color: var(--chat-primary);
}

.support-chat-action {
    width: 38px;
    height: 38px;
    border: 1px solid var(--chat-border);
    border-radius: 11px;
    background: #f8fafc;
    color: var(--chat-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.support-chat-action:hover {
    background: #ffffff;
    color: var(--chat-primary);
    border-color: var(--chat-primary);
    transform: rotate(45deg);
}

/* Messages Area */
.support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background:
        radial-gradient(circle at 10% 20%, rgba(22, 163, 74, 0.03), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.03), transparent 30%),
        #f8fafc;
    display: flex;
    flex-direction: column;
}

.support-messages::-webkit-scrollbar {
    width: 6px;
}

.support-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Message Rows */
.support-message-row {
    display: flex;
    margin-bottom: 16px;
    width: 100%;
}

.support-message-row.sent {
    justify-content: flex-end;
}

.support-message-row.received {
    justify-content: flex-start;
}

.support-message {
    max-width: min(72%, 600px);
    padding: 13px 18px;
    font-size: 13.5px;
    line-height: 1.6;
    word-break: break-word;
    position: relative;
    transition: all 0.2s ease;
}

/* Sent Bubble (Customer) */
.support-message-row.sent .support-message {
    background: var(--chat-bubble-sent);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}

/* Received Bubble (Support Specialist) */
.support-message-row.received .support-message {
    background: #ffffff;
    color: var(--chat-text);
    border: 1px solid var(--chat-border);
    border-radius: 18px 18px 18px 4px;
    box-shadow: var(--chat-shadow-sm);
}

.support-message-text {
    font-weight: 400;
}

.support-message-time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 500;
}

.support-message-row.sent .support-message-time {
    color: rgba(255, 255, 255, 0.85);
}

.support-message-row.received .support-message-time {
    color: #94a3b8;
}

.support-message-image {
    max-width: 100%;
    max-height: 250px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: block;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.support-message-image:hover {
    opacity: 0.92;
    transform: scale(1.015);
}

.support-message-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    margin-top: 6px;
}

/* Typing Indicator */
.support-typing {
    padding: 6px 28px 10px;
    color: var(--chat-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.support-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--chat-primary);
    animation: supportTypingBounce 1.4s infinite ease-in-out;
}

.support-typing span:nth-child(1) { animation-delay: 0s; }
.support-typing span:nth-child(2) { animation-delay: 0.2s; }
.support-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes supportTypingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* Composer Area */
.support-composer {
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid var(--chat-border);
    position: relative;
    z-index: 5;
}

.support-composer-inner {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--chat-border);
    border-radius: 16px;
    padding: 6px 8px 6px 16px;
    transition: all 0.2s ease;
}

.support-composer-inner:focus-within {
    background: #ffffff;
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.support-composer textarea {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--chat-text);
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.5;
    outline: none;
}

.support-send-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #15803d, #16a34a);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.25);
}

.support-send-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #166534, #15803d);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 14px rgba(21, 128, 61, 0.35);
}

.support-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.support-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px 0;
    color: #94a3b8;
    font-size: 11px;
}

/* Loading & Empty States inside containers */
.support-loading,
.support-chat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--chat-muted);
    font-size: 13px;
    font-weight: 500;
}

.support-no-users,
.support-chat-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--chat-muted);
}

.support-no-users i,
.support-chat-empty i {
    font-size: 38px;
    color: #cbd5e1;
    margin-bottom: 12px;
    display: block;
}

.support-no-users h6,
.support-chat-empty h6 {
    font-size: 15px;
    font-weight: 700;
    color: var(--chat-text);
    margin: 0 0 6px;
}

.support-no-users p,
.support-chat-empty p {
    font-size: 12.5px;
    color: var(--chat-muted);
    margin: 0;
    line-height: 1.5;
}

.support-empty-icon.support-empty-icon-muted {
    background: linear-gradient(135deg, #64748b, #94a3b8) !important;
    box-shadow: 0 12px 28px rgba(100, 116, 139, 0.25) !important;
}

/* Responsive Mobile Layout */
@media (max-width: 991px) {
    .support-chat-wrapper {
        height: calc(100vh - 200px);
    }
}

@media (max-width: 767px) {
    .support-page-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .support-header-icon {
        display: none;
    }

    .support-chat-wrapper {
        height: calc(100vh - 160px);
        min-height: 480px;
        border-radius: 16px;
    }

    .support-users-panel {
        width: 100%;
        min-width: 100%;
    }

    .support-chat-panel {
        display: none;
        width: 100%;
    }

    .support-chat-wrapper.chat-open .support-users-panel {
        display: none;
    }

    .support-chat-wrapper.chat-open .support-chat-panel {
        display: flex;
    }

    .support-mobile-back {
        display: flex;
    }

    .support-message {
        max-width: 88%;
        font-size: 13px;
        padding: 10px 14px;
    }

    .support-messages {
        padding: 16px;
    }

    .support-composer {
        padding: 12px 16px;
    }

    .support-chat-header {
        padding: 12px 16px;
    }
}

/* =========================================================
   CHAT MEDIA PREVIEW MODAL
   ========================================================= */
.chat-media-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: chatMediaFadeIn 0.2s ease-out;
}

@keyframes chatMediaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chat-media-modal-container {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    max-width: 900px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
    animation: chatMediaScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatMediaScaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-media-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-media-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
}

.chat-media-modal-title i {
    color: #22c55e;
}

.chat-media-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
}

.chat-media-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: rotate(90deg);
}

.chat-media-modal-body {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: #020617;
    min-height: 200px;
}

.chat-media-modal-body img {
    max-height: 70vh;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.chat-media-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f172a;
}

.chat-media-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.chat-media-modal-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.chat-media-modal-btn.secondary {
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
}

.chat-media-modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

/* =========================================================
   USER INITIALS AVATARS & FALLBACK
========================================================= */
.user-avatar-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.user-avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    user-select: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.avatar-xs {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
}

.avatar-xs .user-avatar-initials {
    font-size: 11px;
}

/* Message Sender Avatar Column */
.support-message-avatar {
    flex-shrink: 0;
    margin-right: 10px;
    align-self: flex-end;
    margin-bottom: 2px;
    width: 32px;
    height: 32px;
}

/* =========================================================
   MESSAGE MEDIA & ATTACHMENTS
========================================================= */
.support-message-media-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    cursor: pointer;
    display: inline-block;
    max-width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-message-media-wrap:hover {
    transform: scale(1.01);
}

.support-message-media-wrap .support-message-image {
    margin-bottom: 0;
}

.support-message-image.image-fallback {
    background: #f1f5f9;
    padding: 18px;
    object-fit: contain;
    max-height: 120px;
    border: 1px dashed #cbd5e1;
}

.support-media-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.support-message-media-wrap:hover .support-media-badge {
    opacity: 1;
}

/* Read / Unread Status Ticks */
.support-message-status {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    margin-left: 3px;
    vertical-align: middle;
}

.support-message-status.read i {
    color: #38bdf8 !important; /* cyan blue tickmark matching mobile user app */
}

.support-message-status.sent i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* =========================================================
   COMPOSER IMAGE ATTACHMENT & PREVIEW
========================================================= */
.support-composer-attach-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.support-composer-attach-btn:hover {
    color: var(--chat-primary);
    background: rgba(22, 163, 74, 0.08);
}

.support-image-preview-container {
    padding: 10px 14px 4px;
    margin-bottom: 4px;
}

.support-image-preview-card {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--chat-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.support-image-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.support-remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.support-remove-image-btn:hover {
    background: #ef4444;
}


