/* Oxton Chat — padrão visual Oxton: sem sombras, sem animações, bordas finas. */
.oxc {
	--oxc-color: #1a3af0;
	--oxc-navy: #0b1640;
	--oxc-line: #e4e6eb;
	--oxc-muted: #5b6472;
	position: fixed;
	bottom: 20px;
	z-index: 9990;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
}

.oxc--right {
	right: 20px;
}

.oxc--left {
	left: 20px;
}

.oxc *,
.oxc *::before,
.oxc *::after {
	box-sizing: border-box;
}

.oxc-icon {
	display: inline-grid;
	place-items: center;
}

/* Botão de abrir */
.oxc-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 52px;
	padding: 0 20px 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--oxc-color);
	color: #fff;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

.oxc-launcher:hover {
	background: var(--oxc-navy);
}

.oxc.is-open .oxc-launcher__label {
	display: none;
}

.oxc.is-open .oxc-launcher {
	padding: 0 16px;
}

/* Janela */
.oxc-panel {
	position: absolute;
	bottom: 66px;
	display: flex;
	flex-direction: column;
	width: 380px;
	height: min(600px, calc(100vh - 120px));
	overflow: hidden;
	border: 1px solid var(--oxc-line);
	border-radius: 16px;
	background: #fff;
}

.oxc--right .oxc-panel {
	right: 0;
}

.oxc--left .oxc-panel {
	left: 0;
}

.oxc-panel[hidden] {
	display: none;
}

.oxc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 14px 16px;
	background: var(--oxc-navy);
	color: #fff;
}

.oxc-avatar {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
}

.oxc-avatar--letter {
	display: grid;
	place-items: center;
	background: var(--oxc-color);
	font-weight: 600;
}

.oxc-head__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.oxc-head__text strong {
	font-size: 15px;
	font-weight: 600;
}

.oxc-status {
	color: #b8c2e0;
	font-size: 12px;
}

.oxc-status.is-online::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: #34c77b;
}

.oxc-head__btn {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: #cfd6ee;
	cursor: pointer;
}

.oxc-head__btn:hover {
	background: rgba(255, 255, 255, .1);
	color: #fff;
}

/* Conversa */
.oxc-log {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	padding: 16px;
	background: #f7f9fd;
	scrollbar-width: thin;
	scrollbar-color: #d9dde6 transparent;
}

.oxc-msg {
	display: flex;
}

.oxc-msg--user {
	justify-content: flex-end;
}

.oxc-bubble {
	max-width: 88%;
	padding: 10px 13px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--oxc-line);
	color: #1c2434;
	overflow-wrap: anywhere;
}

.oxc-msg--bot .oxc-bubble {
	border-bottom-left-radius: 4px;
}

.oxc-msg--user .oxc-bubble {
	border-color: var(--oxc-color);
	border-bottom-right-radius: 4px;
	background: var(--oxc-color);
	color: #fff;
}

.oxc-bubble p {
	margin: 0 0 8px;
}

.oxc-bubble p:last-child {
	margin-bottom: 0;
}

.oxc-bubble a {
	color: var(--oxc-color);
}

.oxc-bubble strong {
	font-weight: 600;
}

.oxc-list {
	margin: 8px 0 0;
	padding-left: 18px;
}

.oxc-typing .oxc-bubble {
	color: var(--oxc-muted);
	font-style: italic;
}

/* Cursos */
.oxc-courses {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.oxc-course {
	display: flex;
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--oxc-line);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	text-decoration: none;
}

.oxc-bubble a.oxc-course {
	color: inherit;
}

.oxc-course:hover {
	border-color: var(--oxc-color);
}

.oxc-course__img {
	flex: 0 0 auto;
	width: 64px;
	height: 48px;
	border-radius: 7px;
	background: #eef1fe;
	object-fit: cover;
}

.oxc-course__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.oxc-course__title {
	color: var(--oxc-navy);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
}

.oxc-course__meta {
	color: var(--oxc-muted);
	font-size: 12px;
}

.oxc-course__price {
	color: var(--oxc-color);
	font-size: 13px;
	font-weight: 600;
}

.oxc-progress {
	display: block;
	height: 5px;
	margin-top: 4px;
	overflow: hidden;
	border-radius: 999px;
	background: #e7eaf2;
}

.oxc-progress__bar {
	display: block;
	height: 100%;
	background: var(--oxc-color);
}

/* Ações e sugestões */
.oxc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.oxc-action {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border: 1px solid var(--oxc-color);
	border-radius: 999px;
	background: #fff;
	color: var(--oxc-color);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}

.oxc-bubble a.oxc-action {
	color: var(--oxc-color);
}

.oxc-action:hover,
.oxc-action--solid {
	background: var(--oxc-color);
	color: #fff;
}

.oxc-bubble a.oxc-action:hover {
	color: #fff;
}

.oxc-action--solid:hover {
	background: var(--oxc-navy);
	border-color: var(--oxc-navy);
}

.oxc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 16px 0;
	border-top: 1px solid var(--oxc-line);
	background: #fff;
}

.oxc-chips[hidden] {
	display: none;
}

.oxc-chip {
	padding: 6px 12px;
	border: 1px solid var(--oxc-line);
	border-radius: 999px;
	background: #f4f6fe;
	color: var(--oxc-navy);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.oxc-chip:hover {
	border-color: var(--oxc-color);
	color: var(--oxc-color);
}

/* Avaliação */
.oxc-feedback {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid var(--oxc-line);
	color: var(--oxc-muted);
	font-size: 12px;
}

.oxc-feedback__btn {
	padding: 3px 9px;
	border: 1px solid var(--oxc-line);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.oxc-feedback__btn:hover {
	border-color: var(--oxc-color);
}

/* Entrada */
.oxc-form {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	background: #fff;
}

.oxc-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--oxc-line);
	border-radius: 10px;
	background: #fff;
	color: #1c2434;
	font: inherit;
}

.oxc-input:focus {
	border-color: var(--oxc-color);
	outline: none;
}

.oxc-send {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--oxc-color);
	color: #fff;
	cursor: pointer;
}

.oxc-send:hover {
	background: var(--oxc-navy);
}

.oxc-foot {
	padding: 0 16px 12px;
	background: #fff;
	text-align: center;
}

.oxc-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--oxc-muted);
	font: inherit;
	font-size: 12.5px;
	text-decoration: underline;
	cursor: pointer;
}

.oxc-link:hover {
	color: var(--oxc-color);
}

/* Deixar pergunta */
.oxc-lead {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.oxc-lead textarea {
	resize: vertical;
}

.oxc-lead__consent {
	display: flex;
	gap: 8px;
	color: var(--oxc-muted);
	font-size: 12px;
	font-weight: 400;
}

.oxc-lead__consent input {
	flex: 0 0 auto;
	margin-top: 2px;
	accent-color: var(--oxc-color);
}

.oxc-lead__status {
	margin: 0;
	color: #b42318;
	font-size: 12px;
}

.oxc-lead__status:empty {
	display: none;
}

.oxc-lead__ok {
	margin: 10px 0 0;
	color: #177a45;
}

/* Celular: tela cheia */
@media (max-width: 600px) {
	.oxc {
		bottom: 14px;
	}

	.oxc--right {
		right: 14px;
	}

	.oxc--left {
		left: 14px;
	}

	.oxc-launcher__label {
		display: none;
	}

	.oxc-launcher {
		width: 54px;
		height: 54px;
		padding: 0;
		justify-content: center;
	}

	.oxc.is-open .oxc-launcher {
		display: none;
	}

	.oxc-panel {
		position: fixed;
		inset: 0;
		width: auto;
		height: auto;
		border: 0;
		border-radius: 0;
	}

	.oxc-input {
		font-size: 16px;
	}

	/* Administradores logados: abaixo da barra do WordPress. */
	body.admin-bar .oxc-panel {
		top: 46px;
	}
}

/* Aviso de cookies do tema: o chat sobe enquanto o aviso está visível. */
body:has(.ox-cookie:not([hidden])) .oxc {
	bottom: 120px;
}

@media print {
	.oxc {
		display: none !important;
	}
}
