#sm-chat-root * {
    box-sizing: border-box;
}

#sm-chat-root {
    --red: #0e203f;
    --bg: #ffffff;
    --panel: #f7f7f7;
    --text: #36393e;
    --muted: #7a8291;
    --user: #eceff2;
    --border: #dfe3e8;
    --chip: #ffffff;
    --chip-border: #d7dce2;
    --mw-text-secondary: #cbd5e1;
    --mw-success-soft: #85c732;
    --mw-primary-soft: #638ac5;
    --mw-primary-soft-light: #133f70;
    --light-color: #1a82bb;
    --light2-color: #4db8e8;
}

.mind-chat-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 10px 28px rgba(19, 37, 72, .18),
        0 3px 10px rgba(19, 37, 72, .10);
    transition: transform .25s ease, box-shadow .25s ease;
    z-index: 10000;
    position: fixed !important;
    bottom: 1%;
    right: 1%;
    animation: sm-fab-float 3s ease-in-out infinite;
}

#sm-chat-root .bot-avatar-wrap .bot-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

#sm-chat-root .bot-avatar-wrap .bot-avatar-skeleton {
    z-index: 1;
}

#sm-chat-root .bot-avatar-wrap img.bot-avatar-img {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#sm-chat-root .bot-avatar-wrap img.bot-avatar-img.visible {
    opacity: 1;
}

.bot-avatar-skeleton {
    background: linear-gradient(90deg,
            rgba(230, 235, 242, 0.6) 25%,
            rgba(245, 248, 251, 0.9) 50%,
            rgba(230, 235, 242, 0.6) 75%);
    background-size: 200% 100%;
    animation: sm-avatar-shimmer 1.4s ease-in-out infinite;
}

@keyframes sm-avatar-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.bot-avatar-fade-in {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bot-avatar-fade-in.visible {
    opacity: 1;
}

#sm-chat-root .bot-avatar-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    overflow: hidden;
}

.mind-chat-btn img,
.mind-chat-btn .bot-avatar-img,
.ai-avatar img,
.ai-avatar .bot-avatar-img,
.bot-avatar .bot-avatar-img,
.sm-greeting-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.mind-chat-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2.5px solid var(--red);
    opacity: 0.6;
    animation: sm-fab-ring 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

.mind-chat-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 16px 36px rgba(19, 37, 72, .24),
        0 6px 14px rgba(19, 37, 72, .14);
    animation-play-state: paused;
}

.mind-chat-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.bot-online {
    width: 12px;
    height: 12px;
    position: absolute;
    top: 0px;
    right: 6px;
    z-index: 9;
    border-radius: 100px;
    background-color: var(--mw-success-soft);
}

@keyframes sm-fab-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes sm-fab-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes sm-fab-pulse-wave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

#sm-chat-root .open-chat-btn {
    border: none;
    background: linear-gradient(90deg, #0067C0 0%, #0078D4 35%, #00A6ED 100%);
    background-size: 200% 200%;
    color: #fff;
    padding: 13px 22px 13px 16px;
    border-radius: 56px;
    font-family: inherit;
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        0 8px 32px rgba(0, 102, 154, 0.40),
        0 2px 8px rgba(0, 102, 154, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, background-position .4s;
    animation: sm-zoomIn 0.4s ease-out, sm-heartbeat 2s 0.5s infinite;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 12px;
    z-index: 9998;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#sm-chat-root .open-chat-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 18px 48px rgba(0, 102, 154, 0.46), 0 4px 14px rgba(0, 102, 154, 0.25);
    background-position: right center;
}

#sm-chat-root .open-chat-btn:active {
    transform: scale(.96);
}

#sm-chat-root .fab-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .3s;
}

#sm-chat-root .open-chat-btn:hover .fab-icon-wrap {
    background: rgba(255, 255, 255, 0.30);
}

#sm-chat-root .fab-icon-wrap svg {
    width: 19px;
    height: 19px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#sm-chat-root .fab-label-wrap {
    line-height: 1.25;
}

#sm-chat-root .fab-sub-label {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: .78;
    letter-spacing: .03em;
    margin-top: 2px;
}

#sm-chat-root .chat-icon_Web_Concierge {
    display: none;
}

@keyframes fabIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.88)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .35;
        transform: scale(.72)
    }
}

#sm-chat-root .chat-modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 31, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 99999;
}

#sm-chat-root .chat-modal.active {
    display: flex;
}

#sm-chat-root .chat-modal.align-end {
    justify-content: flex-end;
    align-items: flex-end;
    padding-bottom: 20px;
    padding-right: 18px;
}

#sm-chat-root .chat-window {
    width: 95%;
    height: min(790px, calc(100vh - 36px));
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    transition: width 0.28s ease, height 0.28s ease, border-radius 0.28s ease;
}

#sm-chat-root .chat-window.compact {
    width: min(500px, 100%);
    height: min(750px, calc(100vh - 36px));
    border-radius: 18px;
}

#sm-chat-root .topbar {
    height: 72px;
    min-height: 72px;
    background: var(--red);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

#sm-chat-root .header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 90px;
}

#sm-chat-root .web-assist-header {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #fff;
    white-space: nowrap;
}

#sm-chat-root .web-assist-header span {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

#sm-chat-root .web-assist-header i {
    font-size: 14px;
    color: var(--mw-text-secondary);
    font-style: italic;
    font-weight: 400;
}

#sm-chat-root .status-indicator {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

#sm-chat-root .status-dot {
    width: 8px;
    height: 8px;
    background: var(--mw-success-soft);
    border-radius: 50%;
    animation: sm-mw-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}


@keyframes sm-mw-pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

#sm-chat-root .window-actions {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 3px;
    color: #fff;
    font-size: 18px;
    gap: 20px;
}

.mwc-panel-mode-sources-icon {
    stroke: #7A8FA6;
}

#sm-chat-root .window-actions #closeChatBtn,
#sm-chat-root .window-actions #toggleSizeBtn,
#sm-chat-root .window-actions #swapPanelsBtn {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 23px;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
}

#sm-chat-root .toggle-btn-mobile {
    display: none;
}

#sm-chat-root .toggle-btn-desktop {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

#sm-chat-root .swap-panels-btn svg {
    width: 18px;
    height: 18px;
}

#sm-chat-root .chat-window.compact .swap-panels-btn {
    display: none;
}


#sm-chat-root .bot-avatar {
    position: absolute;
    left: 18px;
    top: 28px;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

#sm-chat-root .circular-text {
    position: absolute;
    width: 92px;
    height: 92px;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    overflow: visible;
}

#sm-chat-root .circle-text-style {
    fill: var(--red);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1.6px;
    opacity: 0.85;
}

#sm-chat-root .bot-avatar .face {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

#sm-chat-root .bot-avatar .face img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

#sm-chat-root .privacy-note {
    padding: 0px 18px 8px;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: #5e6470;
    flex-shrink: 0;
}

#sm-chat-root .privacy-note a {
    color: #5e6470;
    text-decoration: underline;
}

#sm-chat-root .chat-window.compact .privacy-note {
    font-size: 12px;
}

#sm-chat-root .chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 40px 20px 22px;
}

#sm-chat-root .chat-body::-webkit-scrollbar {
    width: 8px;
}

#sm-chat-root .chat-body::-webkit-scrollbar-thumb {
    background: #b2b2b2;
    border-radius: 999px;
}

#sm-chat-root .assistant-row {
    display: flex;
    align-items: flex-start;
}

#sm-chat-root .welcome-card {
    max-width: 100%;
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 16px 16px 12px;
    color: var(--text);
}

#sm-chat-root .welcome-title {
    font-size: 15px;
    font-weight: 700;
    color: #13233b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#sm-chat-root .welcome-text,
#sm-chat-root .welcome-footer {
    font-size: 15px;
    line-height: 1.55;
    color: #1b2d47;
}

#sm-chat-root .welcome-text {
    margin-bottom: 14px;
}

#sm-chat-root .service-list {
    list-style: disc;
    margin-bottom: 14px;
    color: #1d2633;
    padding: 0;
}

#sm-chat-root .service-list li {
    padding: 10px 0;
    border-bottom: 1px solid #dcdfe4;
    font-size: 15px;
}

#sm-chat-root .message {
    max-width: 100%;
    padding: 14px 25px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
    word-break: break-word;
}

#sm-chat-root .message-group {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

#sm-chat-root .message.bot {
    color: var(--text);
    border-bottom-left-radius: 4px;
    background: rgba(212, 221, 227, 0.28);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(0, 102, 154, 0.14);
    border-image: initial;
    width: 100%;

}

#sm-chat-root .message.user {
    background: #d4dde347;
    color: var(--text);
    border: 1px solid rgba(0, 102, 154, 0.14);
    margin-left: auto;
    max-width: min(1000px, 100%);
}

#sm-chat-root .operator-joined-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
    color: #7a8fa6;
    font-size: 12px;
    font-weight: 600;
}

#sm-chat-root .operator-joined-divider::before,
#sm-chat-root .operator-joined-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(0, 102, 154, 0.18);
}

#sm-chat-root .operator-joined-divider span {
    white-space: nowrap;
}

#sm-chat-root .operator-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 4px;
}

#sm-chat-root .operator-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

#sm-chat-root .operator-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#sm-chat-root .message.operator {
    max-width: min(390px, 82%);
    color: #15364a;
    border: 1px solid rgba(0, 102, 154, 0.14);
    background: aliceblue;
    border-bottom-left-radius: 4px;
}

#sm-chat-root .message-meta.operator {
    margin-left: 44px;
    margin-top: 6px;
    color: #7a8fa6;
}

#sm-chat-root .message-meta {
    display: flex;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    margin-left: 10px;
}

#sm-chat-root .message-meta.bot-meta {
    margin-left: 52px;
    margin-top: 8px;
}

#sm-chat-root .message-meta.right {
    justify-content: flex-end;
    margin-right: 52px;
    margin-left: 0;
}

#sm-chat-root .message-meta.right.user-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

#sm-chat-root .time {
    font-size: 12px;
    color: var(--muted);
}

#sm-chat-root .copy-btn,
#sm-chat-root .references-toggle-btn {
    border: none;
    background: none;
    color: #495467;
    font-size: 12px;
    line-height: 1;
    padding: 5px 6px;
    margin-left: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 26px;
}

#sm-chat-root .retry-question-btn {
    border: none;
    background: transparent;
    color: #6b7280;
    width: 28px;
    height: 28px;
    border-radius: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

#sm-chat-root .retry-question-btn:hover {
    color: #4b5563;
    opacity: 0.9;
}

#sm-chat-root .retry-question-btn svg {
    width: 14px;
    height: 14px;
    transform-origin: 50% 50%;
}

#sm-chat-root .retry-question-btn.is-animating svg {
    animation: sm-retry-spin 0.9s linear infinite;
}

#sm-chat-root .retry-question-btn.is-paused svg {
    animation-play-state: paused;
}

@keyframes sm-retry-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#sm-chat-root .copy-btn.copied {
    color: #495467;
    background: none;
}

#sm-chat-root .suggested-services {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(680px, 82%);
}

#sm-chat-root .suggested-questions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

#sm-chat-root .service-form-readonly-tag {
    font-size: 11px;
    font-weight: 700;
    color: #d97706;
    padding: 2px 8px;
    text-transform: lowercase;
    letter-spacing: 0;
}

#sm-chat-root .service-form-field-readonly .service-form-input,
#sm-chat-root .service-form-field-readonly .service-form-select {
    background: #fff;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e5e9f0;
}

#sm-chat-root .service-form-field-readonly .service-form-checkbox {
    opacity: 0.7;
    cursor: not-allowed;
}

#sm-chat-root .message-references {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(680px, 82%);
}

#sm-chat-root .message-references-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0a5c84;
}

#sm-chat-root .message-references-header svg {
    color: #0a5c84;
    flex-shrink: 0;
}

#sm-chat-root .suggestion-chip {
    display: inline-flex;
    align-items: center;
    width: auto;
    text-align: left;
    padding: 10px 14px;
    margin-bottom: 0;
    border-radius: 10px;
    border: none;
    background: #e9edf5;
    color: #1f2d3d;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sm-chat-root .suggestion-chip:hover {
    background: #f3f5f8;
    border-color: #c8d0da;
}

#sm-chat-root .input-bar {
    flex-shrink: 0;
    min-height: 64px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

#sm-chat-root .chat-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#sm-chat-root .chat-input {
    width: 100%;
    height: 42px;
    max-height: 150px;
    border: 1px solid #d8dce3;
    border-radius: 21px;
    padding: 10px 16px;
    font-size: 15px;
    outline: none;
    background: #fff;
    resize: none;
    overflow-y: hidden;
    line-height: 1.4;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 130, 145, 0.7) transparent;
    -ms-overflow-style: auto;
    overscroll-behavior: contain;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#sm-chat-root .chat-input:focus {
    border-radius: 21px;
    padding: 10px 16px;
}

#sm-chat-root .chat-input::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: transparent;
}

#sm-chat-root .chat-input::-webkit-scrollbar-track {
    background: transparent;
}

#sm-chat-root .chat-input::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(122, 130, 145, 0.72) 0%, rgba(122, 130, 145, 0.48) 100%);
    border-radius: 999px;
    border: 2px solid #fff;
    background-clip: padding-box;
    min-height: 24px;
}

#sm-chat-root .chat-input::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(101, 112, 128, 0.85) 0%, rgba(101, 112, 128, 0.6) 100%);
}

#sm-chat-root .chat-input::placeholder {
    color: #9aa3b7;
}

#sm-chat-root .chat-input-counter {
    align-self: flex-end;
    font-size: 12px;
    line-height: 1;
    color: #7a8291;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

#sm-chat-root .chat-input-counter.at-limit {
    color: #d93025;
}

#sm-chat-root .chat-input.at-limit {
    border-color: #d93025;
}

#sm-chat-root .chat-input.at-limit:focus {
    border-color: #d93025;
    box-shadow: 0 0 0 1px rgba(217, 48, 37, 0.16);
}

#sm-chat-root .send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(90deg, var(--red) 0%, var(--red) 35%, var(--red) 100%);
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    padding-right: 0px;
}

#sm-chat-root .send-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-left: 3px solid #fff;
    border-top: 3px solid #fff;
    transform: translate(-50%, -25%) rotate(45deg);
}

#sm-chat-root .typing-indicator {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0;
    background: transparent;
    border-radius: 18px;
    max-width: fit-content;
    position: relative;
}

#sm-chat-root .typing-indicator span {
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
    display: inline-block;
    animation: sm-typingBounce 1.4s infinite ease-in-out;
}

#sm-chat-root .typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

#sm-chat-root .typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

#sm-chat-root .typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sm-typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

#sm-chat-root .answer-box {
    display: inline;
}

#sm-chat-root .highlight {
    font-weight: 700;
}

#sm-chat-root .ref-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #e4e4e7;
    color: #52525b;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    margin: 0 2px;
    cursor: pointer;
    transition: background-color 0.2s;
    vertical-align: middle;
}

#sm-chat-root .ref-badge:hover {
    background-color: #d1d5db;
    color: #18181b;
}

#sm-chat-root .source-domain-group {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#sm-chat-root .source-domain-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--red);
}

#sm-chat-root .source-domain-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    background: #ddd;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-sizing: border-box;
}

#sm-chat-root .source-domain-favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

#sm-chat-root .source-domain-favicon-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
}

#sm-chat-root .source-domain-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

#sm-chat-root .source-domain-label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sm-chat-root .source-domain-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

#sm-chat-root .source-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

#sm-chat-root .source-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

#sm-chat-root .source-item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#sm-chat-root .source-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sm-chat-root .source-item-url {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sm-chat-root #ref-popup {
    position: absolute;
    z-index: 9999;
    display: none;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    min-width: 240px;
    max-width: 320px;
}

#sm-chat-root #ref-popup.active {
    display: block;
}

#sm-chat-root .ref-popup-num {
    font-size: 11px;
    font-weight: 700;
    color: #a1a1aa;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#sm-chat-root .ref-popup-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

#sm-chat-root .ref-popup-title {
    font-size: 13px;
    font-weight: 600;
    color: #18181b;
    margin-bottom: 0px;
    line-height: 1.4;
    word-break: break-word;
}

#sm-chat-root .ref-popup-url {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    word-break: break-all;
}

#sm-chat-root .ref-popup-url:hover {
    text-decoration: underline;
}

#sm-chat-root .chat-modal.align-end {
    justify-content: flex-end;
}

#sm-chat-root .typing-row {
    display: flex;
    justify-content: flex-start;
    margin: 10px 0;
}

#sm-chat-root .typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: fit-content;
}

#sm-chat-root .typing-indicator span {
    width: 7px;
    height: 7px;
    background: #6b7280;
    border-radius: 50%;
    display: inline-block;

    animation: sm-typingBounce 1.2s infinite ease-in-out;
}

#sm-chat-root .typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

#sm-chat-root .typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sm-typingBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

#sm-chat-root .copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

#sm-chat-root .suggestion-chip {
    border: 1px solid var(--chip-border);
    background: var(--chip);
    color: #334155;
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#sm-chat-root .suggestion-chip:hover {
    background: #f3f5f8;
    border-color: #c8d0da;
}

#sm-chat-root .answer-box {
    display: inline;
}

#sm-chat-root .highlight {
    font-weight: 700;
}

#sm-chat-root .ref-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #c6d9ec;
    color: #52525b;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    margin: 0 2px;
    cursor: pointer;
    transition: background-color 0.2s;
    vertical-align: middle;
}

#sm-chat-root .suggestion-chip {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sm-chat-root .suggestion-chip.active {
    border: 1px solid #94a7c9;
    background: #eff6ff;
}

#sm-chat-root .ref-badge:hover {
    background-color: #d1d5db;
    color: #18181b;
}

#sm-chat-root #ref-popup {
    position: absolute;
    z-index: 99999;
    display: none;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    min-width: 240px;
    max-width: 320px;
}

#sm-chat-root #ref-popup.active {
    display: block;
}

#sm-chat-root .ref-popup-num {
    font-size: 11px;
    font-weight: 700;
    color: #a1a1aa;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#sm-chat-root .ref-popup-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

#sm-chat-root .ref-popup-url {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    word-break: break-all;
}

#sm-chat-root .ref-popup-url:hover {
    text-decoration: underline;
}

#sm-chat-root .chat-window.expanded .chat-and-booking {
    display: flex;
    flex-direction: row;
}

#sm-chat-root .chat-window.expanded #bookingPanel {
    display: flex;
}

#sm-chat-root .chat-and-booking {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

#sm-chat-root .chat-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

#sm-chat-root .booking-panel {
    display: none;
    flex-direction: column;
    width: 300px;
    flex-shrink: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}

#sm-chat-root .booking-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0px 0px 7px;
    height: 46px;
    min-height: 46px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    border-bottom: 1px solid #dcdfe4;
    position: relative;
    margin-top: 11px;
}

#sm-chat-root .booking-panel-header>span {
    flex: 1;
    text-align: center;
}

#sm-chat-root .booking-panel-header .iframe-expand-btn {
    border-left: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

#sm-chat-root .booking-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sm-chat-root .calendly-inline-widget {
    flex: 1;
    min-height: 0;
}

#sm-chat-root .booking-panel {
    display: none;
    flex-direction: column;
    width: 25%;
    flex-shrink: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}

#sm-chat-root .chat-window.expanded .booking-panel {
    display: flex;
}

#sm-chat-root .booking-panel-close-btn {
    display: none;
    font-size: 15px;
}

#sm-chat-root .mwc-row {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px;
    transition: background 0.2s ease;
}

#sm-chat-root .mwc-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1a1a1a;
    flex-shrink: 0;
}

#sm-chat-root .mwc-label {
    font-size: 13.5px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    margin-left: 14px;
    transition: transform 0.18s ease;
    flex: 1;
}

#sm-chat-root .suggested-questions,
#sm-chat-root .suggested-services {
    padding: 10px 0;
}

#sm-chat-root .chips-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
}

#sm-chat-root .suggested-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
}

#sm-chat-root .suggested-header svg {
    color: var(--red);
}

#sm-chat-root .suggestion-chip:hover {
    background: #dde3ee;
}

#sm-chat-root .booking-panel-body {
    position: relative;
}

#sm-chat-root .booking-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
}

#sm-chat-root .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #dce3ef;
    border-top: 3px solid #4a6cf7;
    border-radius: 50%;
    animation: sm-spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes sm-spin {
    to {
        transform: rotate(360deg);
    }
}

#sm-chat-root.booking-loader span {
    font-size: 13px;
    color: #5b6b8c;
}

#sm-chat-root #privacyText {
    font-style: italic;
    color: #94a3b8;
}

#sm-chat-root .privacy-note .powered-link {
    font-weight: 600;
    text-decoration: none;
    color: #0a5c84;
    position: relative;
    font-style: italic;
}

#sm-chat-root .privacy-note .powered-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: var(--mw-primary-soft);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

#sm-chat-root .privacy-note .powered-link:hover {
    color: var(--mw-primary-soft-light);
}

#sm-chat-root .privacy-note .powered-link:hover::after {
    transform: scaleX(1);
}

#sm-chat-root .booking-panel-close-btn {
    display: none;
    font-size: 15px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

#sm-chat-root .services-view {
    padding: 12px;
    overflow-y: auto;
    height: 100%;
}

#sm-chat-root .service-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
}

#sm-chat-root .service-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: none;
}

#sm-chat-root .service-card:hover .service-card-arrow {
    transform: translateX(2px);
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

#sm-chat-root .ai-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid var(--red);
    overflow: hidden;
}

#sm-chat-root .ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

#sm-chat-root .smart-processes-avatar {
    background: #fff;
    border: 1px solid rgba(0, 102, 154, 0.18);
    overflow: hidden;
}

#sm-chat-root .smart-processes-avatar img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

#sm-chat-root .ai-avatar svg {
    width: 18px;
    height: 18px;
}

#sm-chat-root .user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--red) 0%, var(--red) 100%);
    color: #fff;
    border: 1px solid linear-gradient(145deg, var(--red) 0%, var(--red) 100%);
    margin-bottom: 2px;
}

#sm-chat-root .service-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e8f2f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #0a5c84;
}

#sm-chat-root .service-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#sm-chat-root .service-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--red);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sm-chat-root .service-card-url {
    font-size: 11.5px;
    color: #7a8fa6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sm-chat-root .service-card-description {
    display: -webkit-box;
    margin-top: 5px;
    color: #3d5870;
    font-size: 12.5px;
    font-weight: 450;
    line-height: 1.45;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

#sm-chat-root .service-card-description:empty {
    display: none;
}

#sm-chat-root .service-card-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--red);
    border: 1px solid var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}


#sm-chat-root .service-card-arrow svg {
    display: block;
}

#sm-chat-root .suggested-services .service-card {
    width: 100%;
    margin-bottom: 0;
    flex: 1 1 100%;
}

#sm-chat-root .suggested-services .service-card:hover {
    transform: translateX(2px);
}
    

#sm-chat-root .suggested-services .suggested-header {
    flex: 0 0 100%;
}

#sm-chat-root .suggested-service-card .service-card-title,
#sm-chat-root .suggested-service-card .service-card-url,
#sm-chat-root .suggested-service-card .service-card-description {
    white-space: normal;
}

#sm-chat-root .service-card--form .service-card-icon {
    background: rgba(10, 92, 132, 0.12);
    color: #0a5c84;
}

#sm-chat-root .service-card-action {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#sm-chat-root .service-card-action-form {
    background: var(--red);
    color: #fff;
}

#sm-chat-root .service-card--disabled {
    cursor: default;
    opacity: 0.62;
    pointer-events: none;
}

#sm-chat-root .service-iframe-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#sm-chat-root .service-iframe-toolbar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dfe3e8;
    flex-shrink: 0;
}

#sm-chat-root .services-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: none;
    border: none;
    font-size: 13px;
    color: #0a5c84;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    transition: background 0.15s ease;
}

#sm-chat-root .services-back-btn:hover {
    background: #f0f4f8;
}

#sm-chat-root .iframe-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-left: 1px solid #dfe3e8;
    color: #7a8fa6;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

#sm-chat-root .iframe-expand-btn:hover {
    background: #f0f4f8;
    color: #0a5c84;
}

#sm-chat-root .service-iframe-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#sm-chat-root .service-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#sm-chat-root .service-form-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.54);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#sm-chat-root .service-form-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#sm-chat-root .service-form-modal-sheet {
    width: min(620px, 100%);
    height: 90%;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.25s ease;
}

#sm-chat-root .service-form-modal-overlay.active .service-form-modal-sheet {
    transform: translateY(0) scale(1);
}

#sm-chat-root .service-form-modal-header {
    padding: 18px 20px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(12, 34, 56, 0.08);
    background: var(--red);
}

#sm-chat-root .service-form-modal-heading {
    min-width: 0;
}

#sm-chat-root .service-form-modal-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    word-break: break-word;
    padding: 8px;
}

#sm-chat-root .service-form-label {
    color: #0f3b52;
    font-weight: 600;
}

#sm-chat-root .service-form-required {
    color: #c53030;
    margin-left: 6px;
    font-weight: 800;
}

#sm-chat-root input,
#sm-chat-root select,
#sm-chat-root textarea {
    border-radius: 12px;
    padding: 10px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 18px rgba(15, 23, 42, 0.04);
    border: 1.5px solid #e5e7eb;
    color: #000;
    width: 100%;
}

#sm-chat-root input:focus,
#sm-chat-root select:focus,
#sm-chat-root textarea:focus {
    border-radius: 12px;
    padding: 10px;
    background: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 6px 18px rgba(15, 23, 42, 0.04);
    border: 1.5px solid #e5e7eb;
    color: #000;
    outline: none;
}

#sm-chat-root input::placeholder,
#sm-chat-root textarea::placeholder {
    color: #9aa7b3;
}

#sm-chat-root .checkbox {
    padding: 12px;
    border-radius: 12px;
}

#sm-chat-root .service-form-field-invalid input,
#sm-chat-root .service-form-field-invalid textarea,
#sm-chat-root .service-form-field-invalid select {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.06);
}

#sm-chat-root .service-form-button.secondary {
    background: linear-gradient(180deg, #f3f7fb, #eef6fb);
    color: #0f3b52;
    border: 1px solid rgba(15, 59, 82, 0.04);
    padding: 10px 18px;
    border-radius: 999px;
}

#sm-chat-root .service-form-button.primary {
    background: linear-gradient(90deg, #0b5071, #1483b6);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(11, 80, 113, 0.18);
}

#sm-chat-root .service-form-modal-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}

#sm-chat-root .service-form-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#sm-chat-root .service-form-modal-close:hover {
    transform: translateY(-1px);
}

#sm-chat-root .service-form-modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

#sm-chat-root .service-form-fields {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 130, 145, 0.7) transparent;
    -ms-overflow-style: auto;
    overscroll-behavior: contain;
}

#sm-chat-root .service-form-fields::-webkit-scrollbar {
    width: 10px;
}

#sm-chat-root .service-form-fields::-webkit-scrollbar-track {
    background: rgba(122, 130, 145, 0.10);
    border-radius: 999px;
    margin: 6px 0;
}

#sm-chat-root .service-form-fields::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(122, 130, 145, 0.72) 0%, rgba(122, 130, 145, 0.48) 100%);
    border-radius: 999px;
    border: 3px solid #fff;
    background-clip: padding-box;
    min-height: 24px;
}

#sm-chat-root .service-form-fields::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(101, 112, 128, 0.85) 0%, rgba(101, 112, 128, 0.6) 100%);
}

#sm-chat-root .service-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#sm-chat-root .service-form-field-checkbox {
    gap: 0;
}

#sm-chat-root .service-form-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
    line-height: 1.35;
    font-family: system-ui, sans-serif;
}

#sm-chat-root .service-form-required {
    color: red;
}

#sm-chat-root .service-form-input,
#sm-chat-root .service-form-select,
#sm-chat-root .service-form-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(13, 40, 60, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: system-ui, sans-serif;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    color: #0f3b52;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.12s;
    height: 44px;
}

#sm-chat-root .service-form-input:focus,
#sm-chat-root .service-form-select:focus,
#sm-chat-root .service-form-textarea:focus {
    border-color: rgba(10, 92, 132, 0.55);
    box-shadow: 0 0 0 3px rgba(10, 92, 132, 0.12);
}

#sm-chat-root .service-form-textarea {
    resize: vertical;
    min-height: 104px;
    height: auto;
}

#sm-chat-root .service-form-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #0a5c84 50%), linear-gradient(135deg, #0a5c84 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 1px), calc(100% - 13px) calc(1em + 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

#sm-chat-root .service-form-input[readonly],
#sm-chat-root .service-form-input[disabled],
#sm-chat-root .service-form-select[disabled],
#sm-chat-root .service-form-textarea[readonly],
#sm-chat-root .service-form-textarea[disabled] {
    background: linear-gradient(180deg, #fbfbfb, #f7f9fb);
    color: #6b7684;
    cursor: not-allowed;
    box-shadow: none;
}

#sm-chat-root .service-form-input::placeholder,
#sm-chat-root .service-form-textarea::placeholder {
    color: #9aa7b3;
}

#sm-chat-root .service-form-input:focus,
#sm-chat-root .service-form-select:focus,
#sm-chat-root .service-form-textarea:focus {
    border-color: rgba(10, 92, 132, 0.7);
    box-shadow: 0 6px 18px rgba(10, 92, 132, 0.08);
    transform: translateY(-1px);
}

#sm-chat-root .service-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d7e1eb;
    border-radius: 14px;
    background: #f8fbff;
    cursor: pointer;
}

#sm-chat-root .service-form-checkbox input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #0a5c84;
}

#sm-chat-root .service-form-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#sm-chat-root .service-form-help {
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

#sm-chat-root .service-form-empty {
    padding: 14px;
    border: 1px dashed #d7e1eb;
    border-radius: 14px;
    color: #64748b;
    font-size: 13px;
    background: #fafcff;
}

#sm-chat-root .service-form-status {
    padding: 0 20px 12px;
    min-height: 20px;
    font-size: 12px;
    color: #64748b;
}

#sm-chat-root .service-form-status[data-state="error"] {
    color: #b91c1c;
}

#sm-chat-root .service-form-status[data-state="success"] {
    color: #0f766e;
}

#sm-chat-root .service-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 20px;
    border-top: 1px solid #edf2f7;
    background: #fbfcfe;
}

#sm-chat-root .service-form-button {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#sm-chat-root .service-form-button.secondary {
    background: #eef4f9;
    color: var(--red);
}

#sm-chat-root .service-form-button.secondary:hover {
    transform: translateY(-1px);
}

#sm-chat-root .service-form-button.primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 10px 22px rgba(0, 102, 154, 0.18);
}

#sm-chat-root .service-form-button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 102, 154, 0.22);
}

#sm-chat-root .service-form-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#sm-chat-root .chat-window.compact {
    transform: scale(0.8) !important;
}

#sm-chat-root .chat-window.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8) !important;
    transform-origin: center center;
}

@media (max-width: 768px) {
    #sm-chat-root .service-form-modal-overlay {
        align-items: center;
        justify-content: center;
        padding: 16px;
    }

    #sm-chat-root .service-form-modal-sheet {
        width: 100%;
        height: 80%;
        max-height: 80%;
        border-radius: 22px;
    }

    #sm-chat-root .service-form-modal-header {
        padding: 16px;
    }

    #sm-chat-root .service-form-fields {
        padding: 16px;
    }

    #sm-chat-root .service-form-status {
        padding: 0 16px 12px;
    }

    #sm-chat-root .service-form-footer {
        padding: 12px 16px 16px;
    }
}

@media (max-width: 320px) {
    #sm-chat-root .service-form-modal-title {
        font-size: 13px;
    }

    #sm-chat-root .web-assist-header {
        display: flex;
        flex-direction: column;
        gap: 0px !important;
    }

    #sm-chat-root .web-assist-header i {
        margin-top: 0px !important;
    }

    #sm-chat-root .source-services-btn-toggle {
        margin-right: 10px ;
    }
}

#sm-chat-root .chat-window.panel-expanded #chatMain {
    flex: 0 0 40%;
    min-width: 0;
}

#sm-chat-root .chat-window.panel-expanded .booking-panel {
    flex: 1 1 0 !important;
    width: auto !important;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

#sm-chat-root .chat-window.panels-swapped #chatMain {
    order: 2;
}

#sm-chat-root .chat-window.panels-swapped .booking-panel {
    order: 1;
    border-left: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

#sm-chat-root .chat-window.panels-swapped .booking-panel-header {
    margin-top: 8px;
}

#sm-chat-root .booking-panel {
    position: relative;
}

#sm-chat-root .booking-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    z-index: 10;
    transition: background 0.15s ease;
}

#sm-chat-root .booking-resize-handle::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 32px;
    border-radius: 2px;
    background: #c8d4de;
    opacity: 0;
    transition: opacity 0.15s ease;
}

#sm-chat-root .booking-resize-handle:hover::after {
    opacity: 1;
}

#sm-chat-root .booking-resize-handle:hover {
    background: rgba(10, 92, 132, 0.07);
}

#sm-chat-root .chat-window.panels-swapped .booking-resize-handle {
    left: auto;
    right: 0;
}

#sm-chat-root .chat-window.panels-swapped .booking-resize-handle::after {
    left: auto;
    right: 2px;
}

#sm-chat-root .bot-avatar-fallback-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef3f9;
    color: var(--red);
    font-weight: 700;
    font-size: 12px;
    border-radius: 50%;
}

@media (max-width: 768px) {
    #sm-greeting-bubble {
        right: 15px !important;
        bottom: 88px !important;
        position: fixed !important;
    }

    #sm-chat-root .chat-modal {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
        padding-bottom: 0;
        padding-right: 0;
        background: rgba(20, 24, 31, 0.35);
    }

    #sm-chat-root .service-form-modal-title {
        font-size: 17px;
    }

    #sm-chat-root .chat-window,
    #sm-chat-root .chat-window.compact {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: 100vw;
        max-height: 100dvh;

        border-radius: 0;

        transform: none !important;
        transform-origin: center;
    }

    #sm-chat-root .chat-modal.align-end {
        padding-bottom: 0px;
        padding-right: 0px;
    }

    #sm-chat-root .chat-input {
        font-size: 16px !important;
    }

    #sm-chat-root .topbar {
        height: 80px;
        min-height: 80px;
    }

    #sm-chat-root .bot-avatar {
        position: absolute;
        left: 18px;
        top: 28px;
        width: 78px;
        height: 78px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 3;
        border-radius: 50%;
        background: rgb(255, 255, 255);
        border-width: 4px;
        border-style: solid;
        border-color: var(--red);
        border-image: initial;
    }

    #sm-chat-root .bot-avatar .face,
    #sm-chat-root .bot-avatar .face img {
        width: 48px;
        height: 48px;
    }

    #sm-chat-root .circular-text {
        width: 80px;
        height: 80px;
        top: 50%;
    }

    #sm-chat-root .circle-text-style {
        font-size: 6px;
        letter-spacing: 1.2px;
    }

    #sm-chat-root .header-status {
        margin-left: 82px;
    }

    #sm-chat-root .privacy-note,
    #sm-chat-root .chat-window.compact .privacy-note {
        padding: 0px 12px 8px;
        font-size: 12px;
    }


    #sm-chat-root .welcome-card {
        max-width: 100%;
        padding: 14px 14px 10px;
    }

    #sm-chat-root .welcome-title,
    #sm-chat-root .welcome-text,
    #sm-chat-root .welcome-footer,
    #sm-chat-root .service-list li,
    #sm-chat-root .message {
        font-size: 14px;
    }

    #sm-chat-root .message.user {
        max-width: 82%;
    }

    #sm-chat-root .suggested-questions,
    #sm-chat-root .suggested-services,
    #sm-chat-root .message-references {
        margin-left: 10px;
    }

    #sm-chat-root .window-actions {
        display: flex;
        align-items: center;
        gap: 3px;
    }

    #sm-chat-root .toggle-btn-desktop {
        display: none !important;
    }

    #sm-chat-root .toggle-btn-mobile {
        display: inline-flex !important;
    }

    #sm-chat-root .swap-panels-btn {
        display: none !important;
    }

    #sm-chat-root .booking-panel {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;
        flex-direction: column;
        background: #fff;
        border-left: none;
        width: 100%;
        height: auto;
    }

    #sm-chat-root .booking-panel.mobile-open {
        display: flex !important;
    }

    #sm-chat-root .source-services-btn-toggle {
        margin-left: auto;
        order: 9;
    }

    #sm-chat-root .booking-panel-close-btn {
        display: none !important;
    }

    #sm-chat-root .booking-panel-body {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 0;
        background: #fff;
    }

    #sm-chat-root .services-view {
        flex: 1;
        overflow-y: auto;
        height: auto;
        padding: 12px;
    }

    #sm-chat-root .service-iframe-view {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        margin-top: 20px;
    }

    #sm-chat-root .service-iframe-container {
        flex: 1;
        overflow: hidden;
    }

    #sm-chat-root .service-iframe-container iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

    #sm-chat-root #servicesExpandBtn {
        display: none !important;
    }

    #sm-chat-root .booking-resize-handle {
        display: none;
    }

    #sm-chat-root .chat-window.expanded .booking-panel {
        display: none !important;
    }

    #sm-chat-root .chat-window.expanded .booking-panel.mobile-open {
        display: flex !important;
    }

    #sm-chat-root .topbar {
        position: relative;
        z-index: 10001;
    }

    #sm-chat-root .chat-window.expanded .booking-panel.mobile-open {
        display: flex !important;
    }

    #sm-chat-root .chat-main {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }

    #sm-chat-root .chat-body {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 20px;
    }

    #sm-chat-root .input-bar {
        flex-shrink: 0;
        position: relative;
        bottom: auto;
        background: var(--bg);
        z-index: 10;
    }

    #sm-chat-root .privacy-note {
        flex-shrink: 0;
        position: relative;
        bottom: auto;
        background: var(--bg);
        z-index: 9;
    }

}

@media (max-width: 480px) {
    #sm-chat-root .window-actions {
        gap: 3px;
    }

    #sm-chat-root .window-actions button {
        width: 26px;
        height: 26px;
        font-size: 15px;
    }

    #sm-chat-root .bot-avatar {
        width: 58px;
        height: 58px;
        top: 50%;
    }

    #sm-chat-root .bot-avatar .face,
    #sm-chat-root .bot-avatar .face img {
        width: 42px;
        height: 42px;
    }

    #sm-chat-root .header-status {
        margin-left: 74px;
    }

    #sm-chat-root .chat-body {
        padding: 30px 10px 16px;
    }

    #sm-chat-root .message.bot,
    #sm-chat-root .message.user,
    #sm-chat-root .suggested-questions,
    #sm-chat-root .suggested-services,
    #sm-chat-root .message-references {
        max-width: 100%;
    }

    #sm-chat-root .suggested-questions,
    #sm-chat-root .suggested-services,
    #sm-chat-root .message-references {
        margin-left: 0;
        max-width: 100%;
    }

    #sm-chat-root .circular-text {
        width: 72px;
        height: 72px;
        top: 50%;
    }

    #sm-chat-root .circle-text-style {
        font-size: 5.5px;
        letter-spacing: 1px;
    }

    #sm-chat-root .chat-modal.align-end {
        justify-content: flex-end;
        align-items: flex-end;
        padding: 0 !important;
    }
}

#sm-chat-root .services-search-wrap {
    position: relative;
    padding: 0 0 10px 0;
}

#sm-chat-root .services-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary, #888);
    pointer-events: none;
    margin-top: -5px;
}

#sm-chat-root .services-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px 8px 34px;
    border: 0.5px solid var(--color-border-secondary, #ccc);
    border-radius: 12px;
    font-size: 13px;
    background: var(--color-background-primary, #fff);
    color: var(--color-text-primary, #111);
    outline: none;
}

#sm-chat-root .services-search:focus {
    border-color: var(--color-border-primary, #999);
}

#sm-chat-root .services-no-results {
    font-size: 13px;
    color: var(--color-text-secondary, #888);
    text-align: center;
    padding: 20px 0;
}

#sm-chat-root .chat-window.compact .chat-and-booking {
    flex-direction: column !important;
}

#sm-chat-root .chat-window.compact #bookingPanel {
    display: none !important;
}

@keyframes sm-stepIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sm-stepOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-6px) scale(0.95);
    }
}

#sm-chat-root .pipeline-step {
    animation: sm-stepIn 0.3s cubic-bezier(.2, .8, .3, 1) both;
}

#sm-chat-root .pipeline-step.exiting {
    animation: sm-stepOut 0.25s ease-in forwards;
}

#sm-chat-root .pipeline-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

#sm-chat-root .pipeline-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    opacity: 0;
    animation: sm-stepFadeIn 0.3s ease forwards;
    transition: color 0.3s ease;
}

#sm-chat-root .pipeline-step:last-child:not(.done) {
    color: var(--red);
}

#sm-chat-root .pipeline-step.done {
    color: #9ca3af;
}

#sm-chat-root .step-icon {
    font-size: 11px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

#sm-chat-root .source-services-btn-toggle {
    border: none;
    background: none;
    cursor: pointer;
}

.pipeline-step:last-child:not(.done) .step-icon {
    display: inline-block;
    animation: sm-stepSpin 1.2s linear infinite;
    color: var(--red);
}

#sm-chat-root .pipeline-step.done .step-icon {
    animation: sm-stepPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    color: #10b981;
}

#sm-chat-root .step-label {
    font-size: 12px;
    letter-spacing: 0.01em;
}

@keyframes sm-stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sm-stepSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes sm-stepPop {
    0% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.inline-references-wrapper {
    max-width: 100%;
    animation: refsFadeIn 0.25s ease;
}

@keyframes refsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inline-references-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--red);
    margin-bottom: 6px;
    padding-left: 2px;
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.inline-references-wrapper .references-list {
    background: #fff;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 130, 145, 0.7) transparent;
    -ms-overflow-style: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.inline-references-wrapper .references-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.inline-references-wrapper .references-list::-webkit-scrollbar-track {
    background: rgba(122, 130, 145, 0.10);
    border-radius: 999px;
    margin: 6px 0;
}

.inline-references-wrapper .references-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(122, 130, 145, 0.72) 0%, rgba(122, 130, 145, 0.48) 100%);
    border-radius: 999px;
    border: 3px solid #fff;
    background-clip: padding-box;
    min-height: 24px;
}

.inline-references-wrapper .references-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(101, 112, 128, 0.85) 0%, rgba(101, 112, 128, 0.6) 100%);
}

.inline-references-wrapper .source-domain-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.inline-references-wrapper .source-domain-group:last-child {
    border-bottom: none;
}

.inline-references-wrapper .source-domain-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 4px;
}

.inline-references-wrapper .source-domain-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inline-references-wrapper .source-domain-favicon {
    width: 14px;
    height: 14px;
}

.inline-references-wrapper .source-domain-favicon-fallback {
    font-size: 9px;
    font-weight: 700;
    color: #9aa3b2;
}

.inline-references-wrapper .source-domain-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
}

.inline-references-wrapper .source-domain-items {
    display: flex;
    flex-direction: column;
}

.inline-references-wrapper .source-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 30px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.inline-references-wrapper .source-item:hover {
    background: #f7f8fa;
}

.inline-references-wrapper .source-item:last-child {
    padding-bottom: 10px;
}

.inline-references-wrapper .source-item .ref-badge {
    display: none;
}

.inline-references-wrapper .source-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.inline-references-wrapper .source-item-title {
    font-size: 12.5px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-references-wrapper .source-item-url {
    font-size: 11px;
    color: #b0b8c4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sm-chat-root .chat-window.compact .inline-references-wrapper .source-domain-header {
    display: none;
}

#sm-chat-root .chat-window.compact .inline-references-wrapper .source-domain-group {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

#sm-chat-root .chat-window.compact .inline-references-wrapper .references-list {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

#sm-chat-root .chat-window.compact .inline-references-wrapper .source-domain-group {
    border-bottom: none;
}

#sm-chat-root .chat-window.compact .inline-references-wrapper .source-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transform: none;
    padding-left: 12px;
}

#sm-chat-root .chat-window.compact .inline-references-wrapper .source-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: none;
}

@media (max-width: 768px) {
    #sm-chat-root .inline-references-wrapper .source-domain-group {
        max-height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    #sm-chat-root .source-services-btn-toggle {
        margin-right: 10px ;
    }

    #sm-chat-root .inline-references-wrapper .source-domain-group::-webkit-scrollbar {
        width: 6px;
    }

    #sm-chat-root .inline-references-wrapper .source-domain-group::-webkit-scrollbar-track {
        background: transparent;
    }

    #sm-chat-root .source-domain-group {
        border: none;
    }

    #sm-chat-root .inline-references-wrapper .source-domain-group::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.25);
        border-radius: 999px;
    }

    #sm-chat-root .inline-references-wrapper .source-domain-group::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.4);
    }

    #sm-chat-root .inline-references-wrapper .source-domain-header {
        display: none;
    }

    #sm-chat-root .inline-references-wrapper .source-item {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
        transform: none;
        padding-left: 12px;
    }

    #sm-chat-root .inline-references-wrapper .source-item:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        transform: none;
    }

    .inline-references-wrapper {
        margin-left: 0;
        max-width: 100%;
    }

    #sm-chat-root .chat-window.compact #bookingPanel.mobile-open {
        display: flex !important;
    }

    #sm-chat-root .service-form-input,
    #sm-chat-root .service-form-select,
    #sm-chat-root .service-form-textarea {
        font-size: 16px !important;
    }
}

.service-form-field-invalid .service-form-input,
.service-form-field-invalid .service-form-textarea,
.service-form-field-invalid .service-form-select {
    border-color: #e53e3e !important;
}

.service-form-field-error {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
}

.source-item-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f3f7;
}

.ref-badge {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f8;
}

.ref-badge-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ref-badge .source-domain-favicon-fallback {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
}

.references-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.references-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.references-modal-sheet {
    background: #fff;
    width: 100%;
    max-height: 60%;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.references-modal-overlay.active .references-modal-sheet {
    transform: translateY(0);
}

.references-modal-handle {
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.references-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 12px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.references-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--red);
}

.references-modal-body {
    overflow-y: auto;
    padding: 12px 16px 20px;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 130, 145, 0.7) transparent;
    -ms-overflow-style: auto;
    overscroll-behavior: contain;
}

.references-modal-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.references-modal-body::-webkit-scrollbar-track {
    background: rgba(122, 130, 145, 0.10);
    border-radius: 999px;
    margin: 6px 0;
}

.references-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(122, 130, 145, 0.72) 0%, rgba(122, 130, 145, 0.48) 100%);
    border-radius: 999px;
    border: 3px solid #fff;
    background-clip: padding-box;
    min-height: 24px;
}

.references-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(101, 112, 128, 0.85) 0%, rgba(101, 112, 128, 0.6) 100%);
}

#sm-greeting-bubble {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 260px;
    max-width: 260px;
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 30px 14px 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    transform-origin: bottom right;
    z-index: 999998;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    isolation: isolate;
    display: flex;
    align-items: center;
}

#sm-greeting-bubble::before {
    content: "";
    position: absolute;
    right: 30px;
    bottom: -9px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    filter: drop-shadow(0 4px 3px rgba(15, 23, 42, .06));
    z-index: 0;
}

.sm-greeting-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .10);
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    transition: background .15s ease, color .15s ease;
}

.sm-greeting-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.sm-greeting-text {
    display: block;
}

#sm-greeting-bubble.visible {
    animation: sm-bubble-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes sm-bubble-pop {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.9);
    }

    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#sm-greeting-bubble.pulsing {
    animation: sm-bubble-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        sm-bubble-pulse 1.8s ease-in-out 0.45s infinite;
}

@keyframes sm-bubble-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

#sm-greeting-bubble::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: -6px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 8px solid #ffffff;
    z-index: 1;
}

.sm-greeting-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.5px solid var(--red);
}

.sm-greeting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}

.sm-greeting-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--red);
    line-height: 1.3;
}

.sm-greeting-subtitle {
    font-size: 10px;
    font-weight: 400;
    color: #8a94a6;
}

#chatWindow {
    opacity: 0;
    transform: translateY(32px) scale(0.92);
    transform-origin: bottom right;
}

.chat-modal.active #chatWindow {
    animation: sm-chat-open 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sm-chat-open {
    0% {
        opacity: 0;
        transform: translateY(32px) scale(0.92);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}