@import url("../fonts/stylesheet.css");

/* ─── CONTAINER GERAL & PROTEÇÃO FSE ────────────────────────────────── */
.cct-verifier-wrapper {
	font-family: "BW Modelica", "Montserrat", sans-serif;
	color: #292b2e;
	width: 100%;
	max-width: 1200px !important;
	max-inline-size: 1200px !important;
	margin: 0 auto;
	padding: 20px 16px;
	box-sizing: border-box;
	background-color: transparent;
	display: flex;
	justify-content: center;
}

.cct-verifier-wrapper * {
	box-sizing: border-box;
}

/* ─── CARD UNIFICADO (MORPHING CARD) ────────────────────────────────── */
.cct-unified-card {
	width: 100%;
	max-width: 480px;
	background: #ffffff;
	border-radius: 20px;
	box-shadow:
		0 12px 32px rgba(0, 0, 0, 0.04),
		0 2px 8px rgba(0, 0, 0, 0.02);
	transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
	position: relative;
	overflow: hidden;
	padding: 32px 28px 24px 28px;
	border: 1px solid rgba(225, 228, 230, 0.5);
}

.cct-unified-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 6px;
	background: #f58220;
	transition: background 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	z-index: 10;
}

.cct-unified-card.state-success::before { background: #005c46; }
.cct-unified-card.state-error::before { background: #c5221f; }

/* ─── HEADER DO CARD & AVATAR ───────────────────────────────────────── */
.cct-card-header {
	text-align: center;
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cct-card-header h2 {
	font-size: 20px;
	font-weight: 700;
	color: #292b2e;
	margin: 0;
	line-height: 1.3;
	transition: all 0.4s ease;
}

.cct-avatar-container {
	position: relative;
	margin-bottom: 14px;
	z-index: 2;
	transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cct-logo-circle {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
	position: relative;
	z-index: 3;
	transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cct-brand-icon {
	width: 60%;
	height: 60%;
	object-fit: contain;
	position: relative;
	z-index: 4;
}

/* Redução do Header nos Estados de Resposta */
.cct-unified-card.state-success .cct-card-header,
.cct-unified-card.state-error .cct-card-header,
.cct-unified-card.state-loading .cct-card-header {
	margin-bottom: 12px;
}

.cct-unified-card.state-success .cct-logo-circle,
.cct-unified-card.state-error .cct-logo-circle,
.cct-unified-card.state-loading .cct-logo-circle {
	width: 64px;
	height: 64px;
}

.cct-unified-card.state-success .cct-card-header h2,
.cct-unified-card.state-error .cct-card-header h2,
.cct-unified-card.state-loading .cct-card-header h2 {
	font-size: 18px;
}

/* Efeitos de estado no avatar */
.cct-unified-card.state-success .cct-logo-circle {
	box-shadow: 0 0 0 5px rgba(0, 92, 70, 0.1), 0 6px 18px rgba(0, 0, 0, 0.05);
}

.cct-unified-card.state-error .cct-logo-circle {
	box-shadow: 0 0 0 5px rgba(197, 34, 31, 0.1), 0 6px 18px rgba(0, 0, 0, 0.04);
}

.cct-unified-card.state-loading .cct-logo-circle {
	animation: cct-loading-pulse 1.4s infinite ease-in-out;
}

.cct-radar-pulse {
	position: absolute; top: 0; left: 0; right: 0; bottom: 0;
	border-radius: 50%; background: transparent;
	border: 2px solid #005c46; opacity: 0; pointer-events: none; z-index: 1;
}

.cct-unified-card.state-success .cct-radar-pulse {
	animation: cct-radar-pulse-anim 2s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ─── INPUT E BOTÃO (COLAPSO NO SUCCESS/ERROR/LOADING) ──────────────── */
.cct-form-group {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
	width: 100%;
	transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cct-input-field {
	flex: 1;
	padding: 14px 18px;
	border: 2px solid #e1e4e6;
	border-radius: 12px;
	font-size: 15px;
	font-family: "BW Modelica", "Montserrat", sans-serif;
	color: #292b2e;
	background: #ffffff;
	outline: none;
	transition: all 0.3s ease;
}

.cct-input-field:focus {
	border-color: #f58220;
	box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.1);
}

.cct-btn-verify {
	background: #f58220;
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 14px 28px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
	box-shadow: 0 4px 10px rgba(245, 130, 32, 0.12);
}

.cct-btn-verify:hover:not(:disabled) {
	background: #e0731a;
	transform: translateY(-1px);
}

.cct-btn-verify:disabled {
	background: #c4c8cf;
	box-shadow: none;
	cursor: not-allowed;
}

/* Transformação do Input em Label Estática */
.cct-unified-card.state-success .cct-btn-verify,
.cct-unified-card.state-error .cct-btn-verify,
.cct-unified-card.state-loading .cct-btn-verify {
	display: none;
}

.cct-unified-card.state-success .cct-input-field,
.cct-unified-card.state-error .cct-input-field,
.cct-unified-card.state-loading .cct-input-field {
	border: none;
	background: #f4f5f6;
	padding: 10px 16px;
	text-align: center;
	pointer-events: none;
	font-size: 14px;
	color: #62666d;
	font-weight: 600;
	border-radius: 8px;
	box-shadow: none;
}

/* ─── PRIVACY NOTICE ─────────────────────────────────────────────────── */
.cct-privacy-notice {
	font-size: 12px;
	color: #8a8f98;
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	line-height: 1.4;
	transition: all 0.3s ease;
}

.cct-privacy-notice svg { fill: #a2a7b0; flex-shrink: 0; }

/* Oculta privacidade fora do idle */
.cct-unified-card.state-success .cct-privacy-notice,
.cct-unified-card.state-error .cct-privacy-notice,
.cct-unified-card.state-loading .cct-privacy-notice {
	display: none;
}

/* ─── BLOCO ÚNICO DE RESULTADO (BANNER + PROFILE FUNDIDOS) ──────────── */
.cct-results-integrated-box {
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid transparent;
	background: #f8f9fa;
	margin-top: 8px;
}

.cct-unified-card.state-success .cct-results-integrated-box {
	background-color: rgba(0, 92, 70, 0.03);
	border-color: rgba(0, 92, 70, 0.1);
}

.cct-unified-card.state-error .cct-results-integrated-box {
	background-color: rgba(197, 34, 31, 0.03);
	border-color: rgba(197, 34, 31, 0.1);
}

.cct-alert-banner {
	padding: 14px 16px;
	font-size: 13.5px;
	line-height: 1.45;
	display: none;
	text-align: center;
	border-bottom: 1px dashed transparent;
}

.cct-alert-banner strong { font-weight: 700; }

.cct-alert-banner.success {
	display: block;
	color: #005c46;
	background-color: rgba(0, 92, 70, 0.04);
	border-bottom-color: rgba(0, 92, 70, 0.08);
}

.cct-alert-banner.error {
	display: block;
	color: #c5221f;
	background-color: rgba(197, 34, 31, 0.04);
	border-bottom-color: rgba(197, 34, 31, 0.08);
}

.cct-alert-banner.warning {
	display: block;
	background-color: rgba(245, 130, 32, 0.05);
	color: #d46d00;
	border-radius: 12px;
	margin-top: 8px;
}

.cct-alert-banner.loading {
	display: block;
	background: #ecefef !important;
	color: #62666d;
	position: relative;
	overflow: hidden;
}

.cct-alert-banner.loading:empty::before {
	content: "Verificando canal oficial...";
	font-weight: 600;
}

.cct-alert-banner.loading::after {
	content: "";
	position: absolute; top: 0; right: 0; bottom: 0; left: 0;
	transform: translateX(-100%);
	background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 30%, rgba(255,255,255,0) 60%);
	animation: cct-shimmer 1.5s infinite ease-in-out;
}

/* ─── MECÂNICA DE EXPANSÃO (MORPHING) ────────────────────────────────── */
.cct-expansion-wrapper {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cct-expansion-wrapper.state-success,
.cct-expansion-wrapper.state-error,
.cct-expansion-wrapper.state-loading {
	grid-template-rows: 1fr;
}

.cct-expansion-inner { overflow: hidden; }

/* ─── PERFIL EXPANDIDO INTEGRADO ─────────────────────────────────────── */
.cct-profile-details {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 16px;
}

.cct-profile-name {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #292b2e;
}

.cct-verified-badge { display: none; align-items: center; transform: scale(0); }

.cct-expansion-wrapper.state-success .cct-verified-badge {
	display: inline-flex;
	animation: cct-badge-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
	animation-delay: 0.1s;
}

.cct-verified-text {
	display: none;
	font-size: 11px;
	font-weight: 700;
	color: #005c46;
	background: rgba(0, 92, 70, 0.08);
	padding: 3px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 2px;
	margin-bottom: 8px;
}

.cct-expansion-wrapper.state-success .cct-verified-text { display: inline-block; }

.cct-profile-number {
	font-size: 14px;
	color: #62666d;
	margin: 2px 0;
	font-weight: 600;
}

.cct-profile-category {
	font-size: 12px;
	color: #f58220;
	margin: 2px 0 0 0;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	font-weight: 700;
}

.cct-expansion-wrapper.state-error .cct-profile-category { color: #c5221f; }
.cct-expansion-wrapper.state-error .cct-profile-name { color: #c5221f; }

/* ─── BOTÃO WHATSAPP ─────────────────────────────────────────────────── */
.cct-whatsapp-redirect-container {
	margin-top: 12px;
	display: none;
	animation: cct-fade-in 0.4s ease forwards;
}

.cct-btn-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #005c46;
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 92, 70, 0.15);
	transition: all 0.3s ease;
	width: 100%;
	text-align: center;
}

.cct-btn-whatsapp:hover {
	background: #004736;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(0, 92, 70, 0.2);
}

/* ─── RESET LINK (nova consulta) ──────────────────────────────────────── */
.cct-reset-link {
	display: none;
	text-align: center;
	margin-top: 14px;
	font-size: 13px;
	font-weight: 600;
	color: #8a8f98;
	text-decoration: none;
	transition: color 0.2s ease;
	cursor: pointer;
}

.cct-reset-link:hover {
	color: #f58220;
	text-decoration: underline;
}

.cct-expansion-wrapper.state-success .cct-reset-link,
.cct-expansion-wrapper.state-error .cct-reset-link {
	display: block;
}

/* ─── SKELETON SHIMMER ───────────────────────────────────────────────── */
.cct-skeleton {
	position: relative; overflow: hidden;
	background: #ecefef !important; color: transparent !important;
	border-color: #ecefef !important; border-radius: 4px;
	display: inline-block; min-width: 120px;
}

.cct-skeleton::after {
	content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
	transform: translateX(-100%);
	background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 30%, rgba(255,255,255,0) 60%);
	animation: cct-shimmer 1.5s infinite ease-in-out;
}

/* ─── KEYFRAMES ──────────────────────────────────────────────────────── */
@keyframes cct-shimmer { 100% { transform: translateX(100%); } }
@keyframes cct-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cct-loading-pulse {
	0% { box-shadow: 0 0 0 0 rgba(245, 130, 32, 0.2), 0 6px 18px rgba(0, 0, 0, 0.04); }
	50% { box-shadow: 0 0 0 10px rgba(245, 130, 32, 0), 0 6px 18px rgba(0, 0, 0, 0.04); }
	100% { box-shadow: 0 0 0 0 rgba(245, 130, 32, 0), 0 6px 18px rgba(0, 0, 0, 0.04); }
}
@keyframes cct-radar-pulse-anim {
	0% { transform: scale(1); opacity: 0.7; }
	100% { transform: scale(1.35); opacity: 0; }
}
@keyframes cct-badge-bounce {
	0% { transform: scale(0); opacity: 0; }
	70% { transform: scale(1.15); }
	100% { transform: scale(1); opacity: 1; }
}
@keyframes cct-shake-anim {
	10%, 90% { transform: translate3d(-1px, 0, 0); }
	20%, 80% { transform: translate3d(2px, 0, 0); }
	30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
	40%, 60% { transform: translate3d(3px, 0, 0); }
}
.cct-shake { animation: cct-shake-anim 0.4s cubic-bezier(.36,.07,.19,.97) both; }

/* ─── RESPONSIVO MOBILE ─────────────────────────────────────────────── */
@media (max-width: 480px) {
	.cct-unified-card {
		padding: 24px 18px 18px 18px;
		border-radius: 16px;
	}

	.cct-form-group {
		flex-direction: column;
		gap: 10px;
		margin-bottom: 8px;
	}

	.cct-btn-verify {
		width: 100%;
	}

	.cct-card-header {
		margin-bottom: 16px;
	}

	.cct-card-header h2 {
		font-size: 18px;
	}

	.cct-logo-circle {
		width: 76px;
		height: 76px;
	}

	.cct-unified-card.state-success .cct-logo-circle,
	.cct-unified-card.state-error .cct-logo-circle,
	.cct-unified-card.state-loading .cct-logo-circle {
		width: 52px;
		height: 52px;
	}

	.cct-unified-card.state-success .cct-card-header h2,
	.cct-unified-card.state-error .cct-card-header h2,
	.cct-unified-card.state-loading .cct-card-header h2 {
		font-size: 16px;
	}

	.cct-profile-details {
		padding: 12px;
	}

	.cct-profile-name {
		font-size: 16px;
	}

	.cct-btn-whatsapp {
		padding: 12px 16px;
		font-size: 14px;
	}
}
