.jvs-input-outer {
	display: flex;
	width: 100%;
	max-width: 100%;
	min-height: inherit;
	height: 100%;
	box-sizing: border-box;
	justify-content: stretch;
	align-items: center;
}

.jvs-input-wrapper {
	display: flex;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.jvs-input-outer,
.jvs-input-wrapper,
.jvs-input-wrapper * {
	box-sizing: border-box;
}

.jvs-input-wrapper.jvs-label-vertical {
	flex-direction: column;
	align-items: stretch;
	row-gap: 8px;
}

.jvs-input-wrapper.jvs-label-horizontal {
	flex-direction: row;
	align-items: center;
	column-gap: 12px;
}

.jvs-input-label {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	margin: 0;
	line-height: 1.3;
	color: #222222;
}

.jvs-input-required-mark {
	margin-left: 4px;
	color: #cc0000;
}

.jvs-input-field {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	border-style: solid;
	border-width: 1px;
	border-color: #cccccc;
	border-radius: 4px;
	background-color: #ffffff;
	color: #222222;
	outline: none;
	line-height: 1.4;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.jvs-input-field:focus {
	outline: none;
}

.jvs-input-field[readonly] {
	cursor: default;
}

.elementor-editor-active .jvs-input-outer,
.elementor-editor-active .jvs-input-wrapper {
	min-height: 1px;
}


/* JVS Input — texto excedente / seta como caractere v1.15 */
.jvs-input-control {
	--jvs-input-arrow-slot: 2ch;
	--jvs-input-arrow-offset-x: 0px;
	--jvs-input-arrow-offset-y: 0px;
	--jvs-input-panel-max-width: 100vw;
	--jvs-input-panel-user-max-width: 100%;
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: visible;
}

.jvs-input-control .jvs-input-field {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/*
 * A seta funciona como o último caractere reservado do texto.
 * O campo visual não muda.
 * Fundo, borda, sombra, largura e arredondamento continuam intactos.
 * Apenas a área onde o texto pode aparecer é reduzida.
 */
.jvs-input-control[data-jvs-overflow-enabled="yes"].jvs-input-has-overflow .jvs-input-field {
	padding-right: var(--jvs-input-arrow-slot) !important;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

/* No editor, mostra a área reservada mesmo antes do overflow para ajuste visual. */
.elementor-editor-active .jvs-input-control[data-jvs-overflow-enabled="yes"] .jvs-input-field {
	padding-right: var(--jvs-input-arrow-slot) !important;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

/*
 * A seta fica dentro do mesmo campo, no espaço reservado do texto.
 * Ela não empurra o input, não muda fundo, não muda borda e não cria bloco visual.
 */
.jvs-input-overflow-toggle {
	position: absolute;
	right: calc(var(--jvs-input-arrow-offset-x));
	top: 50%;
	transform: translateY(calc(-50% + var(--jvs-input-arrow-offset-y)));
	display: none;
	align-items: center;
	justify-content: center;
	width: var(--jvs-input-arrow-slot);
	min-width: var(--jvs-input-arrow-slot);
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: #555555;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	appearance: none;
	-webkit-appearance: none;
}

.jvs-input-overflow-toggle:hover,
.jvs-input-overflow-toggle:focus,
.jvs-input-overflow-toggle:active,
.jvs-input-overflow-toggle:visited {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: inherit;
}

.jvs-input-overflow-toggle::-moz-focus-inner {
	border: 0 !important;
	padding: 0 !important;
}

.jvs-input-control[data-jvs-overflow-enabled="yes"].jvs-input-has-overflow .jvs-input-overflow-toggle {
	display: inline-flex;
}

/* No editor do Elementor, a seta aparece para permitir personalização. */
.elementor-editor-active .jvs-input-control[data-jvs-overflow-enabled="yes"] .jvs-input-overflow-toggle {
	display: inline-flex;
	opacity: 0.65;
}

.elementor-editor-active .jvs-input-control[data-jvs-overflow-enabled="yes"].jvs-input-has-overflow .jvs-input-overflow-toggle {
	opacity: 1;
}

.jvs-input-overflow-icon,
.jvs-input-overflow-icon-down,
.jvs-input-overflow-icon-up {
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	pointer-events: none;
}

.jvs-input-overflow-icon-up {
	display: none;
}

.jvs-input-control.jvs-input-expanded .jvs-input-overflow-icon-down {
	display: none;
}

.jvs-input-control.jvs-input-expanded .jvs-input-overflow-icon-up {
	display: block;
}

/*
 * Campo expandido:
 * ÚNICA parte que pode sair para fora do widget.
 */
.jvs-input-overflow-panel {
	position: absolute;
	left: 0;
	top: calc(100% + 4px);
	display: none;
	width: max-content;
	max-width: min(var(--jvs-input-panel-max-width), var(--jvs-input-panel-user-max-width), 100vw);
	min-width: 100%;
	padding: 10px 12px;
	border-style: solid;
	border-width: 1px;
	border-color: #cccccc;
	border-radius: 4px;
	background-color: #ffffff;
	color: #222222;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: normal;
	z-index: 9999;
	box-sizing: border-box;
}

.jvs-input-control.jvs-input-expanded .jvs-input-overflow-panel {
	display: block;
}

.jvs-input-control[data-jvs-overflow-enabled="no"] .jvs-input-overflow-toggle,
.jvs-input-control[data-jvs-overflow-enabled="no"] .jvs-input-overflow-panel {
	display: none !important;
}


/* JVS Input v1.17 — select, radio, checkbox e adicionar */
.jvs-input-control select.jvs-input-field {
	appearance: auto;
	-webkit-appearance: auto;
}

.jvs-choice-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	width: 100%;
	max-width: 100%;
	background-color: transparent;
	border: 0;
	padding: 0;
}

.jvs-choice-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	cursor: pointer;
}

.jvs-choice-option input {
	margin: 0;
}

.jvs-input-add-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	border-style: solid;
	border-width: 0;
	background: transparent;
	color: #222222;
	cursor: pointer;
	line-height: 1.2;
	white-space: nowrap;
}

.jvs-input-add-button:hover,
.jvs-input-add-button:focus,
.jvs-input-add-button:active {
	outline: none;
	box-shadow: none;
}

.jvs-input-control[data-jvs-virtual-enabled="yes"] {
	display: flex;
	align-items: center;
	gap: 0;
}

.jvs-input-control[data-jvs-virtual-enabled="yes"] > .jvs-input-field,
.jvs-input-control[data-jvs-virtual-enabled="yes"] > select.jvs-input-field,
.jvs-input-control[data-jvs-virtual-enabled="yes"] > .jvs-choice-group {
	flex: 1 1 auto;
	min-width: 0;
}

.jvs-input-virtual-storage {
	display: none !important;
}


/* JVS Input v1.18 — orientação do radial */
.jvs-choice-radio-horizontal {
	flex-direction: row;
}
.jvs-choice-radio-vertical {
	flex-direction: column;
	align-items: flex-start;
}


/* JVS Input v1.19 — radio/checkbox marcado bloqueado */
.jvs-choice-option input[type="radio"]:disabled,
.jvs-choice-option input[type="checkbox"]:disabled {
	opacity: 1;
	cursor: default;
}

.jvs-choice-option:has(input:disabled) {
	cursor: default;
}


/* JVS Input v1.20 — radio/checkbox bloqueado sem cinza nativo */
.jvs-choice-group.jvs-choice-locked {
	cursor: default;
}

.jvs-choice-group.jvs-choice-locked .jvs-choice-option {
	cursor: default;
}

.jvs-choice-group.jvs-choice-locked .jvs-choice-option input[type="radio"],
.jvs-choice-group.jvs-choice-locked .jvs-choice-option input[type="checkbox"] {
	pointer-events: none;
	opacity: 1;
	cursor: default;
}

.jvs-choice-group.jvs-choice-locked .jvs-choice-option span {
	pointer-events: none;
}

/* Mantém a marcação colorida mesmo em modo apenas exibição. */
.jvs-choice-group.jvs-choice-locked .jvs-choice-option input[type="radio"]:checked,
.jvs-choice-group.jvs-choice-locked .jvs-choice-option input[type="checkbox"]:checked {
	opacity: 1;
	filter: none;
}


/* JVS Input v1.21 — reforço contra bloqueio geral externo */
.jvs-choice-option input[type="radio"]:checked,
.jvs-choice-option input[type="checkbox"]:checked,
.jvs-choice-option input[type="radio"]:checked:disabled,
.jvs-choice-option input[type="checkbox"]:checked:disabled,
.jvs-choice-option input[type="radio"]:checked[aria-readonly="true"],
.jvs-choice-option input[type="checkbox"]:checked[aria-readonly="true"],
.jvs-choice-option input[type="radio"]:checked[data-jvs-locked-option="1"],
.jvs-choice-option input[type="checkbox"]:checked[data-jvs-locked-option="1"] {
	opacity: 1 !important;
	filter: none !important;
}

.jvs-choice-group.jvs-choice-locked,
.jvs-choice-group[data-jvs-choice-locked="1"],
.jvs-choice-group[aria-readonly="true"] {
	opacity: 1 !important;
	filter: none !important;
}

.jvs-choice-group.jvs-choice-locked .jvs-choice-option,
.jvs-choice-group[data-jvs-choice-locked="1"] .jvs-choice-option,
.jvs-choice-group[aria-readonly="true"] .jvs-choice-option {
	opacity: 1 !important;
	filter: none !important;
}

/*
 * Se algum código externo bloquear a tela inteira com disabled,
 * o CSS acima tenta preservar a cor via accent-color configurada pelo Elementor.
 * Em alguns navegadores, radio/checkbox nativo disabled ainda pode limitar cor.
 */


/* JVS Input v1.26 — radio/checkbox com controles separados */
.jvs-choice-option {
	position: relative;
}

.jvs-choice-option input[type="radio"],
.jvs-choice-option input[type="checkbox"] {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	pointer-events: none;
}

.jvs-choice-custom-marker {
	--jvs-choice-mark-color: #2271b1;
	--jvs-choice-inner-size: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	min-width: 16px;
	min-height: 16px;
	border: 1px solid #777777;
	background: transparent;
	box-sizing: border-box;
	position: relative;
	opacity: 1;
	filter: none;
}

.jvs-choice-option input[type="radio"] + .jvs-choice-custom-marker {
	border-radius: 999px;
}

.jvs-choice-option input[type="checkbox"] + .jvs-choice-custom-marker {
	border-radius: 3px;
}

/* Radio marcado: somente pino interno muda com "Cor da marcação". */
.jvs-choice-option input[type="radio"]:checked + .jvs-choice-custom-marker::after {
	content: "";
	width: var(--jvs-choice-inner-size);
	height: var(--jvs-choice-inner-size);
	border-radius: 999px;
	background-color: var(--jvs-choice-mark-color);
	display: block;
}

/* Checkbox marcado: borda externa continua separada; check interno usa "Cor da marcação". */
.jvs-choice-option input[type="checkbox"]:checked + .jvs-choice-custom-marker {
	background: transparent;
}

.jvs-choice-option input[type="checkbox"]:checked + .jvs-choice-custom-marker::after {
	content: "✓";
	color: var(--jvs-choice-mark-color);
	font-size: var(--jvs-choice-inner-size);
	line-height: 1;
	font-weight: 700;
	display: block;
}

/* Preview no editor: primeira opção mostra a marcação mesmo sem estar selecionada. */
.elementor-editor-active .jvs-choice-option:first-child input[type="radio"] + .jvs-choice-custom-marker::after {
	content: "";
	width: var(--jvs-choice-inner-size);
	height: var(--jvs-choice-inner-size);
	border-radius: 999px;
	background-color: var(--jvs-choice-mark-color);
	display: block;
	opacity: 0.65;
}

.elementor-editor-active .jvs-choice-option:first-child input[type="checkbox"] + .jvs-choice-custom-marker::after {
	content: "✓";
	color: var(--jvs-choice-mark-color);
	font-size: var(--jvs-choice-inner-size);
	line-height: 1;
	font-weight: 700;
	display: block;
	opacity: 0.75;
}

.jvs-choice-group.jvs-choice-locked .jvs-choice-custom-marker,
.jvs-choice-group[data-jvs-choice-locked="1"] .jvs-choice-custom-marker,
.jvs-choice-group[aria-readonly="true"] .jvs-choice-custom-marker,
.jvs-choice-custom-marker,
.jvs-choice-custom-marker::before,
.jvs-choice-custom-marker::after {
	filter: none;
}


/* JVS Input v1.27 — obrigatório e alinhamento correto do rótulo */
.jvs-input-required-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	color: #d63638;
	font-size: 1em;
	margin-left: 4px;
	transform: translateY(0);
}


/* JVS Input v1.29 — obrigatório antes do rótulo */
.jvs-input-required-mark {
	order: -1;
	margin-left: 0 !important;
}


/* JVS Input v1.30 — espaçador entre obrigatório e rótulo */
.jvs-input-required-mark {
	order: -1;
	margin-left: 0 !important;
}


/* JVS Input v1.33 — tipo Texto longo com altura mínima reduzível */
textarea.jvs-input-field,
.jvs-input-textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	overflow-x: auto;
	overflow-y: auto;
	white-space: pre-wrap;
	word-break: normal;
	overflow-wrap: break-word;
	line-height: 1.4em !important;
	font-family: inherit;
	min-height: 1.4em;
	vertical-align: top;
}

/* No editor do Elementor, não força altura grande. */
.elementor-editor-active textarea.jvs-input-field,
.elementor-editor-active .jvs-input-textarea {
	min-height: 1.4em;
}

/* Altura automática só cresce se o controle estiver ativo. */
textarea.jvs-input-field[data-jvs-textarea-auto-resize="yes"],
.jvs-input-textarea[data-jvs-textarea-auto-resize="yes"] {
	overflow-y: hidden;
}

/* Altura automática desligada: respeita rows e permite barra de rolagem. */
textarea.jvs-input-field[data-jvs-textarea-auto-resize="no"],
.jvs-input-textarea[data-jvs-textarea-auto-resize="no"],
textarea.jvs-input-field:not([data-jvs-textarea-auto-resize="yes"]),
.jvs-input-textarea:not([data-jvs-textarea-auto-resize="yes"]) {
	overflow-y: auto;
	height: auto;
}

/* Melhora a área de acerto do redimensionamento no canto. */
textarea.jvs-input-field::-webkit-resizer,
.jvs-input-textarea::-webkit-resizer {
	width: 18px;
	height: 18px;
}
