/* Shree Buildcon chat widget — premium responsive UI */

/* Shared FAB layout — chat toggle + float-stack (WA / Call) stay aligned */
:root {
    --sb-fab-side: max(22px, env(safe-area-inset-right));
    --sb-fab-bottom: max(22px, env(safe-area-inset-bottom));
    --sb-fab-chat-size: 56px;
    --sb-fab-chat-gap: 16px;
}

/* Keep WA + Call original styles; only lift them above the chat button */
.float-stack {
    bottom: calc(var(--sb-fab-bottom) + var(--sb-fab-chat-size) + var(--sb-fab-chat-gap)) !important;
    right: var(--sb-fab-side) !important;
}

#chat-widget {
    --sb-primary: #141414;
    --sb-primary-hover: #B8912A;
    --sb-primary-light: rgba(184, 145, 42, 0.16);
    --sb-accent: #B8912A;
    --sb-bg: #F7F5EF;
    --sb-surface: #FFFFFF;
    --sb-text-main: #141414;
    --sb-text-muted: rgba(20, 20, 20, 0.55);
    --sb-border: rgba(20, 20, 20, 0.12);

    --sb-chat-toggle: var(--sb-fab-chat-size);
    --sb-chat-gap: var(--sb-fab-chat-gap);
    --sb-chat-side: var(--sb-fab-side);
    --sb-chat-bottom: var(--sb-fab-bottom);
    --sb-chat-panel-w: min(380px, calc(100vw - 44px));
    --sb-chat-panel-h: min(600px, calc(100dvh - 120px));
    --sb-chat-radius: 24px;
    --sb-chat-logo-w: 76px;
    --sb-chat-brand-h: 36px;

    --sb-shadow-soft: 0 4px 6px -1px rgba(20, 20, 20, 0.08), 0 2px 4px -1px rgba(20, 20, 20, 0.04);
    --sb-shadow-elevated: 0 20px 40px -8px rgba(20, 20, 20, 0.16), 0 12px 16px -4px rgba(20, 20, 20, 0.08);

    --sb-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
    --sb-ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Isolate from global site CSS (index.css svg/button/input resets) */
    box-sizing: border-box;
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--sb-text-main);
    -webkit-font-smoothing: antialiased;
    position: fixed;
    right: var(--sb-chat-side);
    left: auto;
    bottom: var(--sb-chat-bottom);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--sb-chat-gap);
    max-width: calc(100vw - 24px);
}

#chat-widget *,
#chat-widget *::before,
#chat-widget *::after {
    box-sizing: border-box;
}

#chat-widget button,
#chat-widget input {
    font: inherit;
    margin: 0;
}

#chat-widget svg {
    display: block;
    max-width: none;
    flex-shrink: 0;
}

#chat-widget img.chat-header__logo {
    display: block;
    max-width: var(--sb-chat-logo-w) !important;
}

#chat-toggle {
    width: var(--sb-chat-toggle);
    height: var(--sb-chat-toggle);
    min-width: var(--sb-chat-toggle);
    min-height: var(--sb-chat-toggle);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: var(--sb-primary);
    color: var(--sb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--sb-shadow-elevated);
    transition: transform 0.3s var(--sb-spring), background 0.2s ease, box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
}

@media (hover: hover) {
    #chat-toggle:hover {
        transform: translateY(-4px) scale(1.04);
        background: var(--sb-primary-hover);
        box-shadow: 0 24px 48px -12px rgba(184, 145, 42, 0.35);
    }
}

#chat-toggle:active {
    transform: scale(0.92);
}

#chat-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: transform 0.3s var(--sb-ease), opacity 0.3s ease;
    position: absolute;
}

.chat-icon-close {
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
}

.chat-icon-open {
    opacity: 1;
    transform: scale(1) rotate(0);
}

#chat-toggle[aria-expanded="true"] .chat-icon-open {
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
}

#chat-toggle[aria-expanded="true"] .chat-icon-close {
    opacity: 1;
    transform: scale(1) rotate(0);
}

#chat-box {
    width: var(--sb-chat-panel-w);
    height: var(--sb-chat-panel-h);
    max-height: calc(100dvh - var(--sb-chat-bottom) - var(--sb-chat-toggle) - var(--sb-chat-gap) - 16px);
    background: rgba(247, 245, 239, 0.96);
    border: 1px solid rgba(20, 20, 20, 0.12);
    border-radius: var(--sb-chat-radius);
    box-shadow: var(--sb-shadow-elevated);
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transform-origin: calc(100% - 28px) calc(100% + var(--sb-chat-gap));
}

#chat-box.is-open,
#chat-widget.is-chat-open #chat-box {
    display: flex;
}

#chat-widget.is-chat-open #chat-box {
    animation: sbChatIn 0.4s var(--sb-spring) forwards;
}

@keyframes sbChatIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
        pointer-events: none;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: all;
    }
}

#chat-header {
    position: relative;
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
    color: var(--sb-bg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    flex-grow: 0;
    min-height: calc(var(--sb-chat-brand-h) + 28px);
    overflow: hidden;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 0;
}

#chat-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(184, 145, 42, 0.22) 0%, transparent 50%);
    pointer-events: none;
}

#chat-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(184, 145, 42, 0.1), var(--sb-accent), rgba(184, 145, 42, 0.1));
    pointer-events: none;
}

.chat-header__brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

/* White logo — scoped img (server-safe sizing) */
#chat-widget .chat-header__logo {
    display: block;
    flex: 0 0 var(--sb-chat-logo-w);
    width: var(--sb-chat-logo-w) !important;
    height: var(--sb-chat-brand-h) !important;
    min-width: var(--sb-chat-logo-w);
    max-width: var(--sb-chat-logo-w) !important;
    min-height: var(--sb-chat-brand-h);
    max-height: var(--sb-chat-brand-h) !important;
    object-fit: contain;
    object-position: left center;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 14px;
    box-sizing: content-box;
    background: transparent;
    /* PNG is white on black — screen removes black, keeps white on navy header */
    mix-blend-mode: screen;
}

.chat-header__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    min-height: var(--sb-chat-brand-h);
    overflow: visible;
}

#chat-header strong {
    display: block;
    font-family: Manrope, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #F5F2EA;
}

.chat-header__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-header__sub {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    opacity: 0.8;
    letter-spacing: 0.02em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(245, 242, 234, 0.82);
}

.chat-header__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Manrope, system-ui, sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-header__status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
    flex-shrink: 0;
}

#chat-messages {
    flex: 1;
    min-height: 0;
    padding: clamp(16px, 4vw, 20px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--sb-bg);
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(20, 20, 20, 0.18);
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(184, 145, 42, 0.45);
}

.chat-inline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 12px;
    max-width: 100%;
    animation: messageSlideIn 0.3s ease-out forwards;
}

.chat-chip {
    font-family: inherit;
    font-size: clamp(10px, 2.8vw, 11px);
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 8px 14px;
    min-height: 34px;
    border-radius: 100px;
    border: 1px solid var(--sb-border);
    background: var(--sb-surface);
    color: var(--sb-primary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: var(--sb-shadow-soft);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (hover: hover) {
    .chat-chip:hover {
        background: var(--sb-primary-light);
        border-color: var(--sb-primary);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px -2px rgba(184, 145, 42, 0.18);
    }

    .chat-chip--project:hover {
        background: var(--sb-primary-hover);
        color: #141414;
        border-color: var(--sb-primary-hover);
    }
}

.chat-chip:active {
    transform: scale(0.96);
}

.chat-chip--project {
    background: var(--sb-surface);
    border-color: var(--sb-primary);
    color: var(--sb-primary-hover);
    border-width: 1.5px;
}

.chat-inline-chips--actions {
    gap: 8px;
    margin-top: 4px;
}

.chat-chip--action {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    padding: 10px 12px;
    min-height: 40px;
    background: linear-gradient(180deg, #ffffff 0%, #F7F5EF 100%);
    border-color: rgba(20, 20, 20, 0.2);
    color: #141414;
}

@media (hover: hover) {
    .chat-chip--action:hover {
        background: var(--sb-primary-hover);
        color: #141414;
        border-color: var(--sb-primary-hover);
    }
}

.user-msg,
.bot-msg {
    margin: 4px 0;
    display: flex;
    flex-direction: column;
    animation: messageSlideIn 0.3s ease-out forwards;
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-msg {
    align-items: flex-end;
}

.bot-msg {
    align-items: flex-start;
}

.user-msg span,
.bot-msg span {
    display: inline-block;
    max-width: min(88%, 300px);
    padding: 10px 16px;
    font-size: clamp(13px, 3.4vw, 14px);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
    box-shadow: var(--sb-shadow-soft);
}

.user-msg span {
    background: var(--sb-primary);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
}

.bot-msg span {
    background: var(--sb-surface);
    color: var(--sb-text-main);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px 18px 18px 4px;
}

.loading-dots span {
    color: var(--sb-text-muted);
    font-style: italic;
    padding: 8px 16px;
    background: transparent;
    border: none;
    box-shadow: none;
}

#chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--sb-border);
    padding: clamp(10px, 3vw, 14px);
    padding-bottom: max(clamp(10px, 3vw, 14px), env(safe-area-inset-bottom, 0px));
    background: var(--sb-surface);
    flex-shrink: 0;
    border-radius: 0 0 var(--sb-chat-radius) var(--sb-chat-radius);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.02);
}

#chat-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(20, 20, 20, 0.2);
    border-radius: 24px;
    outline: none;
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    background: var(--sb-bg);
    color: var(--sb-text-main);
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.2s ease;
}

#chat-input::placeholder {
    color: var(--sb-text-muted);
    opacity: 0.7;
}

#chat-input:focus {
    background: var(--sb-surface);
    border-color: var(--sb-primary-hover);
    box-shadow: 0 0 0 4px var(--sb-primary-light);
}

#chat-send {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: var(--sb-primary);
    color: var(--sb-surface);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#chat-send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transform: translateX(1px);
}

@media (hover: hover) {
    #chat-send:hover:not(:disabled) {
        background: var(--sb-primary-hover);
        color: #141414;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(184, 145, 42, 0.35);
    }
}

#chat-send:active:not(:disabled) {
    transform: scale(0.92);
}

#chat-send:disabled {
    opacity: 0.5;
    background: var(--sb-text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

body.sb-menu-open #chat-widget {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
}

@media (max-width: 899px) {
    :root {
        --sb-fab-chat-size: 52px;
        --sb-fab-chat-gap: 12px;
        --sb-fab-side: max(16px, env(safe-area-inset-right));
        --sb-fab-bottom: max(16px, env(safe-area-inset-bottom));
    }

    #chat-widget {
        --sb-chat-panel-w: min(360px, calc(100vw - 32px));
        --sb-chat-panel-h: min(520px, calc(100dvh - 130px));
        --sb-chat-radius: 20px;
        --sb-chat-logo-w: 68px;
        --sb-chat-brand-h: 32px;
    }

    #chat-header {
        padding: 12px 14px;
    }

    #chat-header strong {
        font-size: 13px;
    }

    .chat-header__sub {
        font-size: 10px;
    }
}

@media (max-width: 599px) {
    #chat-widget {
        --sb-chat-panel-w: calc(100vw - 24px);
        --sb-chat-panel-h: min(540px, calc(100dvh - 110px));
    }

    #chat-widget.is-chat-open {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        align-items: stretch;
    }

    #chat-widget.is-chat-open #chat-box {
        width: 100%;
        max-width: none;
        height: min(600px, calc(100dvh - var(--sb-chat-bottom) - var(--sb-chat-toggle) - var(--sb-chat-gap) - 12px));
        max-height: calc(100dvh - var(--sb-chat-bottom) - var(--sb-chat-toggle) - var(--sb-chat-gap) - 12px);
        transform-origin: bottom center;
    }

    #chat-widget.is-chat-open #chat-toggle {
        align-self: flex-end;
    }

    .user-msg span,
    .bot-msg span {
        max-width: 92%;
    }
}

@media (max-width: 380px) {
    :root {
        --sb-fab-side: max(12px, env(safe-area-inset-right));
        --sb-fab-bottom: max(12px, env(safe-area-inset-bottom));
    }

    #chat-widget {
        --sb-chat-radius: 18px;
        --sb-chat-logo-w: 60px;
        --sb-chat-brand-h: 30px;
    }

    #chat-header {
        padding: 12px;
    }

    .chat-header__brand {
        gap: 10px;
    }

    #chat-widget .chat-header__logo {
        padding-right: 10px;
    }

    #chat-header strong {
        font-size: 12px;
    }

    .chat-header__sub {
        font-size: 9px;
    }

    .chat-header__status {
        font-size: 7px;
        height: 16px;
        padding: 0 6px;
    }

    #chat-messages {
        padding: 12px;
    }

    #chat-input-area {
        padding: 10px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }

    #chat-send {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    #chat-widget {
        --sb-chat-panel-h: min(340px, calc(100dvh - 80px));
        --sb-chat-logo-w: 56px;
        --sb-chat-brand-h: 28px;
    }

    #chat-widget.is-chat-open #chat-box {
        height: min(340px, calc(100dvh - 72px));
        max-height: calc(100dvh - 72px);
    }

    #chat-header {
        padding: 10px 12px;
    }
}

@media (min-width: 1200px) {
    #chat-widget {
        --sb-chat-panel-w: 400px;
        --sb-chat-panel-h: 600px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #chat-widget {
        --sb-spring: ease;
        --sb-ease: ease;
    }

    #chat-widget.is-chat-open #chat-box,
    .user-msg,
    .bot-msg,
    .chat-inline-chips {
        animation: none;
    }

    #chat-toggle,
    .chat-chip,
    #chat-send,
    #chat-toggle svg {
        transition: none;
    }
}

/* ===== light already uses ivory × ink × gold on #chat-widget tokens ===== */
/* ===== dark-theme — invert neutrals; keep gold hover / white logo on ink header ===== */
html.theme-dark #chat-widget {
    color-scheme: dark;
    --sb-primary: #F5F2EA;
    --sb-primary-hover: #B8912A;
    --sb-primary-light: rgba(184, 145, 42, 0.18);
    --sb-accent: #D4AF37;
    --sb-bg: #0a0a0a;
    --sb-surface: #1a1a1a;
    --sb-text-main: #F5F2EA;
    --sb-text-muted: rgba(245, 242, 234, 0.55);
    --sb-border: rgba(245, 242, 234, 0.14);
    --sb-shadow-soft: 0 4px 8px rgba(0, 0, 0, 0.35);
    --sb-shadow-elevated: 0 22px 48px rgba(0, 0, 0, 0.55);
    color: #F5F2EA;
}

html.theme-dark #chat-toggle {
    background: #F5F2EA;
    color: #0a0a0a;
    border-color: transparent;
}

@media (hover: hover) {
    html.theme-dark #chat-toggle:hover {
        background: #B8912A;
        color: #0a0a0a;
        box-shadow: 0 24px 48px -12px rgba(184, 145, 42, 0.4);
    }
}

html.theme-dark #chat-box {
    background: rgba(16, 16, 16, 0.96);
    border-color: rgba(245, 242, 234, 0.14);
}

html.theme-dark #chat-header {
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    color: #F5F2EA;
    border-bottom-color: rgba(245, 242, 234, 0.08);
}

html.theme-dark #chat-header strong,
html.theme-dark .chat-header__sub {
    color: #F5F2EA !important;
}

html.theme-dark .chat-header__status {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(245, 242, 234, 0.16);
    color: #F5F2EA;
}

html.theme-dark #chat-messages {
    background: #0a0a0a;
}

html.theme-dark #chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(245, 242, 234, 0.2);
}

html.theme-dark .chat-chip {
    background: #1c1c1c;
    border-color: rgba(245, 242, 234, 0.18);
    color: #F5F2EA;
}

@media (hover: hover) {
    html.theme-dark .chat-chip:hover {
        background: #B8912A;
        border-color: #B8912A;
        color: #141414;
    }
    html.theme-dark .chat-chip--project:hover,
    html.theme-dark .chat-chip--action:hover {
        background: #B8912A;
        border-color: #B8912A;
        color: #141414;
    }
}

html.theme-dark .chat-chip--project,
html.theme-dark .chat-chip--action {
    background: #1c1c1c;
    border-color: rgba(212, 175, 55, 0.45);
    color: #F5F2EA;
}

html.theme-dark .user-msg span {
    background: #F5F2EA;
    color: #0a0a0a;
}

html.theme-dark .bot-msg span {
    background: #1c1c1c;
    color: #F5F2EA;
    border-color: rgba(245, 242, 234, 0.12);
}

html.theme-dark .loading-dots span {
    color: rgba(245, 242, 234, 0.5);
}

html.theme-dark #chat-input-area {
    background: #141414;
    border-top-color: rgba(245, 242, 234, 0.12);
}

html.theme-dark #chat-input {
    color-scheme: dark;
    background: #111111;
    color: #F5F2EA;
    caret-color: #F5F2EA;
    border-color: rgba(245, 242, 234, 0.22);
}

html.theme-dark #chat-input::placeholder {
    color: rgba(245, 242, 234, 0.42);
    opacity: 1;
}

html.theme-dark #chat-input:focus {
    background: #1a1a1a;
    color: #F5F2EA;
    border-color: #B8912A;
    box-shadow: 0 0 0 4px rgba(184, 145, 42, 0.18);
}

html.theme-dark #chat-input:-webkit-autofill,
html.theme-dark #chat-input:-webkit-autofill:hover,
html.theme-dark #chat-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #F5F2EA;
    caret-color: #F5F2EA;
    box-shadow: 0 0 0 1000px #111111 inset !important;
}

html.theme-dark #chat-send {
    background: #F5F2EA;
    color: #0a0a0a;
}

@media (hover: hover) {
    html.theme-dark #chat-send:hover:not(:disabled) {
        background: #B8912A;
        color: #141414;
    }
}

html.theme-dark #chat-send:disabled {
    background: rgba(245, 242, 234, 0.28);
    color: #0a0a0a;
}

/* Mobile header — keep “Shree Buildcon AI” readable; don’t clip it to the logo height */
@media (max-width: 899px) {
    #chat-header {
        padding: 12px 14px;
        min-height: 0;
        align-items: flex-start;
    }

    .chat-header__brand {
        gap: 10px;
        align-items: flex-start;
    }

    #chat-widget .chat-header__logo {
        flex: 0 0 52px;
        width: 52px !important;
        min-width: 52px;
        max-width: 52px !important;
        height: 28px !important;
        min-height: 28px;
        max-height: 28px !important;
        padding-right: 10px;
        margin-top: 2px;
    }

    .chat-header__text {
        height: auto !important;
        min-height: 0;
        gap: 3px;
    }

    #chat-header strong {
        font-size: 13px !important;
        line-height: 1.3 !important;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        color: #F5F2EA !important;
    }

    .chat-header__sub {
        display: none;
    }

    .chat-header__status {
        flex-shrink: 0;
    }
}

@media (max-width: 380px) {
    #chat-header strong {
        font-size: 12.5px !important;
    }
}
