.otr-frontend .otr-lista-topo {
	margin-bottom: 1.5em;
}

.otr-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	background: #eee;
	color: #333;
}
.otr-badge-aberto { background: #d9edf7; color: #31708f; }
.otr-badge-em-analise { background: #fcf8e3; color: #8a6d3b; }
.otr-badge-aguarda-cliente { background: #fde7d0; color: #a5590a; }
.otr-badge-resolvido,
.otr-badge-concluido { background: #dff0d8; color: #3c763d; }
.otr-badge-fechado,
.otr-badge-rejeitado { background: #f2dede; color: #a94442; }

.otr-historico {
	margin: 1.5em 0;
}
.otr-mensagem {
	padding: 12px 16px;
	margin-bottom: 10px;
	border-radius: 6px;
	background: #f7f7f7;
}
.otr-mensagem-cliente {
	background: #eef4fb;
}
.otr-mensagem-agente {
	background: #f2f7ee;
}
.otr-nota-interna {
	background: #fff8e5;
	border: 1px dashed #e0c36f;
}
.otr-mensagem table {
	max-width: 100%;
}
.otr-mensagem-agente {
	overflow-x: auto;
}
.otr-mensagem small {
	display: block;
	margin-top: 6px;
	color: #777;
}

.otr-caixa {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 16px;
	margin-bottom: 16px;
}

.otr-detalhe-grid {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}
.otr-coluna-principal {
	flex: 2;
}
.otr-coluna-lateral {
	flex: 1;
	min-width: 260px;
}

.otr-item-rma {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 12px;
	margin-bottom: 12px;
}

.otr-botoes-encomenda {
	margin-top: 1em;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.otr-rma-prazo-expirado {
	font-size: 13px;
	color: #888;
	margin-top: 8px;
}

.otr-anexos {
	margin: 8px 0 0;
	padding-left: 18px;
	font-size: 13px;
}

/* Botões da área do cliente (Minha Conta): estilo próprio do plugin,
   para não depender das classes específicas do tema ativo.
   Cor de marca definida pelo cliente: rgb(129,0,255).
   Tudo com !important porque o tema tem regras próprias para .button
   (incluindo no :hover) que, de outra forma, ganhavam por
   especificidade e deixavam o texto ilegível. */
.otr-frontend .button,
.otr-frontend button,
.otr-frontend input[type="submit"] {
	display: inline-block !important;
	background: rgb( 129, 0, 255 ) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 10px 20px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-align: center !important;
	vertical-align: middle !important;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.15s ease;
	margin: 0 !important;
}
.otr-frontend .button:hover,
.otr-frontend .button:focus,
.otr-frontend .button:active,
.otr-frontend button:hover,
.otr-frontend button:focus,
.otr-frontend button:active,
.otr-frontend input[type="submit"]:hover,
.otr-frontend input[type="submit"]:focus,
.otr-frontend input[type="submit"]:active {
	background: #000 !important;
	color: #fff !important;
}

@media ( max-width: 600px ) {
	.otr-botoes-encomenda {
		flex-direction: column;
		align-items: stretch;
	}
	.otr-botoes-encomenda .button {
		text-align: center !important;
	}
}

/* Ficheiro "Escolher ficheiros" mantém o estilo nativo do sistema
   operativo (não é possível estilizar de forma consistente entre
   navegadores), mas o texto à volta segue o resto do formulário. */
.otr-frontend input[type="file"] {
	display: block;
	margin-top: 4px;
}

.otr-frontend fieldset.otr-item-rma legend,
.otr-frontend label {
	font-weight: 600;
}

#otr-form-novo {
	scroll-margin-top: 100px;
}

/* Central de Ajuda — páginas com menu lateral (categoria e artigo) */
.otr-ca-topo,
.otr-ca-hero,
.otr-central-ajuda,
.otr-ca-com-sidebar,
.otr-ca-sem-sidebar,
.otr-ca-sem-sumario,
.otr-ca-sem-colunas,
.otr-ca-com-sidebar *,
.otr-ca-sem-sidebar *,
.otr-ca-sem-sumario *,
.otr-ca-sem-colunas * {
	box-sizing: border-box;
}
.otr-ca-topo {
	background: #fff;
	border-bottom: 1px solid #eee;
	padding: 18px 16px 26px;
	overflow-x: hidden;
}
.otr-ca-topo .otr-pesquisa-ajuda {
	max-width: 700px;
	margin: 0 auto;
}
.otr-ca-topo .otr-pesquisa-ajuda input[type="text"] {
	flex-grow: 1;
}

.otr-ca-com-sidebar,
.otr-ca-sem-sidebar,
.otr-ca-sem-sumario,
.otr-ca-sem-colunas {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 24px 60px;
	display: grid;
	gap: 30px;
	align-items: start;
}
.otr-ca-com-sidebar {
	grid-template-columns: 240px 1fr;
}
.otr-ca-com-sidebar.otr-ca-com-sumario {
	grid-template-columns: 220px 1fr 220px;
}
.otr-ca-sem-sidebar.otr-ca-com-sumario {
	grid-template-columns: 1fr 220px;
}
.otr-ca-sem-sumario {
	grid-template-columns: 240px 1fr;
}
.otr-ca-sem-colunas {
	grid-template-columns: 1fr;
	max-width: 900px;
}

.otr-ca-coluna-sidebar,
.otr-ca-coluna-principal,
.otr-ca-coluna-sumario {
	min-width: 0;
}

.otr-ca-coluna-sidebar {
	position: sticky;
	top: 20px;
}
.otr-ca-sidebar {
	display: flex;
	flex-direction: column;
}
.otr-ca-sidebar-link {
	padding: 9px 16px;
	font-size: 14px;
	color: #444 !important;
	text-decoration: none !important;
	border-left: 2px solid transparent;
}
.otr-ca-sidebar-link:hover {
	color: rgb(129,0,255) !important;
}
.otr-ca-sidebar-link-ativo {
	color: rgb(129,0,255) !important;
	border-left-color: rgb(129,0,255);
	font-weight: 600;
	background: rgba(129,0,255,0.05);
}

.otr-ca-coluna-principal h1 {
	font-size: 26px;
	margin: 0 0 16px;
	overflow-wrap: break-word;
	word-break: break-word;
}
.otr-ca-descricao-categoria {
	color: #666;
	margin-bottom: 20px;
}

.otr-ca-coluna-sumario {
	position: sticky;
	top: 20px;
}
.otr-ca-sumario-caixa {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 18px;
}
.otr-ca-sumario-caixa h4 {
	font-size: 12px;
	letter-spacing: 0.06em;
	color: #999;
	margin: 0 0 12px;
}
.otr-ca-sumario-caixa ul {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}
.otr-ca-sumario-caixa li {
	margin-bottom: 8px;
}
.otr-ca-sumario-caixa a {
	font-size: 13.5px;
	color: #555 !important;
	text-decoration: none !important;
	line-height: 1.4;
}
.otr-ca-sumario-caixa a:hover {
	color: rgb(129,0,255) !important;
}
.otr-ca-sumario-nivel-3 {
	padding-left: 14px;
}
.otr-ca-voltar-topo {
	font-size: 13px;
	color: rgb(129,0,255) !important;
	text-decoration: none !important;
	font-weight: 600;
}

@media ( max-width: 900px ) {
	.otr-ca-com-sidebar,
	.otr-ca-com-sumario,
	.otr-ca-sem-sidebar,
	.otr-ca-sem-sumario {
		grid-template-columns: 1fr;
	}
	.otr-ca-coluna-sidebar,
	.otr-ca-coluna-sumario {
		position: static;
	}
	.otr-ca-sidebar {
		flex-direction: row;
		flex-wrap: wrap;
		border-left: none;
		border-bottom: 1px solid #eee;
		padding-bottom: 10px;
		margin-bottom: 10px;
	}
	.otr-ca-sidebar-link {
		border-left: none;
		border-bottom: 2px solid transparent;
		margin-left: 0;
	}
	.otr-ca-sidebar-link-ativo {
		border-left: none;
		border-bottom-color: rgb(129,0,255);
	}
}

/* Chat em direto — bolha flutuante */
.otr-chat-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.otr-chat-widget [hidden] {
	display: none !important;
}

.otr-chat-bolha {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: rgb(129,0,255);
	color: #fff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(129,0,255,0.35);
	transition: background 0.15s ease, transform 0.15s ease;
}
.otr-chat-bolha:hover {
	background: #000;
	transform: scale(1.05);
}
.otr-chat-painel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 460px;
	max-height: 70vh;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.otr-chat-painel[hidden] {
	display: none !important;
}
.otr-chat-cabecalho {
	background: rgb(129,0,255);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.otr-chat-cabecalho button {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}
.otr-chat-mensagens {
	flex-grow: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f9f8fc;
}
.otr-chat-a-carregar,
.otr-chat-vazio {
	color: #999;
	font-size: 13px;
	text-align: center;
}
.otr-chat-bolha-msg {
	max-width: 80%;
	padding: 8px 12px;
	border-radius: 12px;
	margin-bottom: 8px;
	font-size: 14px;
	line-height: 1.4;
	overflow-wrap: break-word;
	word-break: break-word;
}
.otr-chat-bolha-msg small {
	display: block;
	font-size: 10px;
	color: #999;
	margin-top: 4px;
}
.otr-chat-msg-cliente {
	background: rgb(129,0,255);
	color: #fff;
	margin-left: auto;
	border-bottom-right-radius: 2px;
}
.otr-chat-msg-cliente small {
	color: rgba(255,255,255,0.7);
}
.otr-chat-msg-agente {
	background: #eee;
	color: #222;
	margin-right: auto;
	border-bottom-left-radius: 2px;
}
.otr-chat-form {
	display: flex;
	border-top: 1px solid #eee;
	padding: 10px;
	gap: 8px;
	flex-shrink: 0;
}
.otr-chat-form textarea {
	flex-grow: 1;
	resize: none;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	max-height: 80px;
	background: #fff;
	color: #222;
}
.otr-chat-form button {
	background: rgb(129,0,255) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 0 16px !important;
	font-weight: 600 !important;
	cursor: pointer;
}
.otr-chat-form button:hover {
	background: #000 !important;
}
.otr-chat-login {
	padding: 24px 20px;
	text-align: center;
}
.otr-chat-login .button {
	margin-top: 12px;
}
.otr-chat-pre-form {
	padding: 20px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.otr-chat-pre-form p {
	margin: 0 0 4px;
	font-size: 14px;
	color: #333;
}
.otr-chat-pre-form input {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
	background: #fff;
	color: #222;
}
.otr-chat-pre-form button {
	background: rgb(129,0,255) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 10px !important;
	font-weight: 600 !important;
	cursor: pointer;
	margin-top: 4px;
}
.otr-chat-pre-form button:hover {
	background: #000 !important;
}
.otr-chat-pre-erro {
	color: #c0392b;
	font-size: 12px;
	margin: 0 !important;
}

@media ( max-width: 480px ) {
	.otr-chat-widget {
		right: 12px;
		bottom: 12px;
	}
	.otr-chat-painel {
		width: calc(100vw - 24px);
		right: -6px;
		height: 65vh;
	}
}
.otr-ca-hero {
	background: linear-gradient( 135deg, rgb(129,0,255) 0%, #4b0091 100% );
	padding: 60px 16px 90px;
	text-align: center;
	color: #fff;
}
.otr-ca-hero-conteudo {
	max-width: 700px;
	margin: 0 auto;
}
.otr-ca-hero h1 {
	color: #fff;
	font-size: 34px;
	margin: 0 0 10px;
}
.otr-ca-hero p {
	color: rgba(255,255,255,0.85);
	font-size: 16px;
	margin: 0;
}
.otr-ca-hero .otr-pesquisa-ajuda {
	margin-top: 26px;
}
.otr-ca-hero .otr-pesquisa-ajuda input[type="text"] {
	border: none;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	padding: 14px 18px;
	min-width: 320px;
}

.otr-central-ajuda {
	max-width: 960px;
	margin: -50px auto 0;
	padding: 0 16px 60px;
	position: relative;
}
.otr-ca-titulo-seccao {
	font-size: 20px;
	margin: 0 0 16px;
}
.otr-ca-breadcrumb {
	font-size: 13px;
	color: #777;
	margin: 24px 0 10px;
	overflow-wrap: break-word;
}
.otr-ca-breadcrumb a {
	color: #777;
	text-decoration: none;
}
.otr-ca-breadcrumb a:hover {
	color: rgb(129,0,255);
	text-decoration: underline;
}
.otr-ca-breadcrumb span {
	margin: 0 4px;
}

.otr-pesquisa-ajuda {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}
.otr-pesquisa-ajuda input[type="text"] {
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	min-width: 260px;
	font-size: 14px;
	background: #fff !important;
	color: #222 !important;
}

.otr-ca-categorias-caixa {
	background: #fff;
	padding: 24px;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20,0,50,0.08);
	margin: 0 0 30px;
}
.otr-ca-categorias-caixa .otr-ca-titulo-seccao {
	margin-bottom: 18px;
}
.otr-ca-categorias {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax(240px, 1fr) );
	gap: 16px;
}
.otr-ca-categoria-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border: 1px solid #f0eef5;
	border-radius: 10px;
	text-decoration: none !important;
	color: #222 !important;
	background: #fcfbfe;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.otr-ca-categoria-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(129,0,255,0.15);
	border-color: rgb(129,0,255);
}
.otr-ca-icone {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: rgba(129,0,255,0.1);
	color: rgb(129,0,255);
}
.otr-ca-categoria-texto {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
}
.otr-ca-categoria-card strong {
	font-size: 15px;
	margin-bottom: 2px;
}
.otr-ca-contagem {
	font-size: 13px;
	color: #888;
}
.otr-ca-seta {
	flex-shrink: 0;
	color: #ccc;
	font-size: 18px;
	transition: transform 0.15s ease, color 0.15s ease;
}
.otr-ca-categoria-card:hover .otr-ca-seta,
.otr-ca-artigos a:hover .otr-ca-seta {
	color: rgb(129,0,255);
	transform: translateX(3px);
}

.otr-ca-lista {
	background: #fff;
	padding: 24px;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20,0,50,0.06);
	margin-bottom: 30px;
}
.otr-ca-artigos {
	list-style: none;
	margin: 0;
	padding: 0;
}
.otr-ca-artigos li {
	border-bottom: 1px solid #f2f2f5;
}
.otr-ca-artigos li:last-child {
	border-bottom: none;
}
.otr-ca-artigos a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 6px;
	text-decoration: none !important;
	color: #222 !important;
	border-radius: 8px;
	transition: background 0.15s ease;
}
.otr-ca-artigos a:hover {
	background: #faf8ff;
}
.otr-ca-icone-artigo {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #f2f0f7;
	color: #777;
}
.otr-ca-artigo-texto {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
}
.otr-ca-artigos strong {
	font-size: 15px;
	margin-bottom: 2px;
}
.otr-ca-artigos span {
	font-size: 13px;
	color: #888;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.otr-ca-cabecalho-categoria {
	margin-bottom: 24px;
}

.otr-ca-categorias-artigo {
	margin-bottom: 16px;
}
.otr-ca-categorias-artigo .otr-badge {
	text-decoration: none;
	margin-right: 6px;
	background: rgba(129,0,255,0.1);
	color: rgb(129,0,255);
}
.otr-ca-artigo {
	background: #fff;
	padding: 30px;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20,0,50,0.06);
}
.otr-ca-artigo h1 {
	margin: 0 0 20px;
	font-size: 28px;
	overflow-wrap: break-word;
	word-break: break-word;
}
.otr-ca-conteudo {
	line-height: 1.75;
	font-size: 16px;
	color: #333;
	overflow-wrap: break-word;
	word-break: break-word;
}
.otr-ca-conteudo img {
	max-width: 100%;
	height: auto;
}
.otr-ca-conteudo h2 {
	margin-top: 1.6em;
	overflow-wrap: break-word;
}
.otr-ca-cta {
	margin-top: 30px;
	padding: 30px;
	text-align: center;
	background: linear-gradient( 135deg, rgba(129,0,255,0.08), rgba(129,0,255,0.03) );
	border: 1px solid rgba(129,0,255,0.12);
	border-radius: 14px;
}
.otr-ca-cta p {
	margin: 0 0 14px;
	font-weight: 600;
	font-size: 16px;
}

@media ( max-width: 600px ) {
	.otr-ca-hero {
		padding: 40px 16px 70px;
	}
	.otr-ca-hero h1 {
		font-size: 26px;
	}
	.otr-ca-hero .otr-pesquisa-ajuda input[type="text"] {
		min-width: 0;
		width: 100%;
	}
	.otr-ca-topo .otr-pesquisa-ajuda input[type="text"] {
		min-width: 0;
		width: 100%;
	}
	.otr-ca-topo .otr-pesquisa-ajuda {
		flex-direction: column;
	}
	.otr-ca-topo .otr-pesquisa-ajuda .button {
		width: 100%;
	}
	.otr-ca-artigo h1 {
		font-size: 22px;
	}
	.otr-central-ajuda {
		margin-top: -40px;
	}
	.otr-ca-categorias-caixa,
	.otr-ca-lista,
	.otr-ca-artigo {
		padding: 16px;
	}
}
