/* Kitxune Contact — formulario. Personalizable con variables en .kc-wrap (o el color de acento del formulario). */
.kc-wrap {
	--kc-accent: #1f4fd1;
	--kc-text: inherit;
	--kc-muted: #6b7280;
	--kc-border: #cfd4dc;
	--kc-bg: #fff;
	--kc-soft: #f5f6f8;
	--kc-error: #b42318;
	--kc-ok: #067647;
	--kc-radius: 6px;
	--kc-gap: 18px;
	color: var(--kc-text);
	font: inherit;
}
.kc-wrap *, .kc-wrap *::before, .kc-wrap *::after { box-sizing: border-box; }
/* --kc-input-border: borde de los campos (contraste mínimo 3:1 sobre blanco) */
.kc-fields, .kc-row-fields { display: flex; flex-wrap: wrap; gap: var(--kc-gap) 16px; }
.kc-field { flex: 1 1 100%; min-width: 0; }
.kc-field[hidden], .kc-hidden { display: none !important; }
.kc-w-half { flex-basis: calc(50% - 8px); }
.kc-w-third { flex-basis: calc(33.333% - 11px); }
.kc-w-two-thirds { flex-basis: calc(66.666% - 6px); }
@media (max-width: 640px) { .kc-w-half, .kc-w-third, .kc-w-two-thirds { flex-basis: 100%; } }

.kc-label { display: block; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.kc-req { color: var(--kc-error); }
.kc-help { display: block; color: var(--kc-muted); font-size: .875em; margin: -2px 0 6px; line-height: 1.4; }
.kc-input {
	display: block; width: 100%; min-height: 44px; padding: 10px 12px;
	border: 1px solid var(--kc-border); border-radius: var(--kc-radius); background: var(--kc-bg);
	font: inherit; color: inherit; line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
textarea.kc-input { min-height: 0; resize: vertical; }
.kc-input:focus { outline: none; border-color: var(--kc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kc-accent) 20%, transparent); }
select.kc-input { appearance: auto; }

.kc-choices { display: flex; flex-direction: column; gap: 8px; }
.kc-choices.kc-inline { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
.kc-choice { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.4; font-weight: 400; }
.kc-choice input { margin: .2em 0 0; width: 18px; height: 18px; accent-color: var(--kc-accent); flex: none; }
.kc-acceptance a { color: var(--kc-accent); }

.kc-stepper { display: flex; }
.kc-stepper .kc-input { border-radius: 0; text-align: center; -moz-appearance: textfield; }
.kc-stepper .kc-input::-webkit-inner-spin-button, .kc-stepper .kc-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.kc-step {
	flex: none; width: 46px; border: 1px solid var(--kc-border); background: var(--kc-soft); color: inherit;
	font-size: 20px; line-height: 1; cursor: pointer;
}
.kc-step:first-child { border-radius: var(--kc-radius) 0 0 var(--kc-radius); border-right: 0; }
.kc-step:last-child { border-radius: 0 var(--kc-radius) var(--kc-radius) 0; border-left: 0; }
.kc-step:hover { background: color-mix(in srgb, var(--kc-accent) 10%, var(--kc-soft)); }

.kc-type-calc { background: var(--kc-soft); border-radius: var(--kc-radius); padding: 14px 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kc-type-calc .kc-label { margin: 0; }
.kc-calc-out { font-size: 1.75em; font-weight: 700; color: var(--kc-accent); line-height: 1; }

.kc-heading { margin: 8px 0 0; }
.kc-html > :first-child { margin-top: 0; }
.kc-html > :last-child { margin-bottom: 0; }
.kc-divider { border: 0; border-top: 1px solid var(--kc-border); margin: 4px 0; }

.kc-rows { display: flex; flex-direction: column; gap: 14px; }
.kc-row { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--kc-border); border-left: 4px solid var(--kc-accent); border-radius: var(--kc-radius); background: var(--kc-bg); position: relative; }
.kc-row-title { font-weight: 700; padding: 0 6px; margin-left: -6px; }
.kc-rep-empty > .kc-rows { display: none; }
.kc-add, .kc-remove { font: inherit; cursor: pointer; border-radius: var(--kc-radius); }
.kc-add { margin-top: 12px; padding: 8px 14px; border: 1px dashed var(--kc-accent); background: transparent; color: var(--kc-accent); font-weight: 600; }
.kc-remove { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border: 1px solid var(--kc-border); background: var(--kc-bg); color: var(--kc-muted); font-size: .85em; }

.kc-error { color: var(--kc-error); font-size: .875em; margin-top: 6px; }
.kc-has-error .kc-input, .kc-has-error .kc-choices { border-color: var(--kc-error); }
.kc-has-error .kc-choices { border-left: 3px solid var(--kc-error); padding-left: 10px; }

.kc-message { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--kc-radius); line-height: 1.5; }
.kc-message--error { background: #fef3f2; color: var(--kc-error); border: 1px solid #fecdca; }
.kc-message--ok { background: #ecfdf3; color: var(--kc-ok); border: 1px solid #abefc6; margin-top: 0; }
.kc-message--info { background: var(--kc-soft); border: 1px solid var(--kc-border); margin-top: 0; }
.kc-message:focus { outline: 2px solid var(--kc-accent); outline-offset: 2px; }

.kc-actions { margin-top: 22px; }
.kc-submit {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px;
	border: 0; border-radius: var(--kc-radius); background: var(--kc-accent); color: #fff;
	font: inherit; font-weight: 700; cursor: pointer; transition: filter .15s, transform .05s;
}
.kc-submit:hover { filter: brightness(1.08); }
.kc-submit:active { transform: translateY(1px); }
.kc-submit:disabled { opacity: .65; cursor: progress; }
.kc-sending { cursor: progress; }

.kc-compact { --kc-gap: 12px; }
.kc-compact .kc-input { min-height: 38px; padding: 7px 10px; }

/* Opciones como botones grandes (radio / casillas con «Aspecto: botones grandes») */
.kc-choices--buttons, .kc-choices--buttons.kc-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kc-choices--buttons .kc-choice {
	position: relative; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px;
	border: 2px solid var(--kc-border); border-radius: var(--kc-radius); background: var(--kc-bg);
	font-weight: 600; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.kc-choices--buttons .kc-choice:hover { border-color: color-mix(in srgb, var(--kc-accent) 55%, var(--kc-border)); }
.kc-choices--buttons .kc-choice input { margin: 0; width: 22px; height: 22px; }
.kc-choices--buttons .kc-choice:has(input:checked) { border-color: var(--kc-accent); background: color-mix(in srgb, var(--kc-accent) 8%, var(--kc-bg)); box-shadow: 0 0 0 1px var(--kc-accent); }
.kc-choices--buttons .kc-choice:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--kc-accent) 35%, transparent); outline-offset: 2px; }
.kc-choices--buttons .kc-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.kc-choice-text { display: flex; flex-direction: column; line-height: 1.25; }
.kc-choice-price { font-weight: 400; color: var(--kc-muted); font-size: .85em; margin-top: 2px; }
.kc-has-error .kc-choices--buttons { border-left: 0; padding-left: 0; }
.kc-has-error .kc-choices--buttons .kc-choice { border-color: var(--kc-error); }

/* Títulos numerados como pasos («Numerar los títulos como pasos») */
.kc-steps .kc-fields { counter-reset: kc-step; }
.kc-steps .kc-type-heading { counter-increment: kc-step; }
.kc-steps .kc-type-heading:not(:first-child) { margin-top: 14px; padding-top: 22px; border-top: 1px solid var(--kc-border); }
.kc-steps .kc-heading { display: flex; align-items: center; gap: 12px; }
.kc-steps .kc-heading::before {
	content: counter(kc-step); flex: none; display: inline-grid; place-items: center; width: 1.9em; height: 1.9em;
	border-radius: 50%; background: var(--kc-accent); color: #fff; font-size: .8em; font-weight: 700; line-height: 1;
}

/* Tamaño grande: letra, campos y botones más grandes (móvil y personas mayores) */
.kc-large { --kc-gap: 22px; --kc-radius: 8px; font-size: 1.0625rem; }
.kc-large .kc-label { font-size: 1.05em; margin-bottom: 8px; }
.kc-large .kc-help { font-size: .9em; margin: -4px 0 8px; }
.kc-large .kc-input { min-height: 56px; padding: 14px 16px; font-size: 1.05em; border-width: 2px; }
.kc-large textarea.kc-input { min-height: 0; }
.kc-large .kc-heading { font-size: 1.35em; line-height: 1.2; margin: 0; }
.kc-large .kc-stepper { max-width: 240px; }
.kc-large .kc-step { width: 60px; font-size: 26px; border-width: 2px; font-weight: 700; color: var(--kc-accent); }
.kc-large .kc-stepper .kc-input { font-size: 1.35em; font-weight: 700; }
.kc-large .kc-choice { font-size: 1em; }
.kc-large .kc-choice input { width: 22px; height: 22px; }
.kc-large .kc-acceptance { padding: 14px 16px; border-radius: var(--kc-radius); background: var(--kc-soft); }
.kc-large .kc-row { padding: 18px 20px 20px; border-width: 1px 1px 1px 5px; background: var(--kc-soft); }
.kc-large .kc-row .kc-input, .kc-large .kc-row .kc-choice { background-color: var(--kc-bg); }
.kc-large .kc-row-title { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05em; padding: 4px 12px; margin-left: -8px; border-radius: 999px; background: var(--kc-accent); color: #fff; }
.kc-large .kc-type-calc { padding: 18px 22px; border: 2px solid var(--kc-accent); background: color-mix(in srgb, var(--kc-accent) 6%, var(--kc-bg)); flex-wrap: wrap; }
.kc-large .kc-type-calc .kc-label { font-size: 1.15em; }
.kc-large .kc-type-calc .kc-help { flex-basis: 100%; order: 3; margin: 4px 0 0; }
.kc-large .kc-calc-out { font-size: 2.2em; }
.kc-large .kc-actions { margin-top: 26px; }
.kc-large .kc-submit { width: 100%; min-height: 62px; font-size: 1.2em; letter-spacing: .01em; box-shadow: 0 6px 18px color-mix(in srgb, var(--kc-accent) 28%, transparent); }
.kc-large .kc-message { font-size: 1em; padding: 16px 20px; }
.kc-large .kc-message--ok { padding: 24px; text-align: center; font-size: 1.1em; }
.kc-large .kc-error { font-size: .95em; font-weight: 600; }
@media (max-width: 640px) { .kc-large { --kc-gap: 18px; } .kc-large .kc-row { padding: 16px 14px; } }

/* Bloques de texto con clase kc-note / kc-chips */
.kc-note { padding: 14px 18px; border-radius: var(--kc-radius); background: var(--kc-soft); border-left: 4px solid var(--kc-accent); line-height: 1.5; }
.kc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kc-chips li { padding: 6px 12px; border-radius: 999px; background: var(--kc-soft); border: 1px solid var(--kc-border); font-size: .9em; font-weight: 600; }

/* Clase «kc-bar» en un campo: barra a todo el ancho con la pregunta a la izquierda y el control a la derecha */
.kc-field.kc-bar {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: center;
	padding: 16px 20px; border: 1px solid var(--kc-border); border-radius: var(--kc-radius); background: var(--kc-soft);
}
.kc-bar > .kc-label { grid-column: 1; margin: 0; }
.kc-bar > .kc-help { grid-column: 1; margin: 4px 0 0; }
.kc-bar > .kc-stepper, .kc-bar > .kc-input, .kc-bar > .kc-choices { grid-column: 2; grid-row: 1 / span 2; }
.kc-bar > .kc-error { grid-column: 1 / -1; }
.kc-bar .kc-step, .kc-bar .kc-input { background-color: var(--kc-bg); }
.kc-large .kc-bar { padding: 18px 22px; }
.kc-large .kc-bar > .kc-label { font-size: 1.15em; }
.kc-large .kc-bar .kc-stepper { width: 210px; }
@media (max-width: 560px) {
	.kc-field.kc-bar { grid-template-columns: 1fr; row-gap: 12px; }
	.kc-bar > .kc-stepper, .kc-bar > .kc-input, .kc-bar > .kc-choices { grid-column: 1; grid-row: auto; }
	.kc-large .kc-bar .kc-stepper { width: 100%; max-width: none; }
}

/* Grupos: botones según el número de filas */
.kc-at-min .kc-remove, .kc-at-max > .kc-add-wrap { display: none; }
.kc-add-help { margin: 16px 0 0; color: var(--kc-muted); font-size: .95em; }
.kc-add-wrap .kc-add-help + .kc-add { margin-top: 8px; }
.kc-large .kc-add { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; margin-top: 14px; border-width: 2px; font-size: 1.05em; }
.kc-large .kc-add:hover { background: color-mix(in srgb, var(--kc-accent) 6%, transparent); }
.kc-large .kc-remove { top: 14px; right: 14px; }

/* Fichero: zona amplia y botón propio */
.kc-file { cursor: pointer; }
.kc-large .kc-file { min-height: 64px; padding: 10px 12px; border-style: dashed; background: var(--kc-bg); }
.kc-file::file-selector-button {
	margin-right: 14px; padding: 9px 16px; border: 0; border-radius: calc(var(--kc-radius) - 2px);
	background: var(--kc-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.kc-file:hover::file-selector-button { filter: brightness(1.1); }

/* Clase «kc-label-hidden»: etiqueta solo para lectores de pantalla, correos y exportaciones */
.kc-label-hidden > .kc-label, .kc-label-hidden > .kc-rep-label {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Nota bajo el total (bloque de texto con <p class="kc-calc-note">) */
.kc-calc-note { margin: calc(var(--kc-gap) * -1 + 8px) 0 0; color: var(--kc-muted); font-size: .92em; line-height: 1.5; }
.kc-calc-note strong { color: var(--kc-text); }

/* ------------------------------------------------------------------
   Campos uniformes aunque el tema traiga sus propios estilos
   (los temas suelen usar input[type=text] { border… }, que ganan a .kc-input)
   ------------------------------------------------------------------ */
.kc-wrap .kc-input {
	margin: 0; border: 1px solid var(--kc-input-border, #8c939d); border-radius: var(--kc-radius); background-color: var(--kc-bg);
	color: var(--kc-text); font: inherit; line-height: 1.4; box-shadow: none; outline: none;
}
.kc-wrap input.kc-input:not([type=file]), .kc-wrap select.kc-input { height: 44px; min-height: 0; padding-top: 0; padding-bottom: 0; }
.kc-wrap.kc-large .kc-input { border-width: 2px; }
.kc-wrap.kc-large input.kc-input:not([type=file]), .kc-wrap.kc-large select.kc-input { height: 56px; }
.kc-wrap.kc-compact input.kc-input:not([type=file]), .kc-wrap.kc-compact select.kc-input { height: 38px; }
.kc-wrap select.kc-input {
	-webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.kc-wrap input[type=date].kc-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
.kc-wrap .kc-input:hover { border-color: color-mix(in srgb, var(--kc-accent) 45%, var(--kc-input-border, #8c939d)); }
.kc-wrap .kc-input:focus { border-color: var(--kc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kc-accent) 20%, transparent); }
.kc-wrap .kc-has-error .kc-input { border-color: var(--kc-error); }
.kc-wrap .kc-stepper .kc-input { border-radius: 0; }
.kc-wrap .kc-step { border-color: var(--kc-input-border, #8c939d); }
.kc-wrap .kc-file { height: auto; }

/* Campos que comparten fila (1/2, 1/3, 2/3): la ayuda va debajo del campo, para que las etiquetas
   y los campos de la fila queden a la misma altura (también cuando aparece un error) */
.kc-field:not(.kc-bar):not(.kc-type-calc):not(.kc-type-repeater) { display: flex; flex-direction: column; }
.kc-field[hidden] { display: none !important; }
.kc-field:not(.kc-w-full):not(.kc-bar) > .kc-help { order: 3; margin: 6px 0 0; }
.kc-field:not(.kc-w-full):not(.kc-bar) > .kc-error { order: 4; }

/* Trampa antispam: fuera de la vista */
.kc-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .kc-input, .kc-submit, .kc-choices--buttons .kc-choice { transition: none; } }
