
.gmf-chat-widget-shell {
    position: relative;
    width: min(100%, 360px);
    display: grid;
    justify-items: end;
    gap: 12px;
}

.gmf-chat-widget__launcher {
    appearance: none;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #ffffff;
    border-radius: 999px;
    padding: 12px 16px;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.gmf-chat-widget {
    width: min(100%, 360px);
    border: 1px solid #d4d7dd;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    font-family: Arial, sans-serif;
    overflow: hidden;
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transition: opacity 160ms ease, transform 160ms ease;
}

.gmf-chat-widget-shell--open .gmf-chat-widget {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.gmf-chat-widget--pending {
    opacity: 0.98;
}

.gmf-chat-widget__header {
    padding: 16px 18px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.gmf-chat-widget__title {
    min-width: 0;
}

.gmf-chat-widget__header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gmf-chat-widget__icon-button {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 999px;
    padding: 6px 10px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.gmf-chat-widget__body {
    padding: 14px;
    color: #1f2937;
    display: grid;
    gap: 12px;
    background: #f8fafc;
}

.gmf-chat-widget__messages {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.gmf-chat-widget__message {
    display: flex;
}

.gmf-chat-widget__bubble {
    max-width: 100%;
    border-radius: 14px;
    padding: 12px 14px;
    line-height: 1.5;
    font-size: 14px;
    border: 1px solid #dbe2ea;
}

.gmf-chat-widget__bubble--assistant {
    background: #ffffff;
}

.gmf-chat-widget__bubble--user {
    margin-left: auto;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.gmf-chat-widget__message-text {
    white-space: pre-wrap;
}

.gmf-chat-widget__sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.gmf-chat-widget__source {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
    font-size: 12px;
}

.gmf-chat-widget__source:hover {
    text-decoration: underline;
}

.gmf-chat-widget__footer {
    display: grid;
    gap: 6px;
}

.gmf-chat-widget__toolbar {
    display: flex;
    justify-content: flex-end;
}

.gmf-chat-widget__status {
    font-size: 12px;
    color: #475569;
    min-height: 18px;
}

.gmf-chat-widget__status--ok {
    color: #166534;
}

.gmf-chat-widget__status--error {
    color: #b91c1c;
}

.gmf-chat-widget__link-button {
    appearance: none;
    background: transparent;
    border: 0;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    padding: 0;
    text-decoration: underline;
}

.gmf-chat-widget__composer {
	display: flex;
	flex-direction: column;
}

.gmf-chat-widget__composer textarea {
    min-width: 0;
    min-height: 48px;
    max-height: 140px;
    resize: none;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font: inherit;
    background: #ffffff;
    line-height: 1.5;
}

.gmf-chat-widget__composer button {
    appearance: none;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
	margin: 0.5rem 0 0 0;
	padding: 0.25rem 0.5rem;
    font: inherit;
    cursor: pointer;
}

.gmf-chat-widget__composer button:disabled,
.gmf-chat-widget__composer textarea:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .gmf-chat-widget-shell,
    .gmf-chat-widget {
        width: min(100%, 100%);
    }
}
