/* Chat workspace: native layout, scoped independently of account/Flatsome columns. */
/* The fixed workspace owns scrolling; clipping the short body also clips header dropdowns. */
.bt-chat-page { overflow: visible; }
.bt-chat-page #footer,
.bt-chat-page .back-to-top { display: none !important; }
.bt-chat-page #wrapper, .bt-chat-page #main { background: #fff; padding: 0; margin: 0; min-height: 0; }
.bt-chat-workspace, .bt-chat-shell {
    --chat-accent: #ec0341; --chat-wine: #8c0327; --chat-ink: #191719;
    --chat-muted: #706970; --chat-line: #e7e2e4; --chat-soft: #f8f5f6;
    color: var(--chat-ink); font-family: Arial, Helvetica, sans-serif; font-size: 14px;
}
.bt-chat-workspace, .bt-chat-workspace *, .bt-chat-shell, .bt-chat-shell * { box-sizing: border-box; }
.bt-chat-workspace { border-top: 1px solid var(--chat-line); display: flex; flex-direction: column; height: 100vh; height: 100dvh; height: var(--bt-chat-height, 100dvh); width: 100%; overflow: hidden; }
.admin-bar .bt-chat-workspace { height: calc(100dvh - 32px); height: var(--bt-chat-height, calc(100dvh - 32px)); }
.bt-chat-workspace > .woocommerce-notices-wrapper:empty { display: none; }
.bt-chat-workspace > .woocommerce-notices-wrapper { flex-shrink: 0; max-height: 20vh; overflow: auto; }
.bt-chat-shell { display: grid; grid-template-columns: clamp(290px, 27vw, 370px) minmax(0, 1fr); flex: 1; min-height: 0; min-width: 0; width: 100%; margin: 0; background: #fff; }
.bt-chat-shell.bt-chat-embedded { display: block; height: min(800px, 85dvh); min-height: 400px; border: 1px solid var(--chat-line); border-radius: 12px; overflow: hidden; }
.bt-chat-sidebar { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--chat-line); background: #fff; }
.bt-chat-sidebar-heading { padding: 26px 22px 18px; flex-shrink: 0; }
.bt-chat-heading-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 20px; }
.bt-chat-heading-row h1 { margin: 0; font: 700 27px/1.15 Arial, sans-serif; letter-spacing: -1px; color: var(--chat-ink); }
.bt-chat-private-label { font-size: 11px; color: var(--chat-muted); white-space: nowrap; }
.bt-chat-search { display: flex; align-items: center; gap: 9px; background: #f5f2f3; border: 1px solid transparent; border-radius: 8px; padding: 0 12px; margin: 0; }
.bt-chat-search:focus-within { border-color: var(--chat-wine); }
.bt-chat-search svg { width: 18px; height: 18px; fill: none; stroke: var(--chat-muted); stroke-width: 1.7; flex-shrink: 0; }
.bt-chat-search input[type=search] { height: 42px; padding: 0; margin: 0; background: transparent; color: var(--chat-ink); border: 0; box-shadow: none; font: 400 14px Arial, sans-serif; min-width: 0; }
.bt-chat-shell .chat-sidebar-profiles, .bt-chat-search-results { min-height: 0; flex: 1; max-height: none; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: auto; padding: 0 10px 12px; }
.bt-chat-sidebar-list { width: 100%; }
.bt-chat-shell [hidden] { display: none !important; }
.bt-chat-shell .user_chat_containers { padding: 0 !important; border: 0; margin: 2px 0; border-radius: 9px; background: transparent; }
.bt-chat-shell .user_chat_containers:first-child { border-top: 0; }
.bt-chat-shell .user_chat_containers:hover { background: var(--chat-soft); }
.bt-chat-shell .user_chat_containers.user_chat_current { background: #faedf1; }
.bt-chat-contact { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; position: relative; padding: 14px 12px; color: var(--chat-ink); text-decoration: none; }
.bt-chat-contact:hover { color: var(--chat-ink); }
.bt-chat-shell .bt-chat-avatar { width: 44px; height: 44px; padding: 0 !important; border-radius: 50%; overflow: hidden; flex: 0 0 44px; }
.bt-chat-contact .bt-chat-avatar { grid-row: span 2; width: 48px; height: 48px; }
.bt-chat-shell .bt-chat-avatar .img, .bt-chat-shell .bt-chat-avatar .img-inner { margin: 0; padding: 0 !important; width: 100% !important; height: 100%; }
.bt-chat-shell .bt-chat-avatar img { width: 100%; height: 100%; max-height: none; object-fit: cover; display: block; border-radius: 50%; box-shadow: none; }
.bt-chat-shell .profile_content { min-width: 0; text-align: left; }
.bt-chat-shell .profile_content p { color: var(--chat-ink); margin: 0 46px 4px 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-chat-shell .profile_content.read p { opacity: 1; color: var(--chat-ink); }
.bt-chat-shell .profile_content .comment_content, .bt-chat-shell .profile_content.read .comment_content { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.5; color: var(--chat-muted); opacity: 1; font-weight: 400; padding-right: 8px; }
.bt-chat-shell .profile_content.unread p, .bt-chat-shell .profile_content.unread .comment_content { font-weight: 700; color: var(--chat-ink); }
.bt-chat-shell .profile_content.unread:after { display: none; }
.bt-chat-shell .user_chat_containers .sended { position: absolute; right: 12px; top: 16px; bottom: auto; display: block; max-width: 52px; font-size: 10px; color: var(--chat-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-chat-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chat-accent); position: absolute; right: 12px; bottom: 23px; }
.bt-chat-list-empty, .bt-chat-search-status { padding: 18px 12px; color: var(--chat-muted); font-size: 13px; }
.bt-chat-search-more, .bt-chat-load-retry { display: block; margin: 8px auto; font: 600 12px Arial, sans-serif; color: var(--chat-wine); text-transform: none; letter-spacing: 0; }
.bt-chat-shell .chat_container_section { width: 100%; max-width: none; min-width: 0; min-height: 0; padding: 0; border: 0; background: #fff; }
.bt-chat-shell .chat_container_section > .col-inner { height: 100%; width: 100%; display: flex; flex-direction: column; min-height: 0; }
.bt-chat-shell .chat_user_header { position: relative; z-index: 15; display: flex; align-items: center; gap: 13px; padding: 16px 28px; min-height: 78px; flex-shrink: 0; margin: 0; border-bottom: 1px solid var(--chat-line); }
.bt-chat-person { flex: 1; min-width: 0; }
.bt-chat-shell .chat-profile-name { display: block; font-size: 15px; line-height: 1.4; color: var(--chat-ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-chat-shell .online-status { margin: 3px 0 0; font-size: 11px; text-align: left; color: var(--chat-muted); line-height: 1.4; display: block; }
.bt-chat-back { display: none; flex-shrink: 0; width: 38px; height: 40px; color: var(--chat-wine); align-items: center; justify-content: center; border-radius: 50%; }
.bt-chat-back svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bt-chat-product-action { display: flex; align-items: center; gap: 4px; background: #faedf1; color: var(--chat-wine); font-size: 12px; font-weight: 700; border-radius: 7px; padding: 9px 12px; white-space: nowrap; }
.bt-chat-product-action:hover { background: #f6dce5; color: var(--chat-wine); }
.bt-chat-actions { position: relative; flex-shrink: 0; }
.bt-chat-actions summary { list-style: none; width: 38px; height: 40px; display: flex; justify-content: center; align-items: center; cursor: pointer; color: var(--chat-muted); border-radius: 50%; letter-spacing: 2px; }
.bt-chat-actions summary::-webkit-details-marker { display: none; }
.bt-chat-actions summary:hover { background: var(--chat-soft); }
.bt-chat-actions-menu { position: absolute; right: 0; top: 44px; min-width: 180px; padding: 6px; border: 1px solid var(--chat-line); background: #fff; border-radius: 9px; box-shadow: 0 8px 24px #19171912; }
.bt-chat-shell .bt-chat-actions-menu a { display: block; font-size: 13px; color: var(--chat-ink); padding: 11px 12px; margin: 0; border-radius: 5px; }
.bt-chat-actions-menu a:hover { background: var(--chat-soft); }
.bt-chat-shell .chat_messages_container { position: relative; flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 14px 24px 18px; margin: 0; width: 100%; background: #fcfafb; }
.bt-chat-shell .inner-message-container { width: 100%; min-width: 0; padding: 0; }
.bt-chat-shell .chat-messages-area { max-width: 1080px; margin: 0 auto; padding: 0 0 10px; }
.bt-chat-shell .chat-msg-wrapper > .row { margin-left: 0; margin-right: 0; width: 100%; max-width: none; }
.bt-chat-shell .chat_message > .col-inner { max-width: min(78%, 660px); padding: 10px 15px !important; border-radius: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.bt-chat-shell .chat_message.sender_user_comment:not(.product) > .col-inner { background-color: #f0eaed !important; color: var(--chat-ink); }
.bt-chat-shell .chat_message.current_user_comment:not(.product) > .col-inner { background-color: var(--chat-wine) !important; color: #fff; }
.bt-chat-shell .chat_message.product > .col-inner { padding: 0 !important; width: min(85%, 520px); max-width: 85%; }
.bt-chat-shell .chat_message.product .chat-product-container { background: #fff; border: 1px solid var(--chat-line); border-radius: 12px; }
.bt-chat-shell .chat_message.product .product-header { background: #f6f0f2; border-color: var(--chat-line); }
.bt-chat-shell .chat_message.product .product-content { min-width: 0; overflow-wrap: anywhere; }
.bt-chat-shell .chat_message.product h3 { font-size: 15px; color: var(--chat-ink); }
.bt-chat-shell .chat-date-sep { text-align: center; font-size: 11px; color: var(--chat-muted); padding: 20px 0; }
.bt-chat-shell .chat-read-status { color: var(--chat-muted); }
.bt-chat-shell .chat_form_container { margin: 0; flex-shrink: 0; padding: 15px 24px 12px; border-top: 1px solid var(--chat-line); background: #fff; max-height: 48%; overflow-y: auto; }
.bt-chat-shell .chat-form-live { margin: 0; padding: 0; border: 0; }
.bt-chat-shell .chat-form-row { align-items: flex-end; gap: 10px; }
.bt-chat-shell .chat-message-input { border: 1px solid var(--chat-line); background: #f8f5f6; color: var(--chat-ink); border-radius: 14px; box-shadow: none; margin: 0; min-height: 46px; padding: 12px 15px; font-size: 15px; line-height: 1.4; }
.bt-chat-shell .chat-message-input:focus { border-color: var(--chat-wine); background: #fff; }
.bt-chat-shell .chat-form-actions-left { gap: 2px; padding-bottom: 3px; }
.bt-chat-shell .chat-attach-btn, .bt-chat-shell .chat-send-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; color: var(--chat-wine); background: transparent; box-shadow: none; }
.bt-chat-shell .chat-attach-btn svg, .bt-chat-shell .chat-send-btn svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.bt-chat-shell .chat-send-btn { flex: 0 0 42px; width: 42px; height: 42px; margin-bottom: 2px; background: var(--chat-wine) !important; color: #fff !important; }
.bt-chat-shell .chat-send-btn:disabled { opacity: .35; }
.bt-chat-shell .chat-send-btn.has-content { opacity: 1; background: var(--chat-accent) !important; }
.bt-chat-shell .chat-form-options { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0 92px; padding: 0; color: var(--chat-muted); font-size: 11px; line-height: 1.5; }
.bt-chat-shell .chat-form-options input { margin: 2px 0 0; flex-shrink: 0; accent-color: var(--chat-wine); }
.bt-chat-shell .chat-form-options label { margin: 0; color: inherit; font-size: inherit; font-weight: 400; cursor: pointer; }
.bt-chat-shell .chat-file-preview { max-height: 130px; overflow-y: auto; padding: 0 0 12px; border: 0; }
.bt-chat-shell .chat-typing-indicator { position: sticky; bottom: 0; pointer-events: none; }
.bt-chat-empty { max-width: 420px; text-align: center; margin: 12vh auto 0; padding: 24px; }
.bt-chat-empty-icon { display: flex; width: 76px; height: 76px; align-items: center; justify-content: center; margin: 0 auto 24px; border-radius: 25px; background: #faedf1; color: var(--chat-wine); font: 40px Georgia, serif; }
.bt-chat-empty h2 { font-size: 26px; line-height: 1.2; color: var(--chat-ink); letter-spacing: -.8px; }
.bt-chat-empty p { color: var(--chat-muted); line-height: 1.8; }
.bt-chat-start { max-width: 520px; margin: 30px auto; border: 1px solid var(--chat-line); background: #fff; padding: 24px; border-radius: 12px; color: var(--chat-muted); font-size: 12px; }
.bt-chat-start h2 { color: var(--chat-ink); font-size: 21px; }
.bt-chat-unavailable { margin: 0; font-size: 13px; color: var(--chat-muted); }
.bt-chat-shell .chat-navigation-placeholder { justify-content: center; align-items: center; padding: 24px; text-align: center; background: #fcfafb; }
.bt-chat-shell .chat-connection-status { flex-shrink: 0; }
.bt-chat-shell a:focus-visible, .bt-chat-shell button:focus-visible, .bt-chat-shell summary:focus-visible, .bt-chat-shell textarea:focus-visible { outline: 2px solid var(--chat-accent); outline-offset: 3px; }
@media (max-width: 767px) {
    .bt-chat-shell { display: flex; }
    .bt-chat-sidebar { width: 100%; border: 0; }
    .bt-chat-shell.active-chat .bt-chat-sidebar { display: none; }
    .bt-chat-shell.no-active-chat .chat_container_section { display: none !important; }
    .bt-chat-shell.active-chat .chat_container_section { display: block; }
    .bt-chat-shell .chat-sidebar-profiles { display: block !important; }
    .bt-chat-shell .chat-sidebar-profiles[hidden] { display: none !important; }
    .bt-chat-sidebar-heading { padding: 22px 20px 16px; }
    .bt-chat-shell .chat_user_header { min-height: 70px; padding: 11px 12px 11px 6px; gap: 8px; }
    .bt-chat-shell .chat_user_header .bt-chat-avatar { width: 36px; height: 36px; flex-basis: 36px; }
    .bt-chat-back { display: flex; }
    .bt-chat-shell .chat-profile-name { font-size: 14px; }
    .bt-chat-product-action { font-size: 11px; gap: 0; padding: 8px; }
    .bt-chat-shell .chat_messages_container { padding: 8px 4px 12px; }
    .bt-chat-shell .chat_message > .col-inner { max-width: 88%; font-size: 14px; }
    .bt-chat-shell .chat_message.product > .col-inner { width: 92%; max-width: 92%; }
    .bt-chat-shell .chat_form_container { padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
    .bt-chat-shell .chat-form-row { gap: 5px; }
    .bt-chat-shell .chat-form-actions-left { gap: 0; }
    .bt-chat-shell .chat-attach-btn { width: 32px; height: 40px; }
    .bt-chat-shell .chat-message-input { min-width: 0; font-size: 16px; padding: 11px 12px; }
    .bt-chat-shell .chat-form-options { margin-left: 3px; font-size: 10px; margin-top: 7px; }
    .bt-chat-shell.bt-chat-embedded { min-height: 360px; height: 80dvh; }
}
@media (prefers-reduced-motion: reduce) { .bt-chat-shell *, .bt-chat-shell *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.bt-chat-page .bt-chat-workspace { position: fixed; left: 0; right: 0; top: var(--bt-chat-top, var(--header-height, 100px)); z-index: 29; }
.admin-bar.bt-chat-page .bt-chat-workspace { top: var(--bt-chat-top, calc(var(--header-height, 100px) + 32px)); }
.bt-chat-shell.bt-chat-embedded > .chat_container_section { height: 100%; }

/* Conversation mail preferences belong in the header settings menu. */
.bt-chat-actions-menu:has(.bt-chat-email-setting) { width: 270px; max-width: calc(100vw - 24px); }
.bt-chat-shell .bt-chat-email-setting { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--chat-line); }
.bt-chat-shell .bt-chat-email-setting input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--chat-wine); }
.bt-chat-shell .bt-chat-email-setting label { margin: 0; color: var(--chat-ink); font-size: 13px; font-weight: 400; line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
