/* ==========================================================================
   TemFestinha – Crie seu Evento | Frontend
   ========================================================================== */

.tfe-wrap {
	--tfe-primary: #7c3aed;
	--tfe-primary-dark: #5b21b6;
	--tfe-ring: rgba(124, 58, 237, 0.16);
	--tfe-bg: #f6f7fb;
	--tfe-border: #d9ddeb;
	--tfe-text: #111827;
	--tfe-muted: #6b7280;
	--tfe-soft: #9aa3b5;
	--tfe-error: #e53935;
	--tfe-ok: #22c55e;

	max-width: 660px;
	margin: 24px auto;
	padding: 24px 14px 48px;
	background: var(--tfe-bg);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--tfe-text);
	box-sizing: border-box;
	line-height: 1.45;
}
.tfe-wrap *,
.tfe-wrap *::before,
.tfe-wrap *::after {
	box-sizing: inherit;
}

/* Cabeçalho */
.tfe-title {
	margin: 0 0 6px;
	text-align: center;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.2px;
}
.tfe-subtitle {
	margin: 0 0 20px;
	text-align: center;
	font-size: 14px;
	color: var(--tfe-muted);
}

/* Barra de progresso */
.tfe-progress {
	margin: 0 auto 26px;
	max-width: 240px;
}
.tfe-progress-bar {
	display: block;
	height: 10px;
	border-radius: 99px;
	background: #e6e8f4;
	overflow: hidden;
}
.tfe-progress-fill {
	display: block;
	height: 100%;
	width: 33.33%;
	border-radius: 99px;
	background: linear-gradient(90deg, #5b8cff, var(--tfe-primary));
	transition: width 0.45s ease;
}
.tfe-progress-label {
	display: block;
	margin-top: 8px;
	text-align: center;
	font-size: 12px;
	color: var(--tfe-soft);
}

/* Cartão principal */
.tfe-form {
	background: #fff;
	border-radius: 18px;
	padding: 26px 22px 24px;
	box-shadow: 0 12px 32px rgba(23, 28, 54, 0.07);
}

/* Campos */
.tfe-field {
	margin-bottom: 20px;
}
.tfe-label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
}
.tfe-optional {
	font-weight: 500;
	font-size: 12px;
	color: var(--tfe-soft);
}
.tfe-required {
	color: #ef4444;
	margin-left: 2px;
}
.tfe-input,
.tfe-select {
	width: 100%;
	padding: 12px 14px;
	font-size: 14px;
	font-family: inherit;
	color: var(--tfe-text);
	background: #fff;
	border: 1.5px solid var(--tfe-border);
	border-radius: 10px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.tfe-input::placeholder {
	color: #a6adbe;
}
.tfe-input:focus,
.tfe-select:focus {
	outline: none;
	border-color: var(--tfe-primary);
	box-shadow: 0 0 0 3px var(--tfe-ring);
}
.tfe-input.is-invalid {
	border-color: var(--tfe-error);
}
.tfe-error {
	display: none;
	margin: 7px 0 0;
	font-size: 12.5px;
	color: var(--tfe-error);
}
.tfe-error.is-visible {
	display: block;
}

/* Grade 2 colunas (data/hora/sexo/idade) */
.tfe-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 14px;
}

/* Cards de tipo de evento */
.tfe-tipos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
.tfe-tipo {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 58px;
	padding: 9px 10px;
	cursor: pointer;
	background: #fff;
	border: 1.5px dashed var(--tfe-border);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
	color: #3f4759;
	line-height: 1.25;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.tfe-tipo input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.tfe-tipo:hover {
	border-color: #b9c0d8;
	box-shadow: 0 3px 10px rgba(23, 28, 54, 0.05);
}
.tfe-tipo-icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	background: #f3f5fa;
	border-radius: 9px;
	overflow: hidden;
}
.tfe-tipo-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tfe-tipo-nome {
	flex: 1 1 auto;
}
.tfe-tipo-check {
	flex: 0 0 auto;
	color: var(--tfe-ok);
	font-weight: 800;
	opacity: 0;
	transform: scale(0.5);
	transition: all 0.18s ease;
}
.tfe-tipo.is-selected,
.tfe-tipo:has(input:checked) {
	border: 1.5px dashed var(--tfe-ok);
	background: #f6fef9;
}
.tfe-tipo.is-selected .tfe-tipo-check,
.tfe-tipo:has(input:checked) .tfe-tipo-check {
	opacity: 1;
	transform: scale(1);
}
.tfe-tipo-extra {
	display: none;
}
.tfe-tipo-extra.is-open {
	display: flex;
}

/* Botão Ver mais / Ver menos */
.tfe-tipos-toggle {
	display: block;
	margin: 12px auto 0;
	padding: 8px 18px;
	cursor: pointer;
	font-size: 12.5px;
	font-weight: 600;
	font-family: inherit;
	color: #4b5468;
	background: #fff;
	border: 1.5px dashed var(--tfe-border);
	border-radius: 99px;
	transition: border-color 0.15s;
}
.tfe-tipos-toggle:hover {
	border-color: #b9c0d8;
}
.tfe-toggle-aberto {
	display: none;
}
.tfe-tipos-toggle[data-open="1"] .tfe-toggle-aberto {
	display: inline;
}
.tfe-tipos-toggle[data-open="1"] .tfe-toggle-fechado {
	display: none;
}

/* Botões */
.tfe-btn-primary {
	width: 100%;
	margin-top: 6px;
	padding: 15px 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.4px;
	color: #fff;
	background: linear-gradient(90deg, #5b8cff, var(--tfe-primary));
	border: none;
	border-radius: 12px;
	box-shadow: 0 8px 18px var(--tfe-ring);
	text-decoration: none;
	transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.tfe-btn-primary:hover:not(:disabled) {
	transform: translateY(-1px);
}
.tfe-btn-primary:disabled {
	background: #c6cad6;
	box-shadow: none;
	cursor: not-allowed;
}
.tfe-chevron {
	font-size: 18px;
	line-height: 1;
	transform: translateY(-1px);
}
.tfe-btn-back {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 10px;
	cursor: pointer;
	background: none;
	border: none;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--tfe-muted);
}
.tfe-btn-back:hover {
	color: var(--tfe-text);
}

/* Etapas */
.tfe-step {
	display: none;
}
.tfe-step.is-active {
	display: block;
	animation: tfe-fade 0.28s ease;
}
@keyframes tfe-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
.tfe-step-title {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 800;
}
.tfe-step-sub {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: var(--tfe-muted);
}

/* Resumo (etapa 3) */
.tfe-resumo {
	border: 1.5px solid #e7eaf3;
	border-radius: 12px;
	padding: 4px 16px;
	margin-bottom: 18px;
	background: #fbfcff;
}
.tfe-resumo-row {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid #eef0f7;
	font-size: 13.5px;
}
.tfe-resumo-row:last-child {
	border-bottom: none;
}
.tfe-resumo-k {
	color: var(--tfe-muted);
}
.tfe-resumo-v {
	font-weight: 700;
	text-align: right;
	word-break: break-word;
}

/* Rodapé */
.tfe-footer {
	margin-top: 16px;
	padding: 14px 16px;
	text-align: center;
	font-size: 13.5px;
	color: #3f4759;
	background: #fff;
	border: 1.5px solid #e2e6f2;
	border-radius: 12px;
}
.tfe-footer a {
	color: var(--tfe-primary);
	font-weight: 700;
	text-decoration: underline;
}

/* Alerta de erro */
.tfe-alert {
	margin-bottom: 16px;
	padding: 12px 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 10px;
}

/* Tela de sucesso */
.tfe-sucesso {
	background: #fff;
	border-radius: 18px;
	padding: 44px 26px;
	text-align: center;
	box-shadow: 0 12px 32px rgba(23, 28, 54, 0.07);
}
.tfe-sucesso-icon {
	font-size: 44px;
	margin-bottom: 10px;
}
.tfe-sucesso h2 {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
}
.tfe-sucesso p {
	margin: 0 0 22px;
	font-size: 14px;
	color: var(--tfe-muted);
}
.tfe-btn-inline {
	display: inline-flex;
	width: auto;
	margin: 0;
}

/* Responsivo */
@media (max-width: 560px) {
	.tfe-tipos {
		grid-template-columns: repeat(2, 1fr);
	}
	.tfe-grid-2 {
		grid-template-columns: 1fr;
	}
	.tfe-form {
		padding: 20px 16px;
	}
	.tfe-title {
		font-size: 22px;
	}
}
