/* ============================================================
   Apex Drones — wizard "Solicite um orçamento" (lightbox)
   Identidade do site + efeitos de tecnologia/futurismo:
   glassmorphism, brilhos, scanline, cantos HUD e transições.
   ============================================================ */

.apx-wiz {
	position: fixed;
	inset: 0;
	z-index: 400;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px;
}

/* O atributo hidden precisa vencer os displays explícitos deste arquivo */
.apx-wiz[hidden],
.apx-wiz [hidden] {
	display: none !important;
}

.apx-wiz-backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 50% at 50% 42%, rgba(99, 105, 255, 0.16), transparent 70%),
		rgba(2, 2, 20, 0.82);
	backdrop-filter: blur(9px);
	animation: apx-wiz-fade 0.3s ease;
}

/* ---------- Diálogo ---------- */

.apx-wiz-dialog {
	position: relative;
	width: min(660px, 100%);
	max-height: min(92vh, 780px);
	display: flex;
	flex-direction: column;
	color: var(--white, #fff);
	background:
		radial-gradient(120% 90% at 85% -10%, rgba(99, 105, 255, 0.16), transparent 55%),
		linear-gradient(160deg, rgba(16, 16, 51, 0.97) 0%, rgba(0, 0, 48, 0.97) 55%, rgba(10, 11, 41, 0.97) 100%);
	border: 1px solid rgba(130, 134, 242, 0.32);
	border-radius: 22px;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.4),
		0 24px 80px -20px rgba(0, 0, 10, 0.9),
		0 0 90px -30px rgba(99, 105, 255, 0.55);
	overflow: hidden;
	animation: apx-wiz-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* Malha de pontos sutil ao fundo */
.apx-wiz-dialog::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(130, 134, 242, 0.14) 1px, transparent 1.4px);
	background-size: 26px 26px;
	pointer-events: none;
}

/* Cantos estilo HUD */
.apx-wiz-corner {
	position: absolute;
	width: 26px;
	height: 26px;
	border: 2px solid rgba(99, 105, 255, 0.75);
	pointer-events: none;
	z-index: 3;
}

.apx-wiz-corner--tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.apx-wiz-corner--tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.apx-wiz-corner--bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.apx-wiz-corner--br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }

/* Linha de varredura */
.apx-wiz-scanline {
	position: absolute;
	left: 8%;
	right: 8%;
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(130, 134, 242, 0.55), transparent);
	filter: drop-shadow(0 0 6px rgba(99, 105, 255, 0.8));
	animation: apx-wiz-scan 7s linear infinite;
	pointer-events: none;
	z-index: 2;
	opacity: 0.5;
}

/* Orbes de luz flutuantes */
.apx-wiz-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(46px);
	pointer-events: none;
	opacity: 0.5;
}

.apx-wiz-orb--1 {
	width: 220px;
	height: 220px;
	left: -80px;
	bottom: -60px;
	background: radial-gradient(circle, rgba(58, 61, 147, 0.8), transparent 70%);
	animation: apx-wiz-drift 11s ease-in-out infinite;
}

.apx-wiz-orb--2 {
	width: 180px;
	height: 180px;
	right: -60px;
	top: 16%;
	background: radial-gradient(circle, rgba(67, 198, 184, 0.35), transparent 70%);
	animation: apx-wiz-drift 13s ease-in-out infinite reverse;
}

/* ---------- Cabeçalho / progresso ---------- */

.apx-wiz-head {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 60px 18px 30px;
}

.apx-wiz-head > img {
	width: 122px;
	height: auto;
	flex-shrink: 0;
}

.apx-wiz-progress {
	flex: 1;
	max-width: 320px;
}

.apx-wiz-progress-label {
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
	margin-bottom: 8px;
	text-align: right;
}

.apx-wiz-progress-label b {
	color: #8286F2;
	font-weight: 700;
}

.apx-wiz-bar {
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(130, 134, 242, 0.18);
}

.apx-wiz-bar-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, #3A3D93, #6369FF 60%, #43C6B8);
	background-size: 200% 100%;
	box-shadow: 0 0 14px rgba(99, 105, 255, 0.8);
	transition: width 0.45s cubic-bezier(0.3, 0.8, 0.3, 1);
	animation: apx-wiz-shine 3s linear infinite;
}

/* ---------- Corpo / telas ---------- */

.apx-wiz-form {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1;
}

.apx-wiz-body {
	position: relative;
	z-index: 2;
	flex: 1;
	min-height: 300px;
	overflow-y: auto;
	padding: 10px 34px 26px;
}

.apx-wiz-screen {
	animation: apx-wiz-slide 0.4s cubic-bezier(0.25, 0.8, 0.3, 1);
}

.apx-wiz-screen.is-back {
	animation-name: apx-wiz-slide-back;
}

.apx-wiz-title {
	font-size: clamp(21px, 2.2vw, 26px);
	font-weight: 700;
	line-height: 1.35;
	color: var(--white, #fff);
	max-width: 24em;
}

.apx-wiz-lead {
	margin-top: 14px;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
	max-width: 34em;
}

.apx-wiz-hint {
	margin-top: 10px;
	font-size: 14px;
	font-weight: 300;
	color: rgba(130, 134, 242, 0.95);
}

/* Tela inicial */
.apx-wiz-screen[data-wiz-screen="intro"] {
	text-align: center;
	padding-top: 6px;
}

.apx-wiz-screen[data-wiz-screen="intro"] .apx-wiz-title,
.apx-wiz-screen[data-wiz-screen="intro"] .apx-wiz-lead {
	margin-inline: auto;
}

.apx-wiz-screen[data-wiz-screen="intro"] .apx-wiz-lead {
	font-size: 19px;
	font-weight: 600;
	color: #8286F2;
}

.apx-wiz-intro-media {
	position: relative;
	display: inline-block;
	margin-bottom: 8px;
}

.apx-wiz-intro-media img {
	width: 250px;
	height: auto;
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 18px 24px rgba(0, 0, 10, 0.6));
	animation: apx-wiz-hover 5s ease-in-out infinite;
}

.apx-wiz-intro-glow {
	position: absolute;
	left: 50%;
	bottom: -12px;
	transform: translateX(-50%);
	width: 200px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(ellipse, rgba(99, 105, 255, 0.45), transparent 70%);
	filter: blur(8px);
}

.apx-wiz-start {
	margin-top: 30px;
}

/* Campos */
.apx-wiz-field {
	margin-top: 30px;
}

.apx-wiz-field label {
	display: block;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.03em;
	color: rgba(255, 255, 255, 0.66);
	margin-bottom: 6px;
}

.apx-wiz-field input,
.apx-wiz-field textarea {
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 0;
	color: var(--white, #fff);
	font-family: inherit;
	font-size: 19px;
	padding: 8px 2px 12px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	caret-color: #6369FF;
}

.apx-wiz-field input:focus,
.apx-wiz-field textarea:focus {
	border-bottom-color: #6369FF;
	box-shadow: 0 12px 18px -14px rgba(99, 105, 255, 0.7);
}

.apx-wiz-field textarea {
	resize: vertical;
	min-height: 88px;
}

.apx-wiz-field input:-webkit-autofill {
	-webkit-text-fill-color: #fff;
	-webkit-box-shadow: 0 0 0 1000px #0B0B30 inset;
}

.apx-wiz-field.is-error input,
.apx-wiz-field.is-error textarea {
	border-bottom-color: #FF6B6B;
}

/* Chips de seleção (estruturas, varanda, preferência) */
.apx-wiz-chips {
	margin-top: 28px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.apx-wiz-chip {
	position: relative;
	cursor: pointer;
}

.apx-wiz-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.apx-wiz-chip span {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 22px;
	border-radius: 11px;
	border: 1px solid rgba(130, 134, 242, 0.45);
	background: rgba(130, 134, 242, 0.07);
	font-size: 15.5px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.92);
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.apx-wiz-chip span::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: 1.5px solid rgba(130, 134, 242, 0.8);
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.apx-wiz-chip:hover span {
	border-color: rgba(130, 134, 242, 0.9);
	transform: translateY(-2px);
}

.apx-wiz-chip input:focus-visible + span {
	outline: 2px solid #6369FF;
	outline-offset: 2px;
}

.apx-wiz-chip input:checked + span {
	background: linear-gradient(135deg, rgba(58, 61, 147, 0.95), rgba(99, 105, 255, 0.75));
	border-color: #6369FF;
	box-shadow: 0 10px 26px -12px rgba(99, 105, 255, 0.9);
}

.apx-wiz-chip input:checked + span::before {
	background: #43C6B8;
	border-color: #43C6B8;
	box-shadow: 0 0 10px rgba(67, 198, 184, 0.9);
}

/* Mensagem de erro da etapa */
.apx-wiz-error {
	margin-top: 18px;
	padding: 11px 14px;
	border-radius: 9px;
	border: 1px solid rgba(255, 107, 107, 0.5);
	background: rgba(255, 107, 107, 0.1);
	color: #FFC2C2;
	font-size: 14px;
	line-height: 1.5;
}

/* Confirmação de saída */
.apx-wiz-screen--exit {
	text-align: center;
	padding: 26px 0 10px;
}

.apx-wiz-screen--exit .apx-wiz-title,
.apx-wiz-screen--exit .apx-wiz-lead {
	margin-inline: auto;
}

.apx-wiz-exit-actions {
	margin-top: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.apx-wiz-leave {
	background: transparent;
	border: 0;
	color: rgba(255, 255, 255, 0.62);
	font-size: 14px;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.apx-wiz-leave:hover,
.apx-wiz-leave:focus-visible {
	color: #FF9D9D;
}

/* Sucesso */
.apx-wiz-screen--success {
	text-align: center;
	padding: 30px 0 12px;
}

.apx-wiz-screen--success .apx-wiz-title,
.apx-wiz-screen--success .apx-wiz-lead {
	margin-inline: auto;
}

.apx-wiz-screen--success .btn {
	margin-top: 28px;
}

.apx-wiz-check {
	display: inline-flex;
	margin-bottom: 20px;
}

.apx-wiz-check svg {
	width: 84px;
	height: 84px;
	stroke: #43C6B8;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	filter: drop-shadow(0 0 14px rgba(67, 198, 184, 0.7));
}

.apx-wiz-check circle {
	stroke-dasharray: 155;
	stroke-dashoffset: 155;
	animation: apx-wiz-draw 0.7s ease forwards;
}

.apx-wiz-check path {
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: apx-wiz-draw 0.45s ease 0.55s forwards;
}

/* ---------- Rodapé de navegação ---------- */

.apx-wiz-foot {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 14px;
	padding: 16px 30px 24px;
	border-top: 1px solid rgba(130, 134, 242, 0.2);
}

.apx-wiz-nav--back {
	justify-self: start;
	background: transparent;
	border: 1px solid rgba(130, 134, 242, 0.45);
	color: rgba(255, 255, 255, 0.85);
	border-radius: 8px;
	padding: 13px 24px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.apx-wiz-nav--back:hover,
.apx-wiz-nav--back:focus-visible {
	border-color: #8286F2;
	background: rgba(130, 134, 242, 0.1);
}

.apx-wiz-nav--back[disabled] {
	opacity: 0.35;
	cursor: default;
}

.apx-wiz-cancel {
	justify-self: center;
	background: transparent;
	border: 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 13.5px;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: color 0.2s ease;
}

.apx-wiz-cancel:hover,
.apx-wiz-cancel:focus-visible {
	color: var(--white, #fff);
}

.apx-wiz-nav--next {
	justify-self: end;
	min-width: 168px;
}

.apx-wiz-nav--next[disabled] {
	opacity: 0.6;
	cursor: wait;
}

/* Botão fechar */
.apx-wiz-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 4;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(130, 134, 242, 0.5);
	background: rgba(10, 10, 40, 0.55);
	color: rgba(255, 255, 255, 0.9);
	font-size: 20px;
	line-height: 1;
	transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.apx-wiz-close:hover,
.apx-wiz-close:focus-visible {
	background: rgba(99, 105, 255, 0.35);
	border-color: #8286F2;
	transform: rotate(90deg);
}

/* ---------- Animações ---------- */

@keyframes apx-wiz-fade {
	from { opacity: 0; }
}

@keyframes apx-wiz-pop {
	from { opacity: 0; transform: translateY(26px) scale(0.96); }
}

@keyframes apx-wiz-slide {
	from { opacity: 0; transform: translateX(34px); }
	to { opacity: 1; transform: none; }
}

@keyframes apx-wiz-slide-back {
	from { opacity: 0; transform: translateX(-34px); }
	to { opacity: 1; transform: none; }
}

@keyframes apx-wiz-scan {
	0% { top: 4%; opacity: 0; }
	8% { opacity: 0.5; }
	48% { opacity: 0.5; }
	56% { top: 96%; opacity: 0; }
	100% { top: 96%; opacity: 0; }
}

@keyframes apx-wiz-drift {
	0%, 100% { transform: translate(0, 0); }
	50% { transform: translate(26px, -22px); }
}

@keyframes apx-wiz-hover {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

@keyframes apx-wiz-shine {
	0% { background-position: 0% 0; }
	100% { background-position: 200% 0; }
}

@keyframes apx-wiz-draw {
	to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.apx-wiz-backdrop,
	.apx-wiz-dialog,
	.apx-wiz-screen,
	.apx-wiz-screen.is-back {
		animation: none;
	}

	.apx-wiz-scanline,
	.apx-wiz-orb,
	.apx-wiz-intro-media img,
	.apx-wiz-bar-fill {
		animation: none;
	}
}

/* ---------- Responsivo ---------- */

@media (max-width: 640px) {
	.apx-wiz {
		padding: 12px;
	}

	.apx-wiz-dialog {
		max-height: 94vh;
	}

	.apx-wiz-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		padding: 20px 60px 12px 22px;
	}

	.apx-wiz-progress {
		max-width: none;
		width: 100%;
	}

	.apx-wiz-progress-label {
		text-align: left;
	}

	.apx-wiz-body {
		padding: 8px 22px 20px;
	}

	.apx-wiz-intro-media img {
		width: 190px;
	}

	.apx-wiz-foot {
		grid-template-columns: auto auto;
		grid-template-areas:
			"back next"
			"cancel cancel";
		justify-content: space-between;
		padding: 14px 22px 20px;
	}

	.apx-wiz-nav--back { grid-area: back; }
	.apx-wiz-nav--next { grid-area: next; min-width: 0; }
	.apx-wiz-cancel { grid-area: cancel; justify-self: center; }
}
