#movecore-chat-root,
#movecore-chat-widget-root {
    --movecore-chat-accent: #ff5b0b;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#movecore-chat-root *,
#movecore-chat-widget-root * {
    box-sizing: border-box;
}

#movecore-chat-root [hidden],
#movecore-chat-widget-root [hidden] {
    display: none !important;
}

body.movecore-chat-ready .caligo-back-to-top {
    right: 100px;
}

body.mt-body .movecore-chat-button {
    display: none;
}

body.mt-body .movecore-chat-panel {
    bottom: 0;
}

.movecore-chat-button {
    appearance: none;
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    background: var(--movecore-chat-accent);
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .24);
    display: grid;
    place-items: center;
    line-height: 0;
    overflow: visible;
    cursor: pointer;
}

.movecore-chat-button__icon {
    display: block;
    width: 35px;
    height: 35px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    shape-rendering: geometricPrecision;
}

.movecore-chat-button__icon path {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.movecore-chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(380px, calc(100vw - 28px));
    max-height: min(660px, calc(100vh - 120px));
    padding: 0 !important;
    display: grid;
    grid-template-rows: auto minmax(180px, 1fr) auto;
    background: #fff;
    color: #111827;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    box-shadow: 0 22px 58px rgba(15, 23, 42, .22);
    overflow: hidden;
}

.movecore-chat-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #0f172a;
    color: #fff;
}

.movecore-chat-head strong,
.movecore-chat-head small {
    display: block;
}

.movecore-chat-head strong {
    font-size: 16px;
    line-height: 1.2;
}

.movecore-chat-head small {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
}

.movecore-chat-close {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.movecore-chat-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
    overflow-y: auto;
    padding: 14px;
    background: #f8fafc;
}

.movecore-chat-empty,
.movecore-chat-error {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.35;
}

.movecore-chat-empty {
    color: #64748b;
    background: #fff;
    border: 1px dashed #cbd5e1;
}

.movecore-chat-error {
    color: #991b1b;
    background: #fee2e2;
}

.movecore-chat-message {
    width: fit-content;
    max-width: 86%;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 9px 11px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.movecore-chat-message.is-mine {
    align-self: flex-end;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.movecore-chat-message strong,
.movecore-chat-message small {
    display: block;
}

.movecore-chat-message strong {
    font-size: 12px;
    margin-bottom: 5px;
}

.movecore-chat-message p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.42;
    font-size: 14px;
}

.movecore-chat-message small {
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
}

.movecore-chat-actions {
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.movecore-chat-request {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--movecore-chat-accent);
    border-radius: 10px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--movecore-chat-accent) 14%, #fff), #fff);
    color: var(--movecore-chat-accent);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.movecore-chat-request:hover,
.movecore-chat-request:focus-visible {
    color: #fff;
    background: var(--movecore-chat-accent);
    outline: none;
}

.movecore-chat-start,
.movecore-chat-compose {
    display: grid;
    gap: 9px;
    padding: 14px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.movecore-chat-start input,
.movecore-chat-start textarea,
.movecore-chat-compose textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 11px;
    color: #111827;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.movecore-chat-start textarea,
.movecore-chat-compose textarea {
    resize: vertical;
}

.movecore-chat-start input:focus,
.movecore-chat-start textarea:focus,
.movecore-chat-compose textarea:focus {
    outline: none;
    border-color: var(--movecore-chat-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--movecore-chat-accent) 18%, transparent);
}

.movecore-chat-start button,
.movecore-chat-compose button {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--movecore-chat-accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.movecore-chat-start button:disabled,
.movecore-chat-compose button:disabled {
    opacity: .65;
    cursor: progress;
}

@media (max-width: 520px) {
    #movecore-chat-root,
    #movecore-chat-widget-root {
        right: 14px;
        bottom: 14px;
    }

    body.movecore-chat-ready .caligo-back-to-top {
        right: 88px;
    }

	.movecore-chat-panel {
	    right: -2px;
	    bottom: 72px;
	}
}

.movecore-chat-placement {
    appearance: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.movecore-chat-placement--button {
    position: relative;
    min-height: 54px;
    padding: 12px 24px;
    border: 1px solid #ff5b0b;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 91, 11, .12), rgba(4, 13, 27, .92));
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 91, 11, .24), 0 12px 28px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
    text-transform: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.movecore-chat-placement--button:hover,
.movecore-chat-placement--button:focus-visible {
    border-color: #ff7a2f;
    color: #fff;
    box-shadow: 0 0 24px rgba(255, 91, 11, .38), 0 14px 32px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .1);
    transform: translateY(-1px);
    outline: none;
}

.movecore-chat-placement--link {
    color: #ff5b0b;
    text-decoration: underline;
    text-underline-offset: 4px;
}
