/* /Components/Chat/ChatWidget.razor.rz.scp.css */
/* CSS isolation (Blazor scopes this automatically to ChatWidget.razor's markup) - keeps the
   widget's own look independent of theme.css/adminlte.min.css's global rules, same reasoning a
   tawk.to-style bolt-on widget needs: it has to look right on every page in this app, including
   ones whose own styling this widget doesn't otherwise touch. */

/* Restyled 2026-09-23, at the user's explicit request, to match the reference tawk.to
   screenshots: green in place of the original purple (#4e2a84), plus new rules below for the
   teaser card, launcher tooltip, and unread badge that ChatWidget.razor's markup now renders.
   Chosen a mid-tone tawk.to-like green rather than lifting an exact hex from the screenshot,
   since none was specified - easy to tune with the two variables below if the user wants an
   exact brand match later. */
.chat-widget[b-1ute3tuf25] {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
    --chat-widget-green: #22b573;
    --chat-widget-green-dark: #1a8f5c;
}

/* ---- Launcher (closed) state ---- */

.chat-widget-launcher-wrap[b-1ute3tuf25] {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.chat-widget-bubble[b-1ute3tuf25] {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--chat-widget-green);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.chat-widget-bubble:hover[b-1ute3tuf25] {
    background: var(--chat-widget-green-dark);
}

/* Small dark "Opens Chat" label that appears on hover, above the launcher button - matches the
   reference screenshot's tooltip. Pointer-events:none so it never itself intercepts the click
   meant for the button underneath it. */
.chat-widget-tooltip[b-1ute3tuf25] {
    position: absolute;
    bottom: 66px;
    right: 4px;
    background: #1f2430;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.chat-widget-launcher-wrap:hover .chat-widget-tooltip[b-1ute3tuf25] {
    opacity: 1;
    transform: translateY(0);
}

/* Red unread-count badge, top-right of the launcher button - only rendered by the markup when
   _unreadCount > 0 (see ChatWidget.razor's OnMessageReceived). */
.chat-widget-badge[b-1ute3tuf25] {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e5484d;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* ---- Teaser greeting card ---- */

.chat-widget-teaser[b-1ute3tuf25] {
    position: relative;
    width: 260px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 14px 16px;
    margin-bottom: 14px;
    margin-left: auto;
    cursor: pointer;
    animation: chat-widget-teaser-in-b-1ute3tuf25 0.2s ease-out;
}

@keyframes chat-widget-teaser-in-b-1ute3tuf25 {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-widget-teaser-close[b-1ute3tuf25] {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: #9aa0a8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.chat-widget-teaser-close:hover[b-1ute3tuf25] {
    color: #495057;
}

.chat-widget-teaser-text[b-1ute3tuf25] {
    font-size: 0.9rem;
    color: #212529;
    padding-right: 14px;
    margin-bottom: 10px;
}

.chat-widget-teaser-actions[b-1ute3tuf25] {
    display: flex;
    justify-content: flex-end;
}

.chat-widget-teaser-pill[b-1ute3tuf25] {
    display: inline-block;
    background: var(--chat-widget-green);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
}

/* ---- Open panel ---- */

.chat-widget-panel[b-1ute3tuf25] {
    width: 320px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

.chat-widget-header[b-1ute3tuf25] {
    background: var(--chat-widget-green);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-body[b-1ute3tuf25] {
    overflow-y: auto;
}

.chat-widget-messages[b-1ute3tuf25] {
    max-height: 320px;
    overflow-y: auto;
}

.chat-widget-message[b-1ute3tuf25] {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.chat-widget-message-label[b-1ute3tuf25] {
    font-size: 0.75rem;
    color: #6c757d;
}

.chat-widget-message-bubble[b-1ute3tuf25] {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-widget-message-mine[b-1ute3tuf25] {
    align-items: flex-end;
}

.chat-widget-message-mine .chat-widget-message-bubble[b-1ute3tuf25] {
    background: var(--chat-widget-green);
    color: #fff;
}

.chat-widget-message-agent[b-1ute3tuf25] {
    align-items: flex-start;
}

.chat-widget-message-agent .chat-widget-message-bubble[b-1ute3tuf25] {
    background: #f1f1f4;
    color: #212529;
}

/* ---- Customer feedback prompt (WP-CUS-150..154), added 2026-09-23 - see ChatWidget.razor's own
   header comment ("CUSTOMER FEEDBACK") and ChatFeedbackService.vb's doc comment. ---- */

.chat-widget-feedback[b-1ute3tuf25] {
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
}

.chat-widget-feedback-emojis[b-1ute3tuf25] {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.chat-widget-feedback-emoji[b-1ute3tuf25] {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.chat-widget-feedback-emoji:hover[b-1ute3tuf25] {
    transform: scale(1.08);
    background: #f1f3f5;
}

.chat-widget-feedback-emoji.selected[b-1ute3tuf25] {
    border-color: var(--chat-widget-green);
    background: #e8f8f0;
}

.chat-widget-feedback-emoji:disabled[b-1ute3tuf25] {
    opacity: 0.6;
    cursor: default;
}

.chat-widget-system[b-1ute3tuf25] {
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.chat-widget-footer[b-1ute3tuf25] {
    padding: 8px;
}

.chat-widget-footer form[b-1ute3tuf25] {
    display: flex;
}
