/* ─── ENDA Form — Estilos ───────────────────────────────────────────────── */

:root {
	--enda-primary:       #c00;
	--enda-primary-dark:  #900;
	--enda-primary-light: #fff0f0;
	--enda-dark:          #000;
	--enda-white:         #fff;
	--enda-border:        #bbb;
	--enda-bg:            #fafafa;
	--enda-text:          #333;
	--enda-muted:         #888;
	--enda-shadow:        rgba(0, 0, 0, 0.1);
	--enda-focus-shadow:  rgba(204, 0, 0, 0.12);
	--enda-space:         20px;
	--enda-space-sm:      10px;
}

/* ─── Neutraliza o reset do hello-elementor nos botões do plugin ────────── */
/* O tema (reset.css) carrega DEPOIS do enda-form.css e aplica               */
/* border:#c36, color:#c36 em [type=button] com especificidade (0,1,0).      */
/* #enda-btn-resumo-mobile tem especificidade (1,0,0) e sempre supera isso.  */

.enda-form-wrap button,
.enda-form-wrap [type="button"],
.enda-form-wrap [type="submit"],
.enda-btn-resumo-mobile,
#enda-btn-resumo-mobile {
	background-color: transparent;
	border: none;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	padding: 0;
	text-align: inherit;
	transition: none;
	white-space: normal;
	-webkit-user-select: auto;
	user-select: auto;
}

.enda-form-wrap button:hover,
.enda-form-wrap [type="button"]:hover,
.enda-form-wrap [type="submit"]:hover,
.enda-btn-resumo-mobile:hover,
#enda-btn-resumo-mobile:hover {
	background-color: transparent;
	color: inherit;
	text-decoration: none;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */

.enda-form-wrap {
	margin: 0 0 30px;
}

/* Layout de duas colunas (formulário + resumo) */
.enda-layout {
	display: flex;
	gap: 30px;
}

.enda-form-col {
	flex: 1 1 0;
	min-width: 0;
	align-self: flex-start;
}

.enda-resumo-col {
	width: 300px;
	flex-shrink: 0;
}

/* ─── Seções ─────────────────────────────────────────────────────────────── */

.enda-section {
	border: 1px solid var(--enda-border);
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
	background: var(--enda-bg);
}

.enda-section-title {
	font-size: 1.1em;
	font-weight: 700;
	color: var(--enda-dark);
	margin: 0 0 var(--enda-space);
	padding-bottom: 10px;
	border-bottom: 2px solid var(--enda-primary);
}

/* ─── Fieldsets e campos ────────────────────────────────────────────────── */

.enda-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 var(--enda-space);
}

.enda-legend {
	font-weight: 600;
	font-size: 0.95em;
	margin-bottom: var(--enda-space-sm);
	color: var(--enda-text);
	display: block;
}

.enda-legend.required::after,
.enda-label.required::after {
	content: ' *';
	color: var(--enda-primary);
}

.enda-field {
	margin-bottom: var(--enda-space);
}

.enda-label {
	display: block;
	font-weight: 600;
	font-size: 0.92em;
	margin-bottom: 6px;
	color: var(--enda-text);
}

.enda-input,
.enda-select {
	width: 100%;
	padding: 9px 12px;
	border: 1.5px solid #bbb !important;
	border-radius: 5px;
	font-size: 0.95em;
	line-height: 1.4;
	transition: border-color 0.2s;
	background: var(--enda-white);
	box-sizing: border-box;
}

.enda-select {
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 30px;
	cursor: pointer;
}

.enda-input:focus,
.enda-select:focus {
	outline: none;
	border-color: var(--enda-primary);
	box-shadow: 0 0 0 3px var(--enda-focus-shadow);
}

.enda-textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1.5px solid #bbb !important;
	border-radius: 5px;
	font-size: 0.95em;
	resize: vertical;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.enda-textarea:focus {
	outline: none;
	border-color: var(--enda-primary);
	box-shadow: 0 0 0 3px var(--enda-focus-shadow);
}

.enda-input-num {
	width: 140px;
	padding: 8px 10px;
	border: 1.5px solid #bbb !important;
	border-radius: 5px;
	font-size: 0.92em;
}

/* ─── Radio e Checkbox ───────────────────────────────────────────────────── */

.enda-radio-label,
.enda-check-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: var(--enda-space-sm);
	cursor: pointer;
	font-size: 0.93em;
	line-height: 1.4;
}

/* Remove margem da última opção em cada fieldset */
.enda-fieldset > .enda-radio-label:last-child,
.enda-fieldset > .enda-check-label:last-child {
	margin-bottom: 0;
}

/* Radio/check dentro de contrib-wrap usam gap — sem margem extra */
.enda-contrib-wrap .enda-radio-label {
	margin-bottom: 0;
}

/* ─── Controles personalizados ──────────────────────────────────────────── */

.enda-radio-label input[type="radio"],
.enda-check-label input[type="checkbox"],
.enda-check-label input[type="radio"] {
	flex-shrink: 0;
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid #ccc;
	background: var(--enda-white);
	cursor: pointer;
	transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.enda-radio-label input[type="radio"],
.enda-check-label input[type="radio"] {
	border-radius: 50%;
}

.enda-check-label input[type="checkbox"] {
	border-radius: 4px;
	position: relative;
}

/* Neutraliza o ::after do tema que desenha um checkmark/dot via border */
.enda-check-label input[type="checkbox"]::after,
.enda-radio-label input[type="radio"]::after,
.enda-check-label input[type="radio"]::after {
	display: none !important;
}

/* Hover */
.enda-radio-label:hover input[type="radio"],
.enda-check-label:hover input[type="checkbox"],
.enda-check-label:hover input[type="radio"] {
	border-color: var(--enda-primary);
}

/* Checked — radio: ponto interno via box-shadow */
.enda-radio-label input[type="radio"]:checked,
.enda-check-label input[type="radio"]:checked {
	border-color: var(--enda-primary);
	box-shadow: inset 0 0 0 4px var(--enda-primary);
}

/* Checked — checkbox: fundo vermelho + checkmark SVG */
.enda-check-label input[type="checkbox"]:checked {
	background-color: var(--enda-primary);
	border-color: var(--enda-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.5 3.5 6.5-7' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 11px 11px;
}

/* Focus */
.enda-radio-label input[type="radio"]:focus,
.enda-check-label input[type="checkbox"]:focus,
.enda-check-label input[type="radio"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px var(--enda-focus-shadow);
}

.enda-radio-label input[type="radio"]:focus:checked,
.enda-check-label input[type="radio"]:focus:checked {
	box-shadow: inset 0 0 0 4px var(--enda-primary), 0 0 0 3px var(--enda-focus-shadow);
}

/* ─── Radios inline ──────────────────────────────────────────────────────── */

.enda-fieldset.enda-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 20px;
}

.enda-fieldset.enda-inline .enda-legend {
	width: 100%;
	margin-bottom: 6px;
}

.enda-fieldset.enda-inline .enda-radio-label,
.enda-fieldset.enda-inline .enda-check-label {
	margin-bottom: 0;
}

/* Subfield dentro de inline precisa de linha própria */
.enda-fieldset.enda-inline .enda-subfield {
	width: 100%;
	margin-left: 0;
}

/* ─── Radio estilo botão ─────────────────────────────────────────────────── */

.enda-radio-btn .enda-radio-label {
	border: 2px solid var(--enda-border);
	border-radius: 6px;
	padding: 7px 18px;
	margin-bottom: 0;
	font-weight: 600;
	font-size: 0.9em;
	color: var(--enda-text);
	transition: border-color 0.18s, background 0.18s, color 0.18s;
	user-select: none;
}

.enda-radio-btn .enda-radio-label input[type="radio"] {
	display: none;
}

.enda-radio-btn .enda-radio-label:hover {
	border-color: var(--enda-primary);
	color: var(--enda-primary);
}

.enda-radio-btn .enda-radio-label:has(input:checked) {
	background: var(--enda-primary);
	border-color: var(--enda-primary);
	color: var(--enda-white);
}

/* ─── Dias de participação — cards ───────────────────────────────────────── */

.enda-fieldset--dias {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.enda-fieldset--dias .enda-check-label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 10px 14px;
	margin-bottom: 0;
	border: 1.5px solid var(--enda-border);
	border-radius: 7px;
	background: var(--enda-white);
	transition: border-color 0.15s, background 0.15s;
}

.enda-fieldset--dias .enda-check-label:hover {
	border-color: var(--enda-primary);
	background: var(--enda-primary-light);
}

.enda-fieldset--dias .enda-check-label:has(input:checked) {
	border-color: var(--enda-primary);
	background: var(--enda-primary-light);
}

/* Dias extras (chegada/saída) — estilo discreto */
.enda-fieldset--dias .enda-dia-extra {
	border-style: dashed;
	background: var(--enda-bg);
}

.enda-fieldset--dias .enda-dia-extra .enda-dia-nome {
	color: var(--enda-muted);
}

/* Toggle integral — destaque especial */
.enda-fieldset--dias .enda-integral-toggle {
	border-color: var(--enda-dark);
	border-width: 2px;
	font-weight: 700;
	background: #f5f5f5;
	margin-top: 4px;
	margin-bottom: 4px;
}

.enda-fieldset--dias .enda-integral-toggle:has(input:checked) {
	background: var(--enda-dark);
	border-color: var(--enda-dark);
}

.enda-fieldset--dias .enda-integral-toggle:has(input:checked) .enda-dia-nome,
.enda-fieldset--dias .enda-integral-toggle:has(input:checked) .enda-integral-valor {
	color: var(--enda-white);
}

.enda-dia-nome {
	font-weight: 600;
}

.enda-dia-desc {
	color: #666;
	font-size: 0.88em;
}

.enda-dia-valor {
	margin-left: auto;
	font-weight: 700;
	color: var(--enda-primary);
	white-space: nowrap;
	font-size: 0.92em;
}

.enda-principal-riscado .enda-dia-valor {
	text-decoration: line-through;
	color: #aaa;
}

.enda-aviso-0709 {
	color: var(--enda-primary);
	font-size: 0.75em;
	font-style: italic;
	width: 100%;
	margin-left: 0;
}

/* Badge Inscrição Integral */
.enda-badge-integral {
	display: inline-block;
	background: var(--enda-primary);
	color: var(--enda-white);
	font-size: 0.85em;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 20px;
	margin-top: 10px;
	letter-spacing: 0.3px;
}

/* ─── Dormitório exclusivo ───────────────────────────────────────────────── */

.enda-adicional {
	color: var(--enda-primary);
	font-size: 0.88em;
}

/* ─── Contribuições ──────────────────────────────────────────────────────── */

.enda-contrib-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
}

/* ─── Campos em linha ────────────────────────────────────────────────────── */

.enda-fields-row {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: var(--enda-space);
}

.enda-fields-row .enda-field {
	flex: 1;
	margin-bottom: 0;
}

.enda-fields-row .enda-field--uf {
	flex: 0 0 90px;
}

/* ─── Subcampos condicionais ─────────────────────────────────────────────── */

.enda-subfield {
	margin-top: var(--enda-space-sm);
	margin-left: 26px;
}

/* ─── Texto informativo ──────────────────────────────────────────────────── */

.enda-info-text {
	background: var(--enda-primary-light);
	border-left: 4px solid var(--enda-primary);
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 0.88em;
	color: #444;
	margin-bottom: 16px;
	line-height: 1.55;
}

/* ─── Erros ──────────────────────────────────────────────────────────────── */

.enda-field-error {
	color: var(--enda-primary);
	font-size: 0.83em;
	display: block;
	margin-top: 4px;
}

/* ─── LGPD ───────────────────────────────────────────────────────────────── */

.enda-lgpd-wrap {
	background: var(--enda-bg);
	border: 1px solid var(--enda-border);
	border-radius: 6px;
	padding: 14px;
	margin-top: 10px;
}

.enda-lgpd-label span {
	font-size: 0.88em;
	color: #555;
	line-height: 1.5;
}

/* ─── Aviso de rascunho ──────────────────────────────────────────────────── */

.enda-aviso-draft-pendente {
	background: #fffbe6;
	border: 1px solid #f0c040;
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 18px;
	font-size: 0.9em;
}

.enda-aviso-draft-pendente__titulo {
	margin: 0 0 10px;
	font-weight: 600;
}

.enda-aviso-draft-pendente__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 8px 0;
	border-top: 1px solid #f0c04066;
}

.enda-aviso-draft-pendente__item:first-of-type {
	border-top: none;
}

.enda-aviso-draft-pendente__info {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
}

.enda-aviso-draft-pendente__pedido {
	font-weight: 600;
}

.enda-aviso-draft-pendente__data,
.enda-aviso-draft-pendente__nomes {
	color: var(--enda-text-muted, #666);
}

.enda-aviso-draft-pendente__btn {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	padding: 7px 16px;
	border-radius: 6px;
	border: none;
	background: var(--enda-primary, #c00);
	color: #fff !important;
	font-size: 0.85em;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(204,0,0,.25);
	transition: background .15s, box-shadow .15s;
	cursor: pointer;
}

.enda-aviso-draft-pendente__btn:hover {
	background: var(--enda-primary-dark, #a00);
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(204,0,0,.35);
}

.enda-aviso-rascunho-info {
	font-size: 0.85em;
	color: var(--enda-text-muted, #666);
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.enda-aviso-rascunho-info::before {
	content: 'ℹ';
	font-size: 1em;
	flex-shrink: 0;
}

.enda-draft-notice {
	background: #f5f5f5;
	border: 1px solid var(--enda-border);
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.9em;
}

.enda-btn-draft {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 14px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 0.82em;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.enda-form-wrap .enda-btn-restaurar {
	background: var(--enda-primary);
	border: 2px solid var(--enda-primary);
	border-radius: 6px;
	color: var(--enda-white);
	padding: 7px 18px;
	font-weight: 600;
	font-size: 0.9em;
	transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.enda-form-wrap .enda-btn-restaurar:hover {
	background: var(--enda-primary-dark);
	border-color: var(--enda-primary-dark);
	color: var(--enda-white);
}

.enda-form-wrap .enda-btn-ignorar {
	background: transparent;
	border: 2px solid var(--enda-border);
	border-radius: 6px;
	color: var(--enda-text);
	padding: 7px 18px;
	font-weight: 600;
	font-size: 0.9em;
	transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.enda-form-wrap .enda-btn-ignorar:hover {
	border-color: var(--enda-primary);
	color: var(--enda-primary);
}

/* ─── Box de Resumo ──────────────────────────────────────────────────────── */

.enda-resumo-box {
	border: 2px solid var(--enda-dark);
	border-radius: 8px;
	overflow: hidden;
	position: sticky;
	top: 100px;
	background: var(--enda-white);
	box-shadow: 0 4px 16px var(--enda-shadow);
}

.enda-resumo-titulo {
	background: var(--enda-dark);
	color: var(--enda-white);
	font-weight: 700;
	font-size: 0.88em;
	letter-spacing: 0.5px;
	padding: 12px 16px;
	text-align: center;
}

.enda-resumo-vazio {
	padding: 20px 16px;
	color: var(--enda-muted);
	font-size: 0.88em;
	text-align: center;
	font-style: italic;
}

.enda-resumo-lista {
	list-style: none;
	margin: 0;
	padding: 0;
}

.enda-resumo-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	font-size: 0.88em;
	border-bottom: 1px solid #eee;
}

.enda-resumo-row span:first-child {
	color: #444;
	flex: 1;
}

.enda-resumo-row span:last-child {
	font-weight: 600;
	white-space: nowrap;
	color: var(--enda-dark);
}

.enda-resumo-desconto {
	padding: 6px 14px 0;
}

#enda-desconto-section {
	padding: 6px 0 0;
}

.enda-desconto-badge {
	display: block;
	background: var(--enda-primary-light);
	border: 1px solid var(--enda-primary);
	border-radius: 4px;
	padding: 5px 10px;
	font-size: 0.8em;
	font-weight: 600;
	color: var(--enda-primary);
	text-align: center;
	margin-bottom: 6px;
}

.enda-row-desconto span:last-child {
	color: var(--enda-primary);
	font-weight: 700;
}

.enda-preco-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1px;
}

.enda-preco-riscado {
	text-decoration: line-through;
	color: var(--enda-muted);
	font-weight: 400;
	font-size: 0.82em;
}

.enda-preco-promo {
	color: var(--enda-primary);
	font-weight: 700;
}

.enda-total-original-valor {
	text-decoration: line-through;
	color: var(--enda-muted);
	font-weight: 600;
}

.enda-row-total-original span:last-child {
	text-decoration: line-through;
	color: var(--enda-muted);
}

.enda-resumo-total-wrap {
	padding: 0 14px 14px;
}

.enda-resumo-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--enda-dark);
	color: var(--enda-white);
	padding: 10px 14px;
	border-radius: 5px;
	margin-top: 8px;
	font-weight: 700;
	font-size: 0.85em;
}

.enda-total-valor {
	font-size: 1.15em;
}

/* ─── Ocultar campo de quantidade ────────────────────────────────────────── */

.enda-form-wrap ~ .quantity {
	display: none !important;
}

/* ─── Ocultar seletor de quantidade nos blocos de cart e checkout ─────────── */

.wc-block-components-quantity-selector {
	display: none !important;
}

/* ─── Botão WooCommerce "Inscreva-se" / Add to Cart ─────────────────────── */

.woocommerce button.single_add_to_cart_button {
	background: var(--enda-primary) !important;
	border: 2px solid var(--enda-primary) !important;
	border-radius: 5px !important;
	color: var(--enda-white) !important;
	font-weight: 700 !important;
	font-size: 1em !important;
	line-height: 1.4 !important;
	padding: 14px 28px !important;
	width: 100% !important;
	display: block !important;
	text-align: center !important;
	margin-top: 16px !important;
	cursor: pointer !important;
	transition: background 0.2s, border-color 0.2s !important;
	-webkit-font-smoothing: antialiased;
	text-decoration: none !important;
}

.woocommerce button.single_add_to_cart_button:hover,
.woocommerce button.single_add_to_cart_button:focus {
	background: var(--enda-primary-dark) !important;
	border-color: var(--enda-primary-dark) !important;
	color: var(--enda-white) !important;
	text-decoration: none !important;
}

.woocommerce button.single_add_to_cart_button.loading,
.woocommerce button.single_add_to_cart_button:disabled {
	opacity: 0.7 !important;
	cursor: not-allowed !important;
}

/* ─── Botão flutuante de resumo (mobile) ─────────────────────────────────── */
/* Esconde no desktop via min-width para evitar conflito !important vs !important */
/* no mobile, onde o display:flex deve vencer sem concorrente igual-prioridade.  */

@media (min-width: 769px) {
	.enda-btn-resumo-mobile-wrap,
	#enda-btn-resumo-mobile-wrap {
		display: none !important;
	}
}

#enda-resumo-fechar {
	display: none;
}

#enda-resumo-continuar {
	display: none;
}

/* ─── Responsivo ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.enda-layout {
		flex-direction: column;
	}

	/* Resumo aparece inline no fluxo normal (antes do botão de envio);    */
	/* ao abrir pelo botão flutuante, vira bottom sheet fixo sobre a tela. */
	.enda-resumo-col {
		width: 100%;
	}

	.enda-resumo-box {
		position: static;
	}

	.enda-resumo-col.enda-resumo-col--open {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		max-height: 80vh;
		overflow-y: auto;
		z-index: 10000;
		box-sizing: border-box;
	}

	.enda-resumo-col.enda-resumo-col--open .enda-resumo-box {
		border-radius: 16px 16px 0 0;
		border-bottom: none;
		box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
	}

	.enda-resumo-titulo {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.enda-resumo-col.enda-resumo-col--open .enda-resumo-titulo {
		border-radius: 16px 16px 0 0;
	}

	.enda-resumo-col.enda-resumo-col--open .enda-resumo-fechar,
	.enda-resumo-col.enda-resumo-col--open #enda-resumo-fechar {
		display: flex;
		align-items: center;
		justify-content: center;
		background: none;
		border: none;
		color: #fff;
		font-size: 1.1em;
		cursor: pointer;
		padding: 0;
		line-height: 1;
		opacity: 0.8;
		flex-shrink: 0;
	}

	.enda-resumo-col.enda-resumo-col--open .enda-resumo-fechar:hover,
	.enda-resumo-col.enda-resumo-col--open #enda-resumo-fechar:hover {
		background-color: transparent;
		color: #fff;
		opacity: 1;
	}

	.enda-resumo-col.enda-resumo-col--open #enda-resumo-continuar {
		display: block;
		text-align: center;
		padding: 0 14px 14px;
		color: var(--enda-primary);
		font-weight: 600;
		font-size: 0.85em;
		text-decoration: underline;
	}

	/* Overlay escuro */
	.enda-resumo-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,0.45);
		z-index: 9999;
	}

	.enda-resumo-overlay.enda-resumo-overlay--open {
		display: block;
	}

	/* Wrapper flutuante fixo na parte inferior: tooltip + botão + valor total */
	.enda-btn-resumo-mobile-wrap,
	#enda-btn-resumo-mobile-wrap {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		gap: 8px;
		position: fixed;
		bottom: 18px;
		left: 50%;
		transform: translateX(-50%);
		z-index: 9998;
	}

	/* Oculto quando o #enda-resumo-col entra na viewport (ver IntersectionObserver no JS) */
	.enda-btn-resumo-mobile-wrap.enda-btn-resumo-mobile-wrap--escondido,
	#enda-btn-resumo-mobile-wrap.enda-btn-resumo-mobile-wrap--escondido {
		display: none !important;
	}

	/* #enda-btn-resumo-mobile (especif. 1,0,0) supera [type=button] do reset.css (0,1,0) */
	.enda-btn-resumo-mobile,
	#enda-btn-resumo-mobile {
		display: flex !important;
		align-items: center;
		justify-content: center;
		gap: 8px;
		background: var(--enda-dark);
		color: var(--enda-white);
		border: none;
		border-radius: 50px;
		padding: 12px 24px;
		font-size: 0.92em;
		font-weight: 700;
		cursor: pointer;
		box-shadow: 0 4px 16px rgba(0,0,0,0.25);
		white-space: nowrap;
		transition: background 0.18s, box-shadow 0.18s;
	}

	.enda-btn-resumo-mobile:hover,
	#enda-btn-resumo-mobile:hover {
		background: #222;
		color: var(--enda-white);
		border: none;
		box-shadow: 0 6px 20px rgba(0,0,0,0.32);
	}

	/* Tooltip de dica acima do botão */
	.enda-resumo-tooltip {
		display: flex;
		align-items: center;
		gap: 8px;
		background: #555;
		color: var(--enda-white);
		border-radius: 8px;
		padding: 8px 12px;
		font-size: 0.82em;
		font-weight: 600;
		box-shadow: 0 4px 14px rgba(0,0,0,0.2);
		white-space: nowrap;
		position: relative;
	}

	.enda-resumo-tooltip::after {
		content: '';
		position: absolute;
		bottom: -6px;
		left: 50%;
		transform: translateX(-50%);
		border-width: 6px 6px 0 6px;
		border-style: solid;
		border-color: #555 transparent transparent transparent;
	}

	.enda-resumo-tooltip--pulse {
		animation: enda-tooltip-pulse 0.9s ease-in-out;
	}

	@keyframes enda-tooltip-pulse {
		0%, 100% { transform: scale(1); }
		25%, 75% { transform: scale(1.08); }
		50% { transform: scale(1); }
	}

	.enda-resumo-tooltip-fechar {
		background: none;
		border: none;
		color: var(--enda-white);
		font-size: 1em;
		line-height: 1;
		cursor: pointer;
		padding: 0;
		flex-shrink: 0;
		opacity: 0.8;
	}

	.enda-resumo-tooltip-fechar:hover {
		color: var(--enda-white);
		opacity: 1;
	}

	.enda-resumo-tooltip[hidden] {
		display: none;
	}

	/* Valor total exibido abaixo do botão */
	.enda-btn-resumo-mobile-valor {
		background: var(--enda-dark);
		color: var(--enda-white);
		border-radius: 50px;
		padding: 4px 16px;
		font-size: 0.8em;
		font-weight: 700;
		white-space: nowrap;
		box-shadow: 0 4px 16px rgba(0,0,0,0.25);
	}

	.enda-contrib-wrap {
		flex-direction: column;
		gap: 4px;
	}
}

@media (max-width: 480px) {
	.enda-section {
		padding: 16px;
	}

	.enda-section-title {
		font-size: 1em;
	}
}

/* ─── Cards de inscritos adicionados ─────────────────────────────────────── */

.enda-inscritos-adicionados {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.enda-inscrito-card {
	border: 2px solid #2e7d32;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f8f1;
}

.enda-inscrito-card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
}

.enda-inscrito-check {
	color: #2e7d32;
	font-size: 1.1em;
	font-weight: 700;
	flex-shrink: 0;
}

.enda-inscrito-nome {
	flex: 1;
	font-size: 0.95em;
	color: #1b5e20;
}

.enda-inscrito-toggle {
	background: none;
	border: 1px solid #2e7d32;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 0.75em;
	color: #2e7d32;
	cursor: pointer;
	flex-shrink: 0;
	line-height: 1.4;
}

.enda-inscrito-toggle:hover {
	background: #2e7d32;
	color: #fff;
}

.enda-inscrito-card-body {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 8px 16px 12px;
	font-size: 0.88em;
	color: #333;
	border-top: 1px solid #c8e6c9;
}

.enda-inscrito-card:not(.enda-inscrito-card--open) .enda-inscrito-card-body {
	display: none;
}

.enda-inscrito-preco {
	font-weight: 700;
	white-space: nowrap;
	color: #1b5e20;
}

/* ─── Botão "Editar inscrição" (carrinho, checkout e modo edição) ────────── */

.enda-btn-editar {
	display: inline-block;
	font-size: 0.8em;
	font-weight: 600;
	color: #555 !important;
	border: 1px solid #bbb;
	border-radius: 4px;
	padding: 2px 10px;
	text-decoration: none !important;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}

.enda-btn-editar:hover {
	background: #555;
	color: #fff !important;
	border-color: #555;
}

.enda-editar-wrap {
	margin-top: 5px;
}

/* ─── Aviso de modo edição no topo do formulário ────────────────────────── */

.enda-edit-mode-notice {
	background: #fff8e1;
	border: 1px solid #f9a825;
	border-left: 4px solid #f9a825;
	border-radius: 5px;
	padding: 10px 16px;
	margin-bottom: 18px;
	font-size: 0.9em;
	color: #555;
}

.enda-edit-mode-notice strong {
	color: #333;
}

.enda-edit-mode-notice a {
	color: #555;
	text-decoration: underline;
}

.enda-edit-mode-notice a:hover {
	color: #333;
}

/* ─── Botão "Ir para o carrinho" ─────────────────────────────────────────── */

.enda-btn-ir-carrinho {
	display: inline-block;
	margin-top: 10px;
	background: transparent !important;
	border: 2px solid var(--enda-dark) !important;
	color: var(--enda-dark) !important;
}

.enda-btn-ir-carrinho:hover {
	background: var(--enda-dark) !important;
	color: var(--enda-white) !important;
}

/* ─── Erros AJAX ─────────────────────────────────────────────────────────── */

.enda-erros-ajax {
	background: #fff0f0;
	border: 1px solid var(--enda-primary);
	border-left-width: 4px;
	border-radius: 5px;
	padding: 12px 16px 12px 20px;
	margin-bottom: 16px;
	color: #900;
	font-size: 0.9em;
	list-style: disc;
}

.enda-erros-ajax li {
	margin-bottom: 4px;
}

.enda-erros-ajax li:last-child {
	margin-bottom: 0;
}

/* ─── CEP — spinner e erro ───────────────────────────────────────────────── */

.enda-cep-spinner {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	border: 2px solid rgba(204, 0, 0, 0.2);
	border-top-color: var(--enda-primary);
	border-radius: 50%;
	animation: enda-spin 0.7s linear infinite;
	pointer-events: none;
	display: none;
}

@keyframes enda-spin {
	to { transform: translateY(-50%) rotate(360deg); }
}

#billing_postcode.enda-cep-error,
#billing-postcode.enda-cep-error {
	border-color: var(--enda-primary);
	box-shadow: 0 0 0 3px var(--enda-focus-shadow);
}

/* ─── Select2 — cidade ──────────────────────────────────────────────────── */

#enda-form-wrap .select2-container {
	width: 100% !important;
}

#enda-form-wrap .select2-container--default .select2-selection--single {
	height: auto;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 0.95em;
	line-height: 1.4;
	background: var(--enda-white);
	transition: border-color 0.2s;
	box-sizing: border-box;
}

#enda-form-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	line-height: inherit;
	color: var(--enda-text);
}

#enda-form-wrap .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--enda-muted);
}

#enda-form-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0;
}

#enda-form-wrap .select2-container--default.select2-container--focus .select2-selection--single,
#enda-form-wrap .select2-container--default.select2-container--open .select2-selection--single {
	outline: none;
	border-color: var(--enda-primary);
	box-shadow: 0 0 0 3px var(--enda-focus-shadow);
}

.enda-select2-dropdown .select2-results__option--highlighted,
.enda-select2-dropdown .select2-results__option--highlighted[aria-selected] {
	background-color: var(--enda-primary) !important;
	color: #fff !important;
}
