/* ==========================================================================
   DISCORYAUTH AI LIVE SUPPORT WIDGET (EXACT KEYAUTH 1:1 POPUP)
   ========================================================================== */

/* FLOATING WIDGET CONTAINER */
.discory-support-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 48px);
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1E293B;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, width 0.3s ease, height 0.3s ease;
}

.discory-support-widget.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* EXPANDED FULLSCREEN/LARGE MODE */
.discory-support-widget.expanded {
    width: 580px;
    height: 85vh;
    max-height: 850px;
}

@media (max-width: 480px) {
    .discory-support-widget {
        bottom: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ==========================================================================
   HEADER SECTION (KEYAUTH BLUE GRADIENT HEADER)
   ========================================================================== */
.dsw-header {
    background: linear-gradient(135deg, #1D63FF 0%, #0052FF 100%);
    padding: 18px 20px 30px;
    position: relative;
    color: #FFFFFF;
    flex-shrink: 0;
}

.dsw-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dsw-brand-pill {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    padding: 5px;
}

.dsw-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dsw-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsw-icon-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, opacity 0.15s ease;
    opacity: 0.9;
}

.dsw-icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    opacity: 1;
}

.dsw-header-title-wrap {
    margin-top: 14px;
}

.dsw-greeting-title {
    font-size: 21px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.4px;
    margin: 0;
    line-height: 1.25;
}

/* ==========================================================================
   BODY CONTAINER (WHITE CURVED CARD OVERLAY)
   ========================================================================== */
.dsw-body {
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    margin-top: -18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.05);
}

.dsw-view {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.dsw-view::-webkit-scrollbar {
    width: 5px;
}
.dsw-view::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 9999px;
}

/* ==========================================================================
   VIEW 1: INTAKE FORM (EXACT SCREENSHOT 1, 2, 3, 4)
   ========================================================================== */
.dsw-view-form {
    padding: 18px 20px 20px;
}

.dsw-bot-identity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dsw-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0E131F;
    border: 2px solid #0052FF;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25);
    padding: 7px;
}

.dsw-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tooltip on Avatar hover (Screenshot 3) */
.dsw-avatar-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    color: #1E293B;
    border: 1px solid #E2E8F0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 10;
}
.dsw-avatar-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #FFFFFF;
}
.dsw-avatar-wrap:hover .dsw-avatar-tooltip {
    opacity: 1;
}

.dsw-status-pill {
    background: #ECFDF5;
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.4px;
}

.dsw-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: dswPulse 1.8s infinite;
}

@keyframes dswPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.dsw-bot-subtext {
    font-size: 14px;
    color: #334155;
    margin: 0 0 16px;
    font-weight: 500;
}

.dsw-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.dsw-form-group {
    display: flex;
    flex-direction: column;
}

.dsw-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.dsw-required {
    color: #EF4444;
    font-weight: 700;
    margin-left: 2px;
}

.dsw-input, .dsw-select, .dsw-textarea {
    width: 100%;
    border: 1.5px solid #E2E8F0;
    border-radius: 9px;
    padding: 0 13px;
    font-size: 13.5px;
    color: #1E293B;
    background: #FFFFFF;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.dsw-input {
    height: 38px;
}

.dsw-select-wrapper {
    position: relative;
    width: 100%;
}

.dsw-select {
    height: 38px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 32px;
}

.dsw-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748B;
    display: flex;
    align-items: center;
}

.dsw-textarea {
    height: 95px;
    padding: 10px 13px;
    resize: vertical;
    line-height: 1.5;
}

.dsw-input:focus, .dsw-select:focus, .dsw-textarea:focus {
    border-color: #0052FF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.dsw-input.has-error, .dsw-select.has-error, .dsw-textarea.has-error {
    border-color: #EF4444;
    background: #FEF2F2;
}

.dsw-error-msg {
    color: #EF4444;
    font-size: 11.5px;
    font-weight: 500;
    margin-top: 4px;
    display: none;
    line-height: 1.35;
}

.dsw-error-msg.visible {
    display: block;
}

/* Consent Checkbox */
.dsw-consent-group {
    margin-top: 2px;
}

.dsw-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
}

.dsw-checkbox {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    border-radius: 4px;
    accent-color: #0052FF;
    cursor: pointer;
    flex-shrink: 0;
}

.dsw-checkbox-text {
    font-size: 11px;
    color: #475569;
    line-height: 1.45;
}

.dsw-checkbox-text a {
    color: #0052FF;
    text-decoration: underline;
}

/* Start Chatting Button */
.dsw-btn-primary {
    background: #0052FF;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    box-shadow: 0 4px 14px rgba(0, 82, 255, 0.25);
}

.dsw-btn-primary:hover {
    background: #1A65FF;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 82, 255, 0.35);
}

.dsw-btn-primary:active {
    transform: translateY(0);
}

.dsw-btn-primary:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================================
   VIEW 2: ACTIVE AI CHAT CONVERSATION (EXACT SCREENSHOT 5)
   ========================================================================== */
.dsw-view-chat {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.dsw-chat-stream {
    flex: 1;
    overflow-y: auto;
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
}

.dsw-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 90%;
}

.dsw-msg-row.bot {
    align-self: flex-start;
}

.dsw-msg-row.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.dsw-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0E131F;
    border: 1px solid #0052FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}

.dsw-msg-avatar svg, .dsw-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dsw-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
}

.dsw-msg-row.bot .dsw-msg-bubble {
    background: #F1F5F9;
    color: #1E293B;
    border-top-left-radius: 4px;
}

.dsw-msg-row.user .dsw-msg-bubble {
    background: #0052FF;
    color: #FFFFFF;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
}

.dsw-msg-bubble pre {
    background: #0B0E14;
    color: #38BDF8;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    overflow-x: auto;
    margin: 6px 0;
}

.dsw-msg-bubble code {
    background: rgba(0, 0, 0, 0.08);
    color: #0052FF;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
}

.dsw-msg-row.user .dsw-msg-bubble code {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* 1:1 CONFIRMATION SUMMARY CARD (SCREENSHOT 5) */
.dsw-summary-card-wrapper {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 4px 0;
    align-self: center;
    width: 100%;
    box-sizing: border-box;
}

.dsw-summary-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

.dsw-check-circle {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #0F172A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
}

.dsw-summary-inner-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 12px 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dsw-summary-edit-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: #3B82F6;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.dsw-summary-edit-btn:hover {
    transform: scale(1.15);
}

.dsw-summary-line {
    font-size: 12.5px;
    color: #475569;
}
.dsw-s-label {
    color: #64748B;
    font-weight: 500;
}
.dsw-s-val {
    color: #1E293B;
    font-weight: 600;
}

/* TYPING INDICATOR */
.dsw-typing-row {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}
.dsw-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #F1F5F9;
    padding: 10px 14px;
    border-radius: 14px;
    border-top-left-radius: 4px;
}
.dsw-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748B;
    animation: dswBounce 1.4s infinite ease-in-out;
}
.dsw-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.dsw-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dswBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* CHAT INPUT BAR AT BOTTOM (SCREENSHOT 5) */
.dsw-chat-input-bar {
    padding: 10px 14px;
    border-top: 1px solid #F1F5F9;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsw-chat-input {
    flex: 1;
    height: 40px;
    border: 1.5px solid #E2E8F0;
    border-radius: 9999px;
    padding: 0 16px;
    font-size: 13.5px;
    color: #1E293B;
    outline: none;
    transition: border-color 0.2s ease;
}

.dsw-chat-input:focus {
    border-color: #0052FF;
}

.dsw-chat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dsw-chat-action-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.dsw-chat-action-btn:hover {
    color: #1E293B;
    background: #F1F5F9;
}

.dsw-chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #93C5FD;
    border: none;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dsw-chat-send-btn.active {
    background: #0052FF;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 82, 255, 0.3);
}

.dsw-chat-send-btn.active:hover {
    background: #1A65FF;
    transform: scale(1.06);
}

/* ==========================================================================
   VIEW 3: FAQ VIEW
   ========================================================================== */
.dsw-view-faq {
    padding: 18px 20px;
}

.dsw-faq-title {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 14px;
}

.dsw-faq-item {
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.dsw-faq-header {
    width: 100%;
    text-align: left;
    background: #FFFFFF;
    border: none;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1E293B;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.dsw-faq-header:hover {
    background: #F8FAFC;
}

.dsw-faq-body {
    padding: 0 14px 12px;
    font-size: 12.5px;
    color: #64748B;
    line-height: 1.55;
    display: none;
}

.dsw-faq-item.active .dsw-faq-body {
    display: block;
}

.dsw-faq-item.active .dsw-faq-header {
    color: #0052FF;
}

/* ==========================================================================
   VIEW 4: CHANNELS VIEW
   ========================================================================== */
.dsw-view-channels {
    padding: 18px 20px;
}

.dsw-channel-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    text-decoration: none;
    color: #1E293B;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.dsw-channel-card:hover {
    border-color: #0052FF;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 82, 255, 0.1);
}

.dsw-channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
}

.dsw-ch-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
}

.dsw-ch-info p {
    font-size: 12px;
    color: #64748B;
    margin: 0;
}

/* ==========================================================================
   FOOTER TABS (SCREENSHOT 1, 2, 5)
   ========================================================================== */
.dsw-footer-tabs {
    height: 56px;
    border-top: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #FFFFFF;
    flex-shrink: 0;
}

.dsw-tab-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #64748B;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.dsw-tab-btn:hover {
    color: #0052FF;
}

.dsw-tab-btn.active {
    color: #0052FF;
}

.dsw-tab-btn.active svg {
    stroke: #0052FF;
}

/* ==========================================================================
   LIVE AGENT STATUS BAR (TOP OF CHAT VIEW)
   ========================================================================== */
.dsw-agent-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.dsw-agent-status-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dsw-status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: dswPulse 1.8s infinite;
}

.dsw-status-pulse.queue {
    background: #F59E0B;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.dsw-agent-name {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.dsw-escalate-pill-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #0052FF;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dsw-escalate-pill-btn:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.dsw-escalate-pill-btn:disabled {
    opacity: 0.6;
    cursor: default;
    background: #F1F5F9;
    color: #64748B;
    border-color: #E2E8F0;
}

/* ==========================================================================
   1:1 KEYAUTH EMOJI PICKER POPOVER (MATCHING SCREENSHOT 1)
   ========================================================================== */
.dsw-emoji-popover {
    position: absolute;
    bottom: 60px;
    left: 12px;
    right: 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    max-height: 350px;
    z-index: 999;
    overflow: hidden;
    animation: dswPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.dsw-emoji-header {
    padding: 10px 12px 6px;
    border-bottom: 1px solid #F1F5F9;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dsw-emoji-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 9999px;
    padding: 0 12px;
    height: 34px;
    transition: border-color 0.15s ease;
}

.dsw-emoji-search-box:focus-within {
    border-color: #0052FF;
    background: #FFFFFF;
}

.dsw-emoji-search-box svg {
    color: #94A3B8;
    flex-shrink: 0;
}

.dsw-emoji-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #1E293B;
}

.dsw-emoji-search-input::placeholder {
    color: #94A3B8;
}

.dsw-emoji-preview-slot {
    font-size: 17px;
    user-select: none;
    flex-shrink: 0;
}

/* Category Tab Selector */
.dsw-emoji-cat-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    padding-top: 2px;
}

.dsw-emoji-cat-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    padding: 4px 6px 6px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.15s ease;
    filter: grayscale(0.2);
}

.dsw-emoji-cat-btn:hover {
    background: #F1F5F9;
    filter: none;
}

.dsw-emoji-cat-btn.active {
    border-bottom-color: #0052FF;
    filter: none;
    background: rgba(0, 82, 255, 0.06);
}

/* 8-Column Emoji Grid Container */
.dsw-emoji-grid {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 14px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 230px;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

.dsw-emoji-grid::-webkit-scrollbar {
    width: 6px;
}
.dsw-emoji-grid::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}

.dsw-emoji-item {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    background: transparent;
    border: none;
    transition: transform 0.12s ease, background 0.12s ease;
}

.dsw-emoji-item:hover {
    background: #F1F5F9;
    transform: scale(1.22);
}

.dsw-emoji-item:active {
    transform: scale(1.05);
}

.dsw-emoji-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 0;
    color: #94A3B8;
    font-size: 13px;
}

/* Emoji Trigger Active State */
.dsw-chat-action-btn.active-emoji {
    color: #0052FF;
    background: #EFF6FF;
}

/* ==========================================================================
   ATTACHMENT PREVIEW TRAY (ABOVE CHAT INPUT)
   ========================================================================== */
.dsw-attachment-tray {
    padding: 6px 14px;
    background: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsw-attachment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    color: #1E293B;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dsw-attachment-name {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.dsw-attachment-size {
    color: #64748B;
    font-size: 11px;
}

.dsw-attachment-remove-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 13px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    line-height: 1;
}

.dsw-attachment-remove-btn:hover {
    color: #EF4444;
}

/* ==========================================================================
   CHAT BUBBLE ATTACHMENT RENDERING
   ========================================================================== */
.dsw-bubble-img-wrap {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 240px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.dsw-bubble-img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.dsw-bubble-img:hover {
    transform: scale(1.03);
}

.dsw-bubble-file-badge {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================================================
   LIVE AGENT VERIFIED BUBBLE
   ========================================================================== */
.dsw-msg-row.agent .dsw-msg-avatar {
    border-color: #F59E0B;
    background: #78350F;
}

.dsw-msg-row.agent .dsw-msg-bubble {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #78350F;
    border-top-left-radius: 4px;
}

.dsw-agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: #B45309;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.dsw-msg-row.system .dsw-msg-bubble {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
    font-size: 12.5px;
    align-self: center;
    width: 100%;
    text-align: center;
    border-radius: 10px;
}
