/* Widget de atendimento — site AdvBrasil (cores do landing.css) */
.grc-chat-fab {
	position: fixed;
	right: 0.98rem;
	bottom: 1.25rem;
	margin-bottom: 48px;
	z-index: 9998;
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(180deg, #d9b84a 0%, #b8941f 100%);
	color: #141414;
	box-shadow: 0 8px 28px rgba(154, 123, 26, 0.38);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
}
.grc-chat-fab:hover {
	transform: scale(1.05);
	box-shadow: 0 12px 32px rgba(154, 123, 26, 0.45);
}
.grc-chat-fab svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; }

.grc-chat-panel {
	position: fixed;
	right: 1.25rem;
	bottom: 5.5rem;
	z-index: 9999;
	width: min(380px, calc(100vw - 2rem));
	max-height: min(520px, calc(100vh - 7rem));
	background: var(--card, #fff);
	border-radius: var(--radius, 18px);
	box-shadow: var(--shadow, 0 20px 60px rgba(26, 35, 50, 0.12));
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
}
.grc-chat-panel.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.grc-chat-head {
	background: linear-gradient(135deg, var(--ink, #1a2332) 0%, #252018 100%);
	color: #fff;
	padding: 0.85rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	border-bottom: 2px solid var(--gold, #c9a227);
}
.grc-chat-head h3 {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	font-family: var(--font-display, Georgia, serif);
	letter-spacing: 0.01em;
}
.grc-chat-head p {
	margin: 0.15rem 0 0;
	font-size: 0.72rem;
	opacity: 0.88;
	color: rgba(255, 255, 255, 0.88);
}
.grc-chat-close {
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
}

.grc-chat-body {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	min-height: 200px;
	background: var(--bg, #f7f4ed);
}
.grc-chat-body:has(#grcChatTalkView:not([hidden])) {
	overflow: hidden;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.grc-chat-form label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ink-soft, #2b3544);
	margin-bottom: 0.25rem;
}
.grc-chat-form input,
.grc-chat-form textarea {
	width: 100%;
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	border-radius: 0.5rem;
	padding: 0.5rem 0.65rem;
	font-size: 0.85rem;
	margin-bottom: 0.65rem;
	font-family: inherit;
	background: #fff;
}
.grc-chat-form input:focus,
.grc-chat-form textarea:focus {
	outline: none;
	border-color: var(--gold-dark, #9a7b1a);
	box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.15);
}
.grc-chat-form textarea { resize: vertical; min-height: 72px; }

.grc-chat-msgs { display: flex; flex-direction: column; gap: 0.5rem; }
#grcChatTalkView {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	height: 100%;
	padding: 0 1rem 0.5rem;
}
#grcChatTalkView[hidden] {
	display: none !important;
}
#grcChatTalkView .grc-chat-msgs {
	flex: 1;
	overflow-y: auto;
	min-height: 0;
	max-height: 280px;
	padding: 0.5rem 0 0.25rem;
	-webkit-overflow-scrolling: touch;
}
.grc-chat-msgs-loader {
	text-align: center;
	font-size: 0.68rem;
	color: var(--muted, #6b7280);
	padding: 0.25rem 0 0.5rem;
}
.grc-chat-msgs-loader.is-loading {
	color: var(--gold-dark, #9a7b1a);
}
.grc-chat-msg {
	max-width: 88%;
	padding: 0.55rem 0.75rem;
	border-radius: 0.75rem;
	font-size: 0.82rem;
	line-height: 1.45;
	word-break: break-word;
}
.grc-chat-msg.visitante {
	background: var(--bg-warm, #efe9dc);
	border: 1px solid var(--border, rgba(201, 162, 39, 0.18));
	align-self: flex-start;
}
.grc-chat-msg.atendente {
	background: #fff;
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	align-self: flex-end;
}
.grc-chat-msg time { display: block; font-size: 0.62rem; opacity: 0.65; margin-top: 0.25rem; }

.grc-chat-foot {
	border-top: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	padding: 0.65rem;
	background: #fff;
	display: flex;
	gap: 0.5rem;
}
.grc-chat-foot input {
	flex: 1;
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	border-radius: 0.5rem;
	padding: 0.5rem 0.65rem;
	font-size: 0.85rem;
}
.grc-chat-foot button {
	border: none;
	background: linear-gradient(180deg, #d9b84a 0%, #b8941f 100%);
	color: #141414;
	border-radius: 0.5rem;
	padding: 0 0.85rem;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.8rem;
}
.grc-chat-foot button:disabled { opacity: 0.6; cursor: not-allowed; }

.grc-chat-btn-spinner {
	display: inline-block;
	width: 0.85rem;
	height: 0.85rem;
	margin-right: 0.35rem;
	vertical-align: -0.15em;
	border: 2px solid rgba(20, 20, 20, 0.2);
	border-top-color: #141414;
	border-radius: 50%;
	animation: grc-chat-spin 0.65s linear infinite;
}
@keyframes grc-chat-spin {
	to { transform: rotate(360deg); }
}

.grc-chat-wa-hint {
	font-size: 0.68rem;
	color: var(--muted, #6b7280);
	padding: 0 0.65rem 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}
.grc-chat-wa-hint svg { width: 14px; height: 14px; flex-shrink: 0; }

.grc-chat-form input.grc-chat-invalid,
.grc-chat-form textarea.grc-chat-invalid {
	border-color: #b45309;
	box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.12);
}
.grc-chat-error {
	display: block;
	font-size: 0.68rem;
	color: #b45309;
	margin: -0.45rem 0 0.5rem;
}

.grc-chat-start-btn {
	width: 100%;
	border: none;
	background: linear-gradient(180deg, #d9b84a 0%, #b8941f 100%);
	color: #141414;
	border-radius: 0.5rem;
	padding: 0.65rem;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.88rem;
}
.grc-chat-start-btn:disabled { opacity: 0.65; cursor: not-allowed; }

.grc-chat-closed {
	text-align: center;
	color: var(--muted, #6b7280);
	font-size: 0.82rem;
	padding: 1.5rem 1rem;
}

.grc-chat-talk-bar {
	flex-shrink: 0;
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	justify-content: flex-end;
	padding: 0.65rem 0 0.5rem;
	background: var(--bg, #f7f4ed);
	border-bottom: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	box-shadow: 0 6px 16px -8px rgba(26, 35, 50, 0.1);
}
.grc-chat-finish-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	border: 1px solid rgba(180, 83, 9, 0.28);
	background: linear-gradient(135deg, #fff 0%, #fffbf5 100%);
	color: #b45309;
	border-radius: 999px;
	padding: 0.35rem 0.75rem;
	font-size: 0.72rem;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.grc-chat-finish-btn svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
}
.grc-chat-finish-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #fffbf5 0%, #fef3c7 100%);
	box-shadow: 0 4px 12px rgba(180, 83, 9, 0.12);
	transform: translateY(-1px);
}
.grc-chat-finish-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.grc-chat-avaliacao,
.grc-chat-obrigado {
	padding: 0.5rem 0;
}
.grc-chat-avaliacao-inner,
.grc-chat-obrigado-inner {
	text-align: center;
	padding: 0.75rem 0.25rem 1rem;
}
.grc-chat-avaliacao-icon {
	width: 44px;
	height: 44px;
	margin: 0 auto 0.65rem;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gold-light, #e8d48a), var(--gold, #c9a227));
	color: var(--ink, #1a2332);
	font-size: 1.35rem;
	line-height: 44px;
}
.grc-chat-avaliacao h4,
.grc-chat-obrigado h4 {
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	color: var(--ink, #1a2332);
	font-family: var(--font-display, Georgia, serif);
}
.grc-chat-avaliacao p,
.grc-chat-obrigado p {
	margin: 0 0 0.85rem;
	font-size: 0.78rem;
	color: var(--muted, #6b7280);
	line-height: 1.45;
}
.grc-chat-stars {
	display: flex;
	justify-content: center;
	gap: 0.25rem;
	margin-bottom: 0.75rem;
}
.grc-chat-stars button {
	border: none;
	background: transparent;
	font-size: 1.65rem;
	line-height: 1;
	color: #d1d5db;
	cursor: pointer;
	padding: 0.15rem;
	transition: color 0.15s, transform 0.15s;
}
.grc-chat-stars button:hover,
.grc-chat-stars button.is-on {
	color: var(--gold, #c9a227);
	transform: scale(1.08);
}
.grc-chat-avaliacao textarea {
	width: 100%;
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	border-radius: 0.5rem;
	padding: 0.55rem 0.65rem;
	font-size: 0.8rem;
	font-family: inherit;
	resize: vertical;
	min-height: 64px;
	margin-bottom: 0.65rem;
}
.grc-chat-avaliar-btn {
	width: 100%;
	border: none;
	background: linear-gradient(180deg, #d9b84a 0%, #b8941f 100%);
	color: #141414;
	border-radius: 0.5rem;
	padding: 0.6rem;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
}
.grc-chat-avaliar-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.grc-chat-avaliar-skip {
	display: block;
	width: 100%;
	margin-top: 0.5rem;
	border: none;
	background: transparent;
	color: var(--muted, #6b7280);
	font-size: 0.72rem;
	cursor: pointer;
	text-decoration: underline;
	font-family: inherit;
}
.grc-chat-obrigado-check {
	width: 48px;
	height: 48px;
	margin: 0 auto 0.65rem;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gold-light, #e8d48a), #d9b84a);
	color: var(--ink, #1a2332);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 48px;
}

@media (max-width: 480px) {
	.grc-chat-panel {
		right: 0.75rem;
		left: 0.75rem;
		width: auto;
		bottom: 5rem;
	}
}

/* Diálogos do chat */
.grc-chat-dialog-root {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	pointer-events: none;
}
.grc-chat-dialog-root.is-open {
	pointer-events: auto;
}
.grc-chat-dialog-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 35, 50, 0.45);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.2s ease;
}
.grc-chat-dialog-root.is-open .grc-chat-dialog-backdrop {
	opacity: 1;
}
.grc-chat-dialog {
	position: relative;
	width: min(360px, calc(100vw - 2.5rem));
	background: var(--card, #fff);
	border-radius: var(--radius, 18px);
	box-shadow: var(--shadow, 0 20px 60px rgba(26, 35, 50, 0.12));
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
	padding: 1.35rem 1.25rem 1.15rem;
	text-align: center;
	transform: translateY(10px) scale(0.97);
	opacity: 0;
	transition: transform 0.22s ease, opacity 0.22s ease;
}
.grc-chat-dialog-root.is-open .grc-chat-dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}
.grc-chat-dialog-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 0.85rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.grc-chat-dialog-icon svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}
.grc-chat-dialog-icon--alert {
	background: linear-gradient(135deg, var(--bg-warm, #efe9dc), var(--gold-light, #e8d48a));
	color: var(--gold-dark, #9a7b1a);
}
.grc-chat-dialog-icon--confirm {
	background: linear-gradient(135deg, #fffbf5, #fef3c7);
	color: #b45309;
}
.grc-chat-dialog-title {
	margin: 0 0 0.45rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--ink, #1a2332);
	line-height: 1.35;
	font-family: var(--font-display, Georgia, serif);
}
.grc-chat-dialog-msg {
	margin: 0 0 1.15rem;
	font-size: 0.84rem;
	line-height: 1.55;
	color: var(--muted, #6b7280);
}
.grc-chat-dialog-actions {
	display: flex;
	gap: 0.55rem;
	justify-content: center;
	flex-wrap: wrap;
}
.grc-chat-dialog-btn {
	border: none;
	border-radius: 0.55rem;
	padding: 0.55rem 1rem;
	font-size: 0.82rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	min-width: 108px;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.grc-chat-dialog-btn:hover {
	transform: translateY(-1px);
}
.grc-chat-dialog-btn-primary {
	background: linear-gradient(180deg, #d9b84a 0%, #b8941f 100%);
	color: #141414;
	box-shadow: 0 4px 14px rgba(154, 123, 26, 0.22);
}
.grc-chat-dialog-btn-danger {
	background: linear-gradient(135deg, #d97706, #b45309);
	color: #fff;
	box-shadow: 0 4px 14px rgba(180, 83, 9, 0.2);
}
.grc-chat-dialog-btn-muted {
	background: var(--bg, #f7f4ed);
	color: var(--ink-soft, #2b3544);
	border: 1px solid var(--border, rgba(201, 162, 39, 0.22));
}
