#ezc-widget-container,
#ezc-widget-container * {
    box-sizing: border-box;
}

#ezc-widget-container {
    position: fixed;
    bottom: var(--ezc-bottom);
    bottom: max(var(--ezc-bottom), 96px);
    width: 60px;
    height: 60px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Positioning rules */
#ezc-widget-container.ezc-right {
    right: var(--ezc-side);
    right: max(var(--ezc-side), 16px);
}
#ezc-widget-container.ezc-left {
    left: var(--ezc-side);
    left: max(var(--ezc-side), 16px);
}

/* Auto Popup Styling */
#ezc-auto-popup {
    position: absolute;
    bottom: 76px;
    background: var(--ezc-bg-dark, #111);
    color: var(--ezc-text-light, #fff);
    padding: 11px 14px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    white-space: normal;
    max-width: min(280px, calc(100vw - 36px));
    width: max-content;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    border: 1px solid rgba(255,255,255,0.14);
    border-bottom: 3px solid var(--ezc-primary, #FFE300);
    text-align: left;
    line-height: 1.35;
    transform: translateY(6px);
    z-index: 1000000;
}

#ezc-auto-popup::after {
    content: "";
    position: absolute;
    bottom: -8px;
    width: 14px;
    height: 14px;
    background: var(--ezc-bg-dark, #111);
    border-right: 1px solid rgba(255,255,255,0.14);
    border-bottom: 1px solid rgba(255,255,255,0.14);
    transform: rotate(45deg);
}

#ezc-auto-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#ezc-widget-container.ezc-right #ezc-auto-popup {
    right: 0 !important;
    left: auto !important;
}
#ezc-widget-container.ezc-right #ezc-auto-popup::after {
    right: 22px;
}

#ezc-widget-container.ezc-left #ezc-auto-popup {
    left: 0 !important;
    right: auto !important;
}
#ezc-widget-container.ezc-left #ezc-auto-popup::after {
    left: 22px;
}

/* Floating Trigger Button */
#ezc-trigger-btn {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--ezc-primary);
    color: var(--ezc-text-dark);
    border-radius: 50%;
    text-align: center;
    line-height: 60px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.38);
    transition: transform 0.2s, box-shadow 0.2s;
}
#ezc-trigger-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

#ezc-trigger-btn .ezc-trigger-thumbnail {
    display: inline-block;
    width: 42px;
    height: 42px;
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 50%;
    vertical-align: middle;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Main Window */
#ezc-window {
    display: none;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: min(560px, calc(100vh - 190px));
    min-height: 320px;
    max-height: calc(100vh - 190px);
    background: var(--ezc-panel-bg);
    border: 1px solid #333;
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(0,0,0,0.58);
    position: absolute;
    bottom: 78px;
    overflow: hidden;
    flex-direction: column;
}
#ezc-widget-container.ezc-right #ezc-window { right: 0; }
#ezc-widget-container.ezc-left #ezc-window { left: 0; }
#ezc-widget-container.ezc-open #ezc-window { display: flex; }

/* Header */
.ezc-header {
    background: var(--ezc-bg-dark);
    color: var(--ezc-primary);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 2px solid var(--ezc-primary);
}
.ezc-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
#ezc-reset-chat {
    color: var(--ezc-text-light);
    font-size: 12px;
    text-decoration: none;
    opacity: 0.78;
}
#ezc-reset-chat:hover {
    color: var(--ezc-primary);
    opacity: 1;
}
#ezc-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: var(--ezc-text-light);
}
#ezc-close:hover { color: var(--ezc-primary); }

/* Tabs */
.ezc-tabs {
    display: flex;
    background: var(--ezc-bg-dark);
}
.ezc-tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.ezc-tab-btn.active {
    color: var(--ezc-primary);
    border-bottom: 2px solid var(--ezc-primary);
    background: var(--ezc-panel-bg);
}

/* Chat Body */
.ezc-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--ezc-text-light);
}
.ezc-panel {
    display: none;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    padding: 15px;
}
.ezc-panel.active {
    display: flex;
}

/* Messages */
#ezc-chat-box {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 5px;
}
.ezc-msg {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    max-width: 88%;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.ezc-msg.system, .ezc-msg.ai {
    background: var(--ezc-msg-ai);
    color: var(--ezc-text-light);
    align-self: flex-start;
    margin-right: auto;
    border-left: 3px solid var(--ezc-primary);
}
.ezc-msg.user {
    background: var(--ezc-primary);
    color: var(--ezc-text-dark);
    align-self: flex-end;
    margin-left: auto;
    text-align: right;
    font-weight: 600;
}

/* Inputs */
.ezc-input-wrapper {
    display: flex;
    padding-top: 10px;
}
#ezc-input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    background: var(--ezc-bg-dark);
    color: var(--ezc-text-light);
    border: 1px solid #444;
    border-radius: 8px;
    outline: none;
}
#ezc-input:focus { border-color: var(--ezc-primary); }
#ezc-send {
    background: var(--ezc-primary);
    color: var(--ezc-text-dark);
    border: none;
    font-weight: bold;
    padding: 0 15px;
    margin-left: 8px;
    border-radius: 8px;
    cursor: pointer;
}
#ezc-send:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Links Tab */
.ezc-links-container p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}
.ezc-links-container .ezc-btn {
    display: block;
    text-align: center;
    padding: 14px;
    margin: 12px 0;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.ezc-btn.wa { background: #25D366; color: #fff; }
.ezc-btn.fb { background: #1877F2; color: #fff; }
.ezc-btn.email { background: #555555; color: #fff; }

/* Reviews Tab Styling */
#ezc-tab-reviews {
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

#ezc-reviews-content {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: block;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 15px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.ezc-master-rating {
    text-align: center;
    padding: 14px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 12px;
}
.ezc-master-rating h2 {
    font-size: 28px;
    margin: 0 0 5px 0;
    color: var(--ezc-text-light);
}
.ezc-master-rating p {
    margin: 0;
    font-size: 13px;
    color: #aaa;
}
.ezc-stars, .ezc-rev-stars {
    color: var(--ezc-primary);
    font-size: 16px;
}
.ezc-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible !important;
    padding-bottom: 18px;
}
.ezc-review-card {
    flex: 0 0 auto;
    background: #222;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--ezc-primary);
}
.ezc-rev-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--ezc-primary);
}
.ezc-rev-body {
    font-size: 13px;
    line-height: 1.45;
    color: #ccc;
    overflow-wrap: anywhere;
}


.ezc-review-warning {
    border-left-color: #ffcc00;
    background: rgba(255, 227, 0, 0.08);
}

/* Typing Indicator */
.ezc-typing-pulse {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 2px;
    animation: ezc-pulse 1.2s infinite;
}
@keyframes ezc-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

@media (max-width: 480px) {
    #ezc-widget-container {
        bottom: var(--ezc-bottom);
        bottom: max(var(--ezc-bottom), 88px);
    }

    #ezc-widget-container.ezc-right {
        right: 14px;
    }

    #ezc-widget-container.ezc-left {
        left: 14px;
    }

    #ezc-window {
        width: calc(100vw - 28px);
        height: min(540px, calc(100vh - 178px));
        max-height: calc(100vh - 178px);
    }

    #ezc-auto-popup {
        max-width: min(260px, calc(100vw - 36px));
        font-size: 13px;
    }
}



/* EZConnect 5.1.5 Hard Scroll Fix
   Keeps wheel/touch scrolling inside the open widget instead of letting the page behind it scroll. */
html.ezc-widget-open,
body.ezc-widget-open {
    overscroll-behavior: contain;
}

#ezc-widget-container {
    pointer-events: none;
}

#ezc-trigger-btn,
#ezc-auto-popup,
#ezc-window {
    pointer-events: auto;
}

#ezc-window {
    position: fixed !important;
    bottom: calc(max(var(--ezc-bottom), 96px) + 78px) !important;
    height: min(560px, calc(100dvh - (max(var(--ezc-bottom), 96px) + 108px))) !important;
    max-height: calc(100dvh - (max(var(--ezc-bottom), 96px) + 108px)) !important;
    min-height: 320px !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
}

#ezc-widget-container.ezc-right #ezc-window {
    right: max(var(--ezc-side), 16px) !important;
    left: auto !important;
}

#ezc-widget-container.ezc-left #ezc-window {
    left: max(var(--ezc-side), 16px) !important;
    right: auto !important;
}

#ezc-widget-container.ezc-open #ezc-window {
    display: flex !important;
}

#ezc-window .ezc-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
}

#ezc-window .ezc-panel.active {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#ezc-tab-reviews {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 0 !important;
}

#ezc-reviews-content {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: none;
    scrollbar-width: thin;
}

#ezc-chat-box {
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: none;
}

#ezc-tab-links {
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

@supports not (height: 100dvh) {
    #ezc-window {
        height: min(560px, calc(100vh - 204px)) !important;
        max-height: calc(100vh - 204px) !important;
    }
}

@media (max-width: 480px) {
    #ezc-window {
        bottom: calc(max(var(--ezc-bottom), 88px) + 74px) !important;
        height: min(540px, calc(100dvh - (max(var(--ezc-bottom), 88px) + 96px))) !important;
        max-height: calc(100dvh - (max(var(--ezc-bottom), 88px) + 96px)) !important;
    }
}

/* EZConnect 5.1.6 interaction + mobile polish */
#ezc-widget-container {
    pointer-events: auto !important;
}

#ezc-window,
#ezc-window * {
    pointer-events: auto;
}

#ezc-input {
    position: relative;
    z-index: 3;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: text;
    -webkit-user-select: text;
}

#ezc-send,
#ezc-reset-chat,
#ezc-close,
.ezc-tab-btn {
    position: relative;
    z-index: 3;
    touch-action: manipulation !important;
}

#ezc-chat-box,
#ezc-reviews-content,
#ezc-tab-links {
    touch-action: pan-y !important;
}

.ezc-clean-list {
    margin: 8px 0 8px 18px;
    padding: 0;
}

.ezc-clean-list li {
    margin: 5px 0;
    padding-left: 2px;
}

#ezc-auto-popup {
    display: block;
    z-index: 1000001;
}

@media (max-width: 640px) {
    #ezc-widget-container {
        bottom: max(var(--ezc-bottom), 86px) !important;
        width: 56px;
        height: 56px;
    }

    #ezc-trigger-btn {
        width: 56px;
        height: 56px;
        line-height: 56px;
        font-size: 26px;
    }

    #ezc-widget-container.ezc-right {
        right: max(var(--ezc-side), 12px) !important;
    }

    #ezc-widget-container.ezc-left {
        left: max(var(--ezc-side), 12px) !important;
    }

    #ezc-auto-popup {
        bottom: 68px !important;
        max-width: min(270px, calc(100vw - 28px)) !important;
        font-size: 13px;
        line-height: 1.3;
        padding: 10px 13px;
    }

    #ezc-window {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        bottom: calc(max(var(--ezc-bottom), 86px) + 66px) !important;
        height: min(560px, calc(100dvh - (max(var(--ezc-bottom), 86px) + 82px))) !important;
        max-height: calc(100dvh - (max(var(--ezc-bottom), 86px) + 82px)) !important;
        min-height: 330px !important;
    }

    #ezc-widget-container.ezc-right #ezc-window {
        right: 12px !important;
    }

    #ezc-widget-container.ezc-left #ezc-window {
        left: 12px !important;
    }

    .ezc-header {
        padding: 12px 14px;
    }

    .ezc-title {
        font-size: 15px;
        line-height: 1.25;
    }

    .ezc-tab-btn {
        padding: 11px 8px;
    }

    .ezc-msg {
        max-width: 92%;
        font-size: 14px;
    }
}

@supports not (height: 100dvh) {
    @media (max-width: 640px) {
        #ezc-window {
            height: min(560px, calc(100vh - (max(var(--ezc-bottom), 86px) + 82px))) !important;
            max-height: calc(100vh - (max(var(--ezc-bottom), 86px) + 82px)) !important;
        }
    }
}

/* EZConnect 5.1.7 click/focus fix
   Keeps the open widget above the bubble and prevents inside clicks from being treated as bubble/outside clicks. */
#ezc-window {
    z-index: 1000003 !important;
    pointer-events: auto !important;
}

#ezc-widget-container.ezc-open #ezc-trigger-btn {
    pointer-events: none !important;
}

#ezc-trigger-btn {
    z-index: 1000000;
}

#ezc-auto-popup {
    z-index: 1000001 !important;
}

#ezc-window input,
#ezc-window button,
#ezc-window a,
#ezc-window textarea,
#ezc-window select {
    pointer-events: auto !important;
}

#ezc-input,
#ezc-send {
    -webkit-tap-highlight-color: rgba(255, 227, 0, 0.22);
}

#ezc-input {
    cursor: text;
}

#ezc-send {
    cursor: pointer;
}

/* EZConnect 5.1.8 mobile keyboard fit
   When the phone keyboard opens, shrink the widget to the visible viewport so the chat input is not hidden. */
:root {
    --ezc-vv-top: 0px;
    --ezc-vv-height: 100dvh;
}

.ezc-input-wrapper {
    flex: 0 0 auto;
    min-height: 54px;
    background: var(--ezc-panel-bg);
    position: relative;
    z-index: 5;
}

html.ezc-mobile-keyboard-open,
body.ezc-mobile-keyboard-open {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
}

html.ezc-mobile-keyboard-open #ezc-window {
    top: calc(var(--ezc-vv-top, 0px) + 8px) !important;
    bottom: auto !important;
    height: calc(var(--ezc-vv-height, 100dvh) - 16px) !important;
    max-height: calc(var(--ezc-vv-height, 100dvh) - 16px) !important;
    min-height: 260px !important;
}

html.ezc-mobile-keyboard-open #ezc-widget-container.ezc-right #ezc-window {
    right: 8px !important;
    left: auto !important;
}

html.ezc-mobile-keyboard-open #ezc-widget-container.ezc-left #ezc-window {
    left: 8px !important;
    right: auto !important;
}

html.ezc-mobile-keyboard-open #ezc-window .ezc-header {
    padding-top: 10px;
    padding-bottom: 10px;
}

html.ezc-mobile-keyboard-open #ezc-window .ezc-tab-btn {
    padding-top: 9px;
    padding-bottom: 9px;
}

html.ezc-mobile-keyboard-open #ezc-tab-chat {
    padding-bottom: 10px !important;
}

html.ezc-mobile-keyboard-open #ezc-chat-box {
    padding-bottom: 8px !important;
}

html.ezc-mobile-keyboard-open #ezc-input {
    font-size: 16px;
}

@media (max-width: 640px) {
    html.ezc-mobile-keyboard-open #ezc-window {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }

    html.ezc-mobile-keyboard-open #ezc-auto-popup,
    html.ezc-mobile-keyboard-open #ezc-trigger-btn {
        display: none !important;
    }
}

/* EZConnect 5.1.9 reply cut-off insurance
   Let long AI messages grow naturally inside the scrollable chat box. */
#ezc-chat-box {
    display: flex !important;
    flex-direction: column !important;
}

#ezc-chat-box .ezc-msg {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
}

#ezc-chat-box .ezc-msg.ai,
#ezc-chat-box .ezc-msg.system {
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

/* EZConnect 5.1.12 dismiss, hide, and draggable bubble controls */
#ezc-widget-container.ezc-session-dismissed {
    display: none !important;
}

#ezc-bubble-tools {
    position: absolute;
    top: -10px;
    right: -8px;
    display: flex;
    gap: 4px;
    z-index: 1000002;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

#ezc-widget-container:hover #ezc-bubble-tools,
#ezc-widget-container:focus-within #ezc-bubble-tools,
#ezc-widget-container.ezc-open #ezc-bubble-tools {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#ezc-bubble-tools button,
#ezc-mini-restore {
    border: 1px solid rgba(255,255,255,0.18);
    background: var(--ezc-bg-dark, #111);
    color: var(--ezc-primary, #FFE300);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    cursor: pointer;
    font-weight: 900;
    font-family: inherit;
    line-height: 1;
    touch-action: manipulation;
}

#ezc-bubble-tools button {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    font-size: 16px;
}

#ezc-bubble-tools button:hover,
#ezc-mini-restore:hover {
    background: var(--ezc-primary, #FFE300);
    color: var(--ezc-text-dark, #000);
}

#ezc-trigger-btn {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#ezc-widget-container.ezc-dragging #ezc-trigger-btn {
    cursor: grabbing;
    transform: scale(1.04);
}

#ezc-widget-container.ezc-custom-position {
    right: auto !important;
    bottom: auto !important;
}

#ezc-widget-container.ezc-minimized #ezc-trigger-btn,
#ezc-widget-container.ezc-minimized #ezc-auto-popup,
#ezc-widget-container.ezc-minimized #ezc-window,
#ezc-widget-container.ezc-minimized #ezc-bubble-tools {
    display: none !important;
}

#ezc-mini-restore {
    display: none;
    position: fixed;
    width: 34px;
    height: 58px;
    border-radius: 12px 0 0 12px;
    right: 0;
    bottom: max(var(--ezc-bottom), 96px);
    font-size: 24px;
    z-index: 1000003;
    padding: 0;
}

#ezc-widget-container.ezc-left #ezc-mini-restore {
    left: 0;
    right: auto;
    border-radius: 0 12px 12px 0;
    transform: rotate(180deg);
}

#ezc-widget-container.ezc-minimized #ezc-mini-restore {
    display: block !important;
}

#ezc-header-hide,
#ezc-header-session-close {
    color: var(--ezc-text-light);
    font-size: 12px;
    text-decoration: none;
    opacity: 0.78;
    white-space: nowrap;
}

#ezc-header-hide:hover,
#ezc-header-session-close:hover {
    color: var(--ezc-primary);
    opacity: 1;
}

#ezc-header-session-close {
    max-width: 96px;
}

@media (max-width: 480px) {
    #ezc-bubble-tools {
        opacity: 1;
        pointer-events: auto;
        top: -8px;
        right: -6px;
    }

    #ezc-bubble-tools button {
        width: 28px;
        height: 28px;
        font-size: 17px;
    }

    #ezc-header-session-close {
        display: none;
    }

    #ezc-header-hide {
        font-size: 12px;
    }

    #ezc-mini-restore {
        bottom: max(var(--ezc-bottom), 88px);
    }
}

/* EZConnect 5.2.1 site-wide Internal Otto */
#ezc-widget-container.ezc-internal-mode #ezc-trigger-btn {
    background: var(--ezc-primary);
    color: var(--ezc-text-dark);
}

.ezc-employee-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--ezc-primary);
    color: var(--ezc-text-dark);
    font-size: 11px;
    line-height: 1.2;
    vertical-align: middle;
}

.ezc-internal-active-mode {
    flex: 0 0 auto;
    margin: 0 0 4px;
    padding: 7px 10px;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    background: #151515;
    color: #bdbdbd;
    font-size: 11px;
    line-height: 1.3;
}

.ezc-internal-active-mode strong {
    color: var(--ezc-primary);
}

.ezc-internal-tools-panel {
    padding: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

.ezc-internal-tools-content {
    padding: 16px;
    color: var(--ezc-text-light);
}

.ezc-internal-signed-in {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-left: 3px solid var(--ezc-primary);
    border-radius: 8px;
    background: #252525;
    font-size: 13px;
}

.ezc-internal-tool-label {
    display: block;
    margin: 16px 0 7px;
    color: #d6d6d6;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ezc-internal-location-select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background: var(--ezc-bg-dark);
    color: var(--ezc-text-light);
    font: inherit;
}

.ezc-internal-location-select:focus {
    border-color: var(--ezc-primary);
    outline: none;
}

.ezc-internal-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ezc-internal-action {
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #454545;
    border-radius: 8px;
    background: #252525;
    color: #f3f3f3;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.ezc-internal-action:hover,
.ezc-internal-action.active {
    border-color: var(--ezc-primary);
    background: var(--ezc-primary);
    color: var(--ezc-text-dark);
}

.ezc-internal-tools-note {
    margin: 18px 0 0;
    color: #aaa;
    font-size: 12px;
    line-height: 1.5;
}

.ezc-msg.ezc-internal-answer {
    max-width: 96%;
}

.ezc-reference-media {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.ezc-reference-figure {
    margin: 0;
    padding: 7px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(0,0,0,0.16);
}

.ezc-reference-image {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

.ezc-reference-caption {
    margin-top: 6px;
    color: #bbb;
    font-size: 10px;
    line-height: 1.35;
}

.ezc-numbered-list {
    list-style: decimal;
}

.ezc-internal-answer-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.ezc-internal-answer-tools button {
    padding: 5px 8px;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    background: #171717;
    color: #ddd;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.ezc-internal-answer-tools button:hover,
.ezc-internal-answer-tools button.active {
    border-color: var(--ezc-primary);
    color: var(--ezc-primary);
}

.ezc-internal-tool-status {
    flex: 1 1 100%;
    min-height: 14px;
    color: #aaa;
    font-size: 10px;
}

@media (max-width: 480px) {
    .ezc-employee-chip {
        display: block;
        width: fit-content;
        margin: 4px 0 0;
    }

    .ezc-internal-quick-actions {
        grid-template-columns: 1fr;
    }

    .ezc-internal-action {
        min-height: 40px;
    }
}


/* Internal Otto starter prompts */
.ezc-internal-starters {
    display: flex;
    gap: 6px;
    padding: 0 12px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.ezc-internal-starter {
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: #fff;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 11px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}
.ezc-internal-starter:hover,
.ezc-internal-starter:focus {
    border-color: var(--ezc-primary);
    background: rgba(255,227,0,.12);
    outline: none;
}


/* ===== 5.3.14 layout + mode detection refresh ===== */
#ezc-window {
    width: min(420px, calc(100vw - 32px));
    height: min(620px, calc(100dvh - 150px)) !important;
    max-height: calc(100dvh - 150px) !important;
}

@media (min-width: 681px) {
    #ezc-window {
        resize: both;
        min-width: 360px;
        max-width: min(920px, calc(100vw - 24px));
        min-height: 420px;
        max-height: calc(100dvh - 24px) !important;
    }
    #ezc-window.ezc-window-expanded {
        width: min(920px, calc(100vw - 24px)) !important;
        height: calc(100dvh - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
        top: 12px !important;
        bottom: auto !important;
        left: auto !important;
        right: max(var(--ezc-side), 16px) !important;
    }
}

.ezc-window-resize {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.55;
    background:
      linear-gradient(135deg, transparent 0 55%, rgba(255,227,0,0.9) 56% 60%, transparent 61% 100%),
      linear-gradient(135deg, transparent 0 70%, rgba(255,255,255,0.7) 71% 75%, transparent 76% 100%),
      linear-gradient(135deg, transparent 0 85%, rgba(255,255,255,0.5) 86% 90%, transparent 91% 100%);
}

.ezc-header {
    padding: 12px 14px;
    gap: 12px;
}
.ezc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.2;
}
.ezc-title::before {
    content: "🧠";
    font-size: 18px;
}
.ezc-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.ezc-header-actions a,
#ezc-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #f2f2f2;
    text-decoration: none;
    font-size: 12px;
    opacity: 0.92;
}
#ezc-close {
    min-width: 28px;
    padding: 0;
    font-size: 20px;
}
.ezc-header-actions a:hover,
#ezc-close:hover {
    background: rgba(255,227,0,0.12);
    border-color: rgba(255,227,0,0.28);
}

.ezc-tab-btn {
    position: relative;
    padding: 13px 12px;
}
.ezc-tab-btn[data-tab="chat"]::before { content: "💬 "; }
.ezc-tab-btn[data-tab="tools"]::before { content: "🧰 "; }
.ezc-tab-btn[data-tab="reviews"]::before { content: "⭐ "; }
.ezc-tab-btn[data-tab="links"]::before { content: "🔗 "; }

#ezc-chat-box {
    padding-right: 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ezc-msg {
    max-width: 94%;
    margin-bottom: 0;
    padding: 12px 13px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
}
.ezc-msg-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
}
.ezc-msg-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    font-size: 12px;
}
.ezc-msg-content {
    font-size: 14px;
    line-height: 1.55;
}
.ezc-msg.user .ezc-msg-meta,
.ezc-msg.user .ezc-msg-content {
    color: #161616;
}
.ezc-msg.user .ezc-msg-icon {
    background: rgba(0,0,0,0.08);
}
.ezc-msg.ai,
.ezc-msg.system {
    background: linear-gradient(180deg, rgba(46,46,46,0.98), rgba(32,32,32,0.98));
}
.ezc-msg.user {
    background: linear-gradient(180deg, rgba(255,227,0,1), rgba(240,211,0,1));
}

.ezc-internal-active-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,227,0,0.08);
    border: 1px solid rgba(255,227,0,0.2);
}
.ezc-mode-kicker {
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cfcfcf;
}
#ezc-internal-mode-label {
    font-size: 13px;
    line-height: 1.3;
}
.ezc-mode-source {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.ezc-internal-active-mode.is-manual .ezc-mode-source {
    background: rgba(255,227,0,0.18);
    color: #ffe300;
}

.ezc-internal-starters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 2px;
    overflow: visible;
}
.ezc-internal-starter,
.ezc-internal-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: #fff;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.ezc-internal-starter:hover,
.ezc-internal-action:hover {
    transform: translateY(-1px);
    border-color: rgba(255,227,0,0.4);
    background: rgba(255,227,0,0.08);
}
.ezc-internal-action.active {
    background: rgba(255,227,0,0.14);
    border-color: rgba(255,227,0,0.45);
    color: #ffe300;
}
.ezc-internal-action[data-action="answer"]::before { content: "💡"; }
.ezc-internal-action[data-action="steps"]::before,
.ezc-internal-starter[data-action="steps"]::before,
.ezc-internal-starter[data-action="qc_review"]::before { content: "🧭"; }
.ezc-internal-action[data-action="documents"]::before { content: "📄"; }
.ezc-internal-action[data-action="fees"]::before { content: "💵"; }
.ezc-internal-action[data-action="customer_response"]::before,
.ezc-internal-starter[data-action="customer_response"]::before { content: "✍️"; }
.ezc-internal-action[data-action="manager_review"]::before { content: "🛡️"; }
.ezc-internal-starter[data-action="qc_buddy"]::before { content: "🤝"; }
.ezc-internal-starter[data-action="qc_mvd"]::before { content: "🚨"; }
.ezc-internal-starter[data-action="qc_other"]::before { content: "🧩"; }
.ezc-internal-starter[data-action="qc_accuracy"]::before { content: "🎯"; }

.ezc-input-wrapper {
    gap: 8px;
    align-items: stretch;
}
#ezc-input {
    min-height: 54px;
    border-radius: 12px;
}
#ezc-send {
    min-width: 96px;
    border-radius: 12px;
}

.ezc-reference-media {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.ezc-reference-caption {
    font-size: 11px;
}
.ezc-internal-answer-tools button {
    border-radius: 999px;
}

@media (max-width: 680px) {
    .ezc-header-actions a,
    #ezc-close {
        font-size: 11px;
        min-height: 26px;
        padding: 0 8px;
    }
    .ezc-mode-source {
        margin-left: 0;
    }
    .ezc-internal-starters,
    .ezc-internal-quick-actions {
        gap: 6px;
    }
    .ezc-internal-starter,
    .ezc-internal-action {
        font-size: 11px;
    }
    #ezc-window {
        resize: none;
    }
}

/* ===== 5.3.15 Internal Otto polish: resize grip, readable answers, modern scroll ===== */
#ezc-window {
    resize: none !important;
}

/* Expand is the primary window control. */
#ezc-header-expand {
    background: var(--ezc-primary) !important;
    color: #111 !important;
    border-color: var(--ezc-primary) !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 10px rgba(255, 227, 0, 0.22);
}
#ezc-header-expand::before {
    content: "⤢";
    margin-right: 5px;
    font-size: 14px;
    line-height: 1;
}
#ezc-header-expand:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

/* The resize grip belongs with Otto, not stranded in the lower corner. */
.ezc-window-resize,
#ezc-window-resize {
    display: none !important;
}
.ezc-window-resize-handle {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    margin-left: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 227, 0, 0.36);
    background: rgba(255, 227, 0, 0.10);
    color: var(--ezc-primary);
    font-size: 12px;
    font-weight: 800;
    cursor: nwse-resize;
    user-select: none;
    touch-action: none;
}
.ezc-window-resize-handle:hover,
#ezc-window.ezc-resizing .ezc-window-resize-handle {
    background: rgba(255, 227, 0, 0.22);
    border-color: var(--ezc-primary);
}
body.ezc-resizing-chat {
    cursor: nwse-resize !important;
    user-select: none !important;
}

/* Keep the header compact and readable even at the minimum window width. */
.ezc-header {
    align-items: flex-start;
}
.ezc-title {
    flex: 1 1 135px;
    min-width: 120px;
}
.ezc-header-actions {
    flex: 0 1 auto;
    gap: 5px;
}
#ezc-reset-chat,
#ezc-header-hide,
#ezc-header-session-close,
#ezc-header-expand {
    white-space: nowrap;
}

/* Cleaner answer typography. Markdown characters should never be visible furniture. */
.ezc-msg-content {
    line-height: 1.58;
}
.ezc-chat-heading {
    margin: 4px 0 10px;
    color: var(--ezc-primary);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
}
.ezc-chat-subheading {
    margin: 12px 0 6px;
    color: #f5f5f5;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 800;
}
.ezc-chat-paragraph {
    margin: 0 0 9px;
}
.ezc-chat-paragraph:last-child {
    margin-bottom: 0;
}
.ezc-clean-list {
    margin: 5px 0 11px 20px;
    padding: 0;
}
.ezc-clean-list li {
    margin: 0 0 7px;
    padding-left: 3px;
}
.ezc-clean-list li::marker {
    color: var(--ezc-primary);
    font-weight: 800;
}
.ezc-inline-code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(255,255,255,0.08);
    color: #fff2a6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}
.ezc-msg.user {
    text-align: left;
}

/* Reference screenshots should be visually obvious and usable. */
.ezc-reference-media {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 14px 0 4px;
}
.ezc-reference-figure {
    overflow: hidden;
    padding: 8px;
    border: 1px solid rgba(255,227,0,0.28);
    border-radius: 10px;
    background: #161616;
}
.ezc-reference-image {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    background: #fff;
    border-radius: 7px;
    cursor: zoom-in;
}
.ezc-reference-figure.is-zoomed .ezc-reference-image {
    max-height: none;
    cursor: zoom-out;
}
.ezc-reference-caption {
    margin: 7px 2px 1px;
    color: #d3d3d3;
    font-size: 11px;
    line-height: 1.4;
}

/* Modern, narrow scrollbars inside Otto without changing page scrollbars. */
#ezc-chat-box,
#ezc-reviews-content,
.ezc-internal-tools-content,
#ezc-tab-links {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,227,0,0.52) rgba(255,255,255,0.035);
    scrollbar-gutter: stable;
}
#ezc-chat-box::-webkit-scrollbar,
#ezc-reviews-content::-webkit-scrollbar,
.ezc-internal-tools-content::-webkit-scrollbar,
#ezc-tab-links::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}
#ezc-chat-box::-webkit-scrollbar-track,
#ezc-reviews-content::-webkit-scrollbar-track,
.ezc-internal-tools-content::-webkit-scrollbar-track,
#ezc-tab-links::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.035);
    border-radius: 999px;
}
#ezc-chat-box::-webkit-scrollbar-thumb,
#ezc-reviews-content::-webkit-scrollbar-thumb,
.ezc-internal-tools-content::-webkit-scrollbar-thumb,
#ezc-tab-links::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255,227,0,0.78), rgba(255,227,0,0.38));
    border: 2px solid #1a1a1a;
    border-radius: 999px;
}
#ezc-chat-box::-webkit-scrollbar-thumb:hover,
#ezc-reviews-content::-webkit-scrollbar-thumb:hover,
.ezc-internal-tools-content::-webkit-scrollbar-thumb:hover,
#ezc-tab-links::-webkit-scrollbar-thumb:hover {
    background: var(--ezc-primary);
}

@media (max-width: 680px) {
    .ezc-header {
        padding: 10px 11px;
    }
    .ezc-header-actions {
        justify-content: flex-end;
    }
    #ezc-header-session-close {
        max-width: 76px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
.ezc-reference-image-error {
    padding: 10px 11px;
    border-radius: 7px;
    background: rgba(255, 190, 0, 0.10);
    border: 1px solid rgba(255, 190, 0, 0.24);
    color: #f4d98a;
    font-size: 12px;
    line-height: 1.45;
}


/* 5.3.16 resilient reference-image loading */
.ezc-media-retry-block {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 13px 0 4px;
    padding: 10px 12px;
    border: 1px solid rgba(255,227,0,0.24);
    border-radius: 9px;
    background: rgba(255,227,0,0.055);
    color: #e7e7e7;
    font-size: 12px;
    line-height: 1.4;
}
.ezc-media-retry-block.is-error {
    border-color: rgba(255,190,0,0.22);
    background: rgba(255,190,0,0.07);
}
.ezc-media-retry-spinner {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,227,0,0.22);
    border-top-color: var(--ezc-primary);
    border-radius: 50%;
    animation: ezc-media-spin .8s linear infinite;
}
@keyframes ezc-media-spin { to { transform: rotate(360deg); } }
.ezc-media-retry-text { flex: 1 1 auto; }
.ezc-media-retry-button {
    flex: 0 0 auto;
    border: 1px solid rgba(255,227,0,0.35);
    border-radius: 999px;
    background: rgba(255,227,0,0.12);
    color: var(--ezc-primary);
    padding: 5px 9px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.ezc-media-retry-button:hover { background: rgba(255,227,0,0.2); }
.ezc-reference-image-failed { display: none; }


/* 5.3.17: resize state failsafe. The handle owns the resize cursor; the whole
   page no longer gets a forced cursor through every descendant. */
body.ezc-resizing-chat {
    cursor: nwse-resize !important;
    user-select: none !important;
}
body.ezc-resizing-chat *:not(input):not(textarea):not(button):not(a) {
    user-select: none !important;
}
#ezc-window-resize-handle {
    cursor: nwse-resize !important;
}

/* ===== 5.3.20 EZ Chat ===== */
.ezc-tab-btn[data-tab="ezchat"]::before { content: "💬 "; }
.ezc-tab-btn[data-tab="tools"]::before { content: none; }
.ezc-tab-unread {
    display:inline-flex; min-width:18px; height:18px; align-items:center; justify-content:center;
    margin-left:5px; padding:0 5px; border-radius:999px; background:var(--ezc-primary); color:#111;
    font-size:10px; font-weight:800;
}
.ezc-tab-unread[hidden] { display:none !important; }
.ezc-notification-toggle {
    border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); color:#fff;
    width:30px; height:30px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center;
    cursor:pointer; font-size:14px;
}
.ezc-notification-toggle.active { border-color:rgba(255,227,0,.48); background:rgba(255,227,0,.12); }

#ezc-tab-ezchat { padding:0 !important; overflow:hidden !important; }
.ezc-ezchat-panel { position:relative; }
.ezc-ezchat-shell { display:flex; flex:1 1 auto; min-height:0; height:100%; overflow:hidden; background:#151515; }
.ezc-ezchat-sidebar {
    width:230px; flex:0 0 230px; min-height:0; display:flex; flex-direction:column; gap:8px;
    padding:12px; border-right:1px solid rgba(255,255,255,.09); background:#111; overflow:hidden;
}
.ezc-ezchat-sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#fff; }
.ezc-ezchat-sidebar-head strong { color:var(--ezc-primary); font-size:14px; }
#ezc-ezchat-new-group {
    border:1px solid rgba(255,227,0,.28); color:var(--ezc-primary); background:rgba(255,227,0,.08);
    border-radius:999px; padding:5px 9px; cursor:pointer; font-size:11px; font-weight:700;
}
#ezc-ezchat-search {
    width:100%; border:1px solid #3a3a3a; background:#1d1d1d; color:#fff; border-radius:9px; padding:9px 10px; outline:none;
}
#ezc-ezchat-search:focus { border-color:var(--ezc-primary); }
.ezc-ezchat-section-label { color:#8f8f8f; font-size:10px; text-transform:uppercase; letter-spacing:.09em; font-weight:800; margin-top:3px; }
.ezc-ezchat-list { min-height:0; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#6f6500 #191919; }
#ezc-ezchat-conversations { flex:1 1 auto; }
#ezc-ezchat-people { flex:0 1 38%; }
.ezc-ezchat-list-item {
    width:100%; display:flex; align-items:center; gap:8px; padding:8px; margin:0 0 4px;
    border:1px solid transparent; border-radius:9px; background:transparent; color:#fff; text-align:left; cursor:pointer;
}
.ezc-ezchat-list-item:hover { background:rgba(255,255,255,.055); }
.ezc-ezchat-list-item.active { background:rgba(255,227,0,.09); border-color:rgba(255,227,0,.25); }
.ezc-ezchat-avatar { width:28px; height:28px; flex:0 0 28px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#2a2a2a; }
.ezc-ezchat-list-text { min-width:0; flex:1; display:flex; flex-direction:column; }
.ezc-ezchat-list-text strong { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ezc-ezchat-list-text small { color:#aaa; font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; }
.ezc-ezchat-unread { min-width:20px; height:20px; padding:0 5px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:var(--ezc-primary); color:#111; font-size:10px; font-weight:900; }
.ezc-ezchat-empty { color:#969696; font-size:12px; line-height:1.45; padding:12px 8px; }

.ezc-ezchat-main { flex:1 1 auto; min-width:0; min-height:0; display:flex; flex-direction:column; }
.ezc-ezchat-chat-header { flex:0 0 auto; padding:11px 14px; border-bottom:1px solid rgba(255,255,255,.09); background:#181818; color:#fff; }
.ezc-ezchat-chat-header div { display:flex; flex-direction:column; gap:2px; }
.ezc-ezchat-chat-header strong { font-size:14px; color:var(--ezc-primary); }
.ezc-ezchat-chat-header small { color:#999; font-size:10px; }
.ezc-ezchat-referral { margin:8px 12px 0; padding:8px 10px; border:1px solid rgba(255,227,0,.25); border-radius:8px; background:rgba(255,227,0,.08); color:#eee; font-size:11px; }
.ezc-ezchat-referral[hidden] { display:none; }
.ezc-ezchat-messages { flex:1 1 auto; min-height:0; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; scrollbar-width:thin; scrollbar-color:#7a6e00 #161616; }
.ezc-ezchat-message { align-self:flex-start; max-width:82%; padding:9px 11px; border-radius:12px 12px 12px 4px; background:#292929; color:#f5f5f5; border:1px solid rgba(255,255,255,.07); }
.ezc-ezchat-message.mine { align-self:flex-end; border-radius:12px 12px 4px 12px; background:var(--ezc-primary); color:#111; border-color:transparent; }
.ezc-ezchat-message-meta { font-size:9px; text-transform:uppercase; letter-spacing:.05em; font-weight:800; opacity:.68; margin-bottom:5px; }
.ezc-ezchat-message-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.45; }
.ezc-ezchat-message-attachments { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }
.ezc-ezchat-image-link { display:block; max-width:220px; border-radius:8px; overflow:hidden; background:#fff; }
.ezc-ezchat-image-link img { display:block; max-width:100%; max-height:180px; object-fit:contain; }
.ezc-ezchat-file-link { display:inline-flex; padding:6px 8px; border-radius:8px; background:rgba(0,0,0,.16); color:inherit; text-decoration:none; font-size:11px; }
.ezc-ezchat-attachment-preview { flex:0 0 auto; display:flex; gap:6px; flex-wrap:wrap; padding:0 12px; }
.ezc-ezchat-file-chip { display:inline-flex; align-items:center; gap:5px; background:#282828; border:1px solid #3c3c3c; color:#eee; border-radius:999px; padding:4px 7px; font-size:10px; }
.ezc-ezchat-file-chip button { border:0; background:transparent; color:#ddd; cursor:pointer; padding:0; }
.ezc-ezchat-composer { flex:0 0 auto; display:flex; align-items:flex-end; gap:7px; padding:10px 12px 12px; border-top:1px solid rgba(255,255,255,.08); background:#181818; }
.ezc-ezchat-attach { width:38px; height:38px; flex:0 0 38px; border:1px solid #3b3b3b; border-radius:10px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:#202020; }
#ezc-ezchat-input { flex:1; min-width:0; resize:none; min-height:40px; max-height:110px; background:#111; color:#fff; border:1px solid #3c3c3c; border-radius:10px; padding:9px 10px; outline:none; font-family:inherit; font-size:12px; }
#ezc-ezchat-input:focus { border-color:var(--ezc-primary); }
#ezc-ezchat-send,.ezc-primary-action { border:0; background:var(--ezc-primary); color:#111; font-weight:800; border-radius:10px; padding:0 14px; min-height:40px; cursor:pointer; }
#ezc-ezchat-send:disabled { opacity:.5; cursor:not-allowed; }
.ezc-ezchat-modal { position:absolute; inset:0; z-index:15; background:rgba(0,0,0,.72); display:flex; align-items:center; justify-content:center; padding:16px; }
.ezc-ezchat-modal[hidden] { display:none; }
.ezc-ezchat-modal-card { width:min(430px,100%); max-height:90%; overflow:auto; background:#1d1d1d; border:1px solid #444; border-radius:13px; padding:14px; color:#fff; box-shadow:0 20px 50px rgba(0,0,0,.6); }
.ezc-ezchat-modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.ezc-ezchat-modal-head strong { color:var(--ezc-primary); }
.ezc-ezchat-modal-head button { border:0; background:transparent; color:#fff; font-size:22px; cursor:pointer; }
.ezc-ezchat-modal-card > label { display:flex; flex-direction:column; gap:5px; font-size:11px; color:#bbb; }
.ezc-ezchat-modal-card > label input { background:#111; border:1px solid #3c3c3c; color:#fff; border-radius:8px; padding:9px; }
.ezc-ezchat-member-picker { max-height:240px; overflow:auto; margin:8px 0 12px; border:1px solid #333; border-radius:8px; }
.ezc-ezchat-member-option { display:flex; gap:8px; align-items:center; padding:8px 10px; border-bottom:1px solid #2e2e2e; font-size:11px; cursor:pointer; }
.ezc-ezchat-member-option:last-child { border-bottom:0; }
.ezc-ezchat-member-option:hover { background:#252525; }
.ezc-refer-ezchat { border-color:rgba(255,227,0,.35)!important; color:var(--ezc-primary)!important; }
.ezc-media-availability-note { margin-top:10px; padding:8px 10px; border-radius:8px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.09); color:#aaa; font-size:11px; }
.ezc-media-retry-block.is-info { border-color:rgba(255,255,255,.12); background:rgba(255,255,255,.04); }

#ezc-ezchat-messages::-webkit-scrollbar,.ezc-ezchat-list::-webkit-scrollbar { width:8px; }
#ezc-ezchat-messages::-webkit-scrollbar-track,.ezc-ezchat-list::-webkit-scrollbar-track { background:#161616; border-radius:999px; }
#ezc-ezchat-messages::-webkit-scrollbar-thumb,.ezc-ezchat-list::-webkit-scrollbar-thumb { background:linear-gradient(#8e8100,#5c5500); border-radius:999px; border:2px solid #161616; }

@media (max-width:680px) {
    .ezc-ezchat-shell { flex-direction:column; }
    .ezc-ezchat-sidebar { width:100%; flex:0 0 178px; border-right:0; border-bottom:1px solid rgba(255,255,255,.09); padding:8px; }
    #ezc-ezchat-people { display:none; }
    .ezc-ezchat-section-label:nth-of-type(2) { display:none; }
    .ezc-ezchat-list-item { padding:6px; }
    .ezc-ezchat-message { max-width:92%; }
}


/* ===== 5.3.21 EZ Chat roster + alert feedback ===== */
.ezc-title { position:relative; }
.ezc-alert-toast {
    position:absolute; top:calc(100% + 8px); left:0; z-index:10020;
    min-width:240px; max-width:min(420px, 78vw); padding:9px 11px;
    border-radius:9px; border:1px solid rgba(255,227,0,.35);
    background:#202020; color:#fff; box-shadow:0 10px 28px rgba(0,0,0,.38);
    font-size:11px; line-height:1.4; font-weight:600; text-transform:none; letter-spacing:0;
}
.ezc-alert-toast[hidden] { display:none !important; }
.ezc-alert-toast.success { border-color:rgba(78,203,113,.5); }
.ezc-alert-toast.warning { border-color:rgba(255,190,60,.55); }
.ezc-alert-toast.error { border-color:rgba(255,90,90,.55); }
.ezc-notification-toggle { transition:background .16s ease,border-color .16s ease,transform .16s ease; }
.ezc-notification-toggle:hover { transform:scale(1.06); border-color:rgba(255,227,0,.55); }


/* ===== 5.3.22 EZ Chat delete + Otto referral clarity ===== */
.ezc-ezchat-chat-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.ezc-ezchat-chat-heading { min-width:0; }
.ezc-ezchat-delete-chat {
    flex:0 0 auto;
    border:1px solid rgba(255,90,90,.32);
    background:rgba(170,25,25,.12);
    color:#ffb8b8;
    border-radius:999px;
    padding:6px 9px;
    font-size:10px;
    font-weight:700;
    cursor:pointer;
}
.ezc-ezchat-delete-chat:hover { background:rgba(190,35,35,.22); border-color:rgba(255,90,90,.55); }
.ezc-ezchat-delete-chat[hidden] { display:none !important; }

.ezc-ezchat-referral {
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:10px 12px;
}
.ezc-ezchat-referral-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ezc-ezchat-referral-head strong { color:var(--ezc-primary); font-size:12px; }
.ezc-ezchat-referral-cancel {
    width:25px; height:25px; border-radius:50%; border:1px solid rgba(255,255,255,.14);
    background:#242424; color:#fff; cursor:pointer; font-size:16px; line-height:1;
}
.ezc-ezchat-referral-help { color:#bbb; font-size:10px; line-height:1.4; }
.ezc-ezchat-referral-preview { border:1px solid rgba(255,255,255,.1); border-radius:8px; background:rgba(0,0,0,.14); }
.ezc-ezchat-referral-preview summary { cursor:pointer; padding:7px 9px; color:#eee; font-size:10px; font-weight:700; }
.ezc-ezchat-referral-preview-row { display:grid; grid-template-columns:82px 1fr; gap:8px; padding:6px 9px; border-top:1px solid rgba(255,255,255,.07); font-size:10px; line-height:1.45; }
.ezc-ezchat-referral-preview-row strong { color:#aaa; }
.ezc-ezchat-referral-preview-row span { color:#eee; white-space:pre-wrap; max-height:140px; overflow:auto; }
.ezc-ezchat-referral-send {
    align-self:flex-start; border:0; background:var(--ezc-primary); color:#111; border-radius:9px;
    min-height:34px; padding:0 11px; font-size:10px; font-weight:800; cursor:pointer;
}
.ezc-ezchat-referral-send:disabled { opacity:.45; cursor:not-allowed; }

.ezc-ezchat-message-referral {
    margin:0 0 8px; padding:8px; border-radius:8px; border:1px solid rgba(255,227,0,.28);
    background:rgba(255,227,0,.07); color:inherit;
}
.ezc-ezchat-message.mine .ezc-ezchat-message-referral { background:rgba(0,0,0,.08); border-color:rgba(0,0,0,.18); }
.ezc-ezchat-message-referral-title { font-size:10px; font-weight:900; margin-bottom:6px; }
.ezc-ezchat-message-referral-row { display:grid; grid-template-columns:58px 1fr; gap:6px; font-size:10px; line-height:1.4; }
.ezc-ezchat-message-referral-row strong { opacity:.72; }
.ezc-ezchat-message-referral-answer { margin-top:6px; font-size:10px; }
.ezc-ezchat-message-referral-answer summary { cursor:pointer; font-weight:800; }
.ezc-ezchat-message-referral-answer > div { margin-top:5px; white-space:pre-wrap; max-height:180px; overflow:auto; line-height:1.45; }

@media (max-width:680px) {
    .ezc-ezchat-chat-header { align-items:flex-start; }
    .ezc-ezchat-delete-chat { padding:5px 7px; }
    .ezc-ezchat-referral-preview-row { grid-template-columns:1fr; }
}


/* ===== 5.3.26 EZ Chat typing/read receipts + ADOT browser hardening ===== */
/* Visuals are intentionally self-contained: system fonts, CSS shapes, and native emoji only. */
#ezc-widget-container,
#ezc-widget-container * {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}
#ezc-widget-container button,
#ezc-widget-container input,
#ezc-widget-container textarea,
#ezc-widget-container select {
    font: inherit;
}
#ezc-window {
    color-scheme: dark;
    width: 420px;
    max-width: calc(100vw - 24px);
    height: 620px !important;
    max-height: calc(100vh - 24px) !important;
}
@supports (height: 100dvh) {
    #ezc-window { max-height: calc(100dvh - 24px) !important; }
}
@media (max-width:680px) {
    #ezc-window { width: calc(100vw - 16px); max-width: calc(100vw - 16px); height: calc(100vh - 16px) !important; max-height: calc(100vh - 16px) !important; }
}

/* Never create a horizontal scrollbar for action chips on locked-down/older browsers. */
#ezc-widget-container .ezc-internal-starters {
    display:flex !important;
    flex-wrap:wrap !important;
    overflow-x:hidden !important;
    overflow-y:visible !important;
    white-space:normal !important;
    max-width:100%;
}
#ezc-widget-container .ezc-internal-starter {
    flex:0 1 auto !important;
    white-space:normal !important;
    min-width:0;
}
#ezc-widget-container .ezc-internal-quick-actions,
#ezc-widget-container .ezc-panel,
#ezc-widget-container .ezc-body,
#ezc-widget-container #ezc-tab-chat {
    overflow-x:hidden !important;
}

/* Dark/native fallback first; modern engines get the slim branded thumb below. */
#ezc-chat-box,
#ezc-reviews-content,
.ezc-internal-tools-content,
#ezc-tab-links,
.ezc-ezchat-messages,
.ezc-ezchat-list,
.ezc-ezchat-member-picker,
.ezc-ezchat-modal-card,
.ezc-ezchat-message-referral-answer > div,
.ezc-ezchat-referral-preview-row span {
    color-scheme: dark;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,227,0,.62) #1a1a1a;
}
#ezc-chat-box::-webkit-scrollbar,
#ezc-reviews-content::-webkit-scrollbar,
.ezc-internal-tools-content::-webkit-scrollbar,
#ezc-tab-links::-webkit-scrollbar,
.ezc-ezchat-messages::-webkit-scrollbar,
.ezc-ezchat-list::-webkit-scrollbar,
.ezc-ezchat-member-picker::-webkit-scrollbar,
.ezc-ezchat-modal-card::-webkit-scrollbar,
.ezc-ezchat-message-referral-answer > div::-webkit-scrollbar,
.ezc-ezchat-referral-preview-row span::-webkit-scrollbar {
    width:7px;
    height:7px;
}
#ezc-chat-box::-webkit-scrollbar-track,
#ezc-reviews-content::-webkit-scrollbar-track,
.ezc-internal-tools-content::-webkit-scrollbar-track,
#ezc-tab-links::-webkit-scrollbar-track,
.ezc-ezchat-messages::-webkit-scrollbar-track,
.ezc-ezchat-list::-webkit-scrollbar-track,
.ezc-ezchat-member-picker::-webkit-scrollbar-track,
.ezc-ezchat-modal-card::-webkit-scrollbar-track,
.ezc-ezchat-message-referral-answer > div::-webkit-scrollbar-track,
.ezc-ezchat-referral-preview-row span::-webkit-scrollbar-track {
    background:#191919;
    border-radius:999px;
}
#ezc-chat-box::-webkit-scrollbar-thumb,
#ezc-reviews-content::-webkit-scrollbar-thumb,
.ezc-internal-tools-content::-webkit-scrollbar-thumb,
#ezc-tab-links::-webkit-scrollbar-thumb,
.ezc-ezchat-messages::-webkit-scrollbar-thumb,
.ezc-ezchat-list::-webkit-scrollbar-thumb,
.ezc-ezchat-member-picker::-webkit-scrollbar-thumb,
.ezc-ezchat-modal-card::-webkit-scrollbar-thumb,
.ezc-ezchat-message-referral-answer > div::-webkit-scrollbar-thumb,
.ezc-ezchat-referral-preview-row span::-webkit-scrollbar-thumb {
    background:#8f8100;
    border:1px solid #191919;
    border-radius:999px;
}

.ezc-ezchat-typing {
    flex:0 0 auto;
    align-self:flex-start;
    margin:0 14px 5px;
    max-width:78%;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:7px 10px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px 12px 12px 4px;
    background:#242424;
    color:#bbb;
    font-size:10px;
    line-height:1.2;
}
.ezc-ezchat-typing[hidden] { display:none !important; }
.ezc-ezchat-typing-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ezc-ezchat-typing-dots { display:inline-flex; gap:3px; flex:0 0 auto; }
.ezc-ezchat-typing-dots i {
    width:4px; height:4px; border-radius:50%; background:var(--ezc-primary); opacity:.35;
    animation:ezc-ezchat-dot 1s infinite ease-in-out;
}
.ezc-ezchat-typing-dots i:nth-child(2){animation-delay:.14s;}
.ezc-ezchat-typing-dots i:nth-child(3){animation-delay:.28s;}
@keyframes ezc-ezchat-dot { 0%,60%,100%{transform:translateY(0);opacity:.3;} 30%{transform:translateY(-3px);opacity:1;} }

.ezc-ezchat-read-receipt {
    margin-top:6px;
    min-height:14px;
    font-size:9px;
    line-height:1.25;
    text-align:right;
    color:rgba(0,0,0,.58);
    font-weight:700;
}
.ezc-ezchat-read-receipt.is-read { color:rgba(0,0,0,.78); }
.ezc-ezchat-readers { display:inline-block; max-width:100%; }
.ezc-ezchat-readers summary {
    cursor:pointer;
    list-style:none;
    white-space:nowrap;
    outline:none;
}
.ezc-ezchat-readers summary::-webkit-details-marker { display:none; }
.ezc-ezchat-readers-list {
    margin-top:5px;
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:4px;
    max-width:300px;
}
.ezc-ezchat-reader-chip {
    display:inline-flex;
    max-width:150px;
    padding:3px 6px;
    border-radius:999px;
    background:rgba(0,0,0,.1);
    border:1px solid rgba(0,0,0,.12);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:9px;
    font-weight:700;
}
@media (prefers-reduced-motion: reduce) {
    .ezc-ezchat-typing-dots i { animation:none; opacity:.8; }
}


/* ===== 5.3.29 locked-down workstation cache + control hardening ===== */
/* Header wraps by available widget width, not merely the browser viewport. This
   prevents a saved 360px desktop window from crushing every control together. */
#ezc-widget-container .ezc-header {
    flex-wrap: wrap !important;
    row-gap: 8px;
}
#ezc-widget-container .ezc-title {
    flex: 1 1 150px;
    min-width: 0;
}
#ezc-widget-container .ezc-header-actions {
    flex: 1 1 230px;
    min-width: 0;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}
#ezc-widget-container .ezc-header-actions > * {
    flex: 0 0 auto;
}
#ezc-widget-container #ezc-header-expand {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 78px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
#ezc-widget-container .ezc-employee-chip,
#ezc-widget-container .ezc-notification-toggle,
#ezc-widget-container .ezc-window-resize-handle {
    flex: 0 0 auto;
}
#ezc-widget-container .ezc-notification-toggle,
#ezc-widget-container .ezc-window-resize-handle {
    min-width: 30px;
    min-height: 30px;
}

/* Managed desktop browsers can report a narrow CSS viewport because of display
   scaling/zoom. Keep resize available for mouse/trackpad users and only hide it
   on genuinely touch-oriented narrow devices. */
@media (max-width: 680px) and (pointer: coarse) {
    #ezc-widget-container .ezc-window-resize-handle { display: none !important; }
}

/* A visual fallback remains useful when enterprise policy blocks both desktop
   notifications and WebAudio. */
#ezc-widget-container.ezc-alert-pulse #ezc-trigger-btn {
    outline: 3px solid rgba(255,227,0,.72);
    outline-offset: 3px;
    animation: ezc-alert-pulse 1.05s ease-in-out 2;
}
@keyframes ezc-alert-pulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    #ezc-widget-container.ezc-alert-pulse #ezc-trigger-btn { animation: none; }
}

/* ===== 5.3.30 ADOT locked-down workstation hard fallback =====
   Put boring, widely-supported declarations last on purpose. Older/stale managed
   browsers can ignore the fancy bits and still get a usable Otto. */
#ezc-widget-container .ezc-header {
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    background:#111 !important;
    border-bottom:2px solid #ffe300 !important;
}
#ezc-widget-container .ezc-title {
    display:flex !important;
    flex:1 1 150px !important;
    min-width:0 !important;
    flex-wrap:wrap !important;
    align-items:center !important;
}
#ezc-widget-container .ezc-brand-label {
    display:inline-block !important;
    color:#ffe300 !important;
    white-space:nowrap !important;
    font-weight:800 !important;
}
#ezc-widget-container .ezc-header-actions {
    display:flex !important;
    flex:1 1 230px !important;
    min-width:0 !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:flex-end !important;
}
#ezc-widget-container .ezc-header-actions > * { margin:2px 3px !important; }
#ezc-widget-container .ezc-header-actions a,
#ezc-widget-container #ezc-close {
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:28px !important;
    padding:0 9px !important;
    border:1px solid rgba(255,255,255,.12) !important;
    border-radius:999px !important;
    background:rgba(255,255,255,.06) !important;
    color:#f2f2f2 !important;
    text-decoration:none !important;
    font-size:12px !important;
    line-height:1 !important;
    white-space:nowrap !important;
}
#ezc-widget-container #ezc-header-expand {
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    min-width:78px !important;
    background:#ffe300 !important;
    color:#111 !important;
    border-color:#ffe300 !important;
    font-weight:800 !important;
}
#ezc-widget-container .ezc-notification-toggle,
#ezc-widget-container .ezc-window-resize-handle {
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    min-height:30px !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
}
#ezc-widget-container .ezc-internal-starters {
    display:flex !important;
    flex-wrap:wrap !important;
    overflow-x:hidden !important;
    overflow-y:visible !important;
    white-space:normal !important;
    max-width:100% !important;
}
#ezc-widget-container .ezc-internal-starter {
    flex:0 1 auto !important;
    min-width:0 !important;
    white-space:normal !important;
}
#ezc-widget-container #ezc-tab-chat,
#ezc-widget-container .ezc-panel,
#ezc-widget-container .ezc-body { overflow-x:hidden !important; }
