/**
 * Eidos Forms — Estilos públicos
 *
 * Branding Eidos: Teal #37bff0, Orange #ec6608, Navy #0d1b2a, Green #93c01f
 *
 * Defensas:
 * - Mega Main Menu suele inyectar `height: 30px !important` a selects.
 *   Forzamos altura propia con !important dentro del wrapper.
 * - Se respeta tipografía heredada del tema; solo overrideamos lo necesario.
 */

.eidos-form-wrapper {
	max-width: 100%;
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.5;
	color: #2c3338;
	box-sizing: border-box;
}

.eidos-form-wrapper *,
.eidos-form-wrapper *::before,
.eidos-form-wrapper *::after {
	box-sizing: border-box;
}

.eidos-form-description {
	margin-bottom: 16px;
	color: #50575e;
}

.eidos-form-error {
	padding: 12px 16px;
	background: #fdecea;
	border-left: 4px solid #d63638;
	color: #8a1f21;
	border-radius: 3px;
}

/* -------- Layout de campos -------- */
.eidos-form-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
}

.eidos-field {
	display: block;
	width: 100%;
}

.eidos-field-width-full { width: 100%; }
.eidos-field-width-half { width: calc( 50% - 8px ); }
.eidos-field-width-third { width: calc( 33.333% - 11px ); }
.eidos-field-width-twothirds { width: calc( 66.666% - 5px ); }

@media ( max-width: 600px ) {
	.eidos-field-width-half,
	.eidos-field-width-third,
	.eidos-field-width-twothirds {
		width: 100%;
	}
}

/* -------- Labels -------- */
.eidos-field-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #0d1b2a;
	font-size: 14px;
}

.eidos-field-required-mark {
	color: #ec6608;
	margin-left: 2px;
}

.eidos-field-help {
	margin-top: 4px;
	font-size: 12px;
	color: #50575e;
	line-height: 1.4;
}

.eidos-field-error {
	margin-top: 6px;
	font-size: 13px;
	color: #d63638;
	min-height: 0;
	transition: all 0.15s;
}

.eidos-field-error:not(:empty) {
	padding: 4px 8px;
	background: #fdecea;
	border-radius: 3px;
	border-left: 3px solid #d63638;
}

/* -------- Inputs -------- */
.eidos-form-wrapper input[type="text"],
.eidos-form-wrapper input[type="email"],
.eidos-form-wrapper input[type="tel"],
.eidos-form-wrapper input[type="url"],
.eidos-form-wrapper input[type="number"],
.eidos-form-wrapper input[type="date"],
.eidos-form-wrapper textarea,
.eidos-form-wrapper select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	font-size: 15px;
	font-family: inherit;
	color: #2c3338;
	transition: border-color 0.15s, box-shadow 0.15s;
	height: auto !important; /* defensa contra Mega Main Menu */
	min-height: 42px;
	line-height: 1.4;
}

.eidos-form-wrapper textarea {
	min-height: 100px;
	resize: vertical;
}

.eidos-form-wrapper input:focus,
.eidos-form-wrapper textarea:focus,
.eidos-form-wrapper select:focus {
	outline: none;
	border-color: #37bff0;
	box-shadow: 0 0 0 3px rgba(55,191,240,0.2);
}

.eidos-form-wrapper input:disabled,
.eidos-form-wrapper textarea:disabled,
.eidos-form-wrapper select:disabled,
.eidos-form-wrapper input[readonly],
.eidos-form-wrapper textarea[readonly] {
	background: #f6f7f7;
	color: #50575e;
	cursor: not-allowed;
}

/* Estado de error en el input */
.eidos-field.has-error input,
.eidos-field.has-error textarea,
.eidos-field.has-error select {
	border-color: #d63638;
	background: #fff8f8;
}

.eidos-field.has-error input:focus,
.eidos-field.has-error textarea:focus,
.eidos-field.has-error select:focus {
	box-shadow: 0 0 0 3px rgba(214,54,56,0.2);
}

/* -------- Radio / Checkbox -------- */
.eidos-field-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.eidos-field-option {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	padding: 6px 4px;
	font-size: 14px;
	font-weight: 400;
	color: #2c3338;
}

.eidos-field-option input[type="radio"],
.eidos-field-option input[type="checkbox"] {
	margin: 0;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	accent-color: #37bff0;
}

.eidos-field-consent {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 8px;
	background: #f8f9fa;
	border: 1px solid #e1e2e4;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.5;
	color: #2c3338;
}

/* Si el span del consent contiene texto largo (que se rompe en varias líneas),
 * volvemos a alinear desde arriba para que el checkbox no quede flotando al
 * medio del bloque de texto. */
.eidos-field-consent > span {
	flex: 1;
}

.eidos-field-consent input[type="checkbox"] {
	margin: 0;
	flex-shrink: 0;
	accent-color: #37bff0;
	width: 16px;
	height: 16px;
}

/* Bloque de Texto del consentimiento (TyC largos) cuando se usa junto a la Etiqueta. */
.eidos-field-consent-text {
	font-size: 13px;
	line-height: 1.6;
	color: #2c3338;
	margin-bottom: 8px;
	padding: 10px 12px;
	background: #f8f9fa;
	border: 1px solid #e1e2e4;
	border-radius: 4px;
	max-height: 200px;
	overflow-y: auto;
}

/* -------- Section title -------- */
.eidos-field-section-title {
	font-size: 18px;
	color: #0d1b2a;
	margin: 16px 0 4px;
	padding-bottom: 8px;
	border-bottom: 2px solid #37bff0;
}

.eidos-field-section-subtitle {
	font-size: 14px;
	color: #50575e;
	margin: 0 0 12px;
}

.eidos-field-html-content {
	color: #2c3338;
	font-size: 14px;
	line-height: 1.5;
}

/* -------- Submit button -------- */
.eidos-form-actions {
	margin-top: 20px;
}

.eidos-form-submit {
	background: #ec6608;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	font-family: inherit;
	letter-spacing: 0.3px;
	min-height: 46px;
}

.eidos-form-submit:hover:not(:disabled) {
	background: #d35a05;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(236,102,8,0.3);
}

.eidos-form-submit:active:not(:disabled) {
	transform: translateY(0);
}

.eidos-form-submit:disabled {
	background: #999;
	cursor: not-allowed;
	opacity: 0.7;
}

/* -------- Mensajes de éxito / error globales -------- */
.eidos-form-messages {
	margin-bottom: 12px;
}

.eidos-form-messages:empty {
	display: none;
}

.eidos-form-messages .eidos-message-success {
	padding: 14px 18px;
	background: #f3f9e6;
	border-left: 4px solid #93c01f;
	border-radius: 3px;
	color: #4a6d12;
}

.eidos-form-messages .eidos-message-error {
	padding: 14px 18px;
	background: #fdecea;
	border-left: 4px solid #d63638;
	border-radius: 3px;
	color: #8a1f21;
}

/* Form en estado de envío */
.eidos-form.is-submitting {
	opacity: 0.7;
	pointer-events: none;
}

/* ============================================================
   MULTI-STEP / MULTI-PAGE
   ============================================================ */

.eidos-form-progress {
	margin-bottom: 24px;
}

.eidos-form-progress-bar {
	background: #e1e2e4;
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
	margin-bottom: 8px;
}

.eidos-form-progress-fill {
	height: 100%;
	background: linear-gradient( 90deg, #37bff0 0%, #93c01f 100% );
	border-radius: 999px;
	transition: width 0.4s ease;
}

.eidos-form-progress-text {
	font-size: 12px;
	color: #50575e;
	text-align: right;
	font-weight: 500;
}

.eidos-form-progress-text .eidos-current-page {
	font-weight: 700;
	color: #ec6608;
}

.eidos-form-page {
	transition: opacity 0.2s ease;
}

.eidos-form-page:not(.is-active) {
	display: none;
}

.eidos-form-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.eidos-form-prev {
	background: transparent;
	color: #50575e;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
	font-family: inherit;
	min-height: 46px;
}

.eidos-form-prev:hover {
	background: #f6f7f7;
	border-color: #50575e;
}

.eidos-form-next {
	background: #37bff0;
	color: #0d1b2a;
	border: none;
	border-radius: 4px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	font-family: inherit;
	min-height: 46px;
}

.eidos-form-next:hover {
	background: #2aa8d8;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(55, 191, 240, 0.3);
}

/* Conditional logic visibility */
.eidos-field-conditional-hidden {
	display: none !important;
}

/* ============================================================
   BLOQUE 2 — Campos avanzados
   ============================================================ */

/* Composite fields (Name, Address) */
.eidos-composite {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr 1fr;
}

.eidos-composite-name {
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.eidos-composite-address .eidos-composite-part-full {
	grid-column: 1 / -1;
}

.eidos-composite-part label {
	display: block;
	font-size: 12px;
	color: #50575e;
	margin-bottom: 4px;
	font-weight: 500;
}

.eidos-composite-part input {
	width: 100%;
	box-sizing: border-box;
}

/* List field */
.eidos-list-field {
	overflow-x: auto;
}

.eidos-list-table {
	width: 100%;
	border-collapse: collapse;
}

.eidos-list-table thead {
	background: #f6f7f7;
}

.eidos-list-table th,
.eidos-list-table td {
	padding: 8px;
	border: 1px solid #e1e2e4;
	vertical-align: middle;
}

.eidos-list-table th {
	font-size: 12px;
	font-weight: 600;
	color: #0d1b2a;
	text-align: left;
}

.eidos-list-table input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	border: 1px solid #c3c4c7;
	padding: 6px 8px;
}

.eidos-list-actions {
	white-space: nowrap;
	width: 80px;
	text-align: center;
}

.eidos-list-add,
.eidos-list-remove {
	width: 28px;
	height: 28px;
	border: 1px solid #c3c4c7;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: #50575e;
	transition: all 0.15s;
}

.eidos-list-add:hover {
	border-color: #93c01f;
	color: #93c01f;
}

.eidos-list-remove:hover {
	border-color: #a00;
	color: #a00;
}

/* File upload */
.eidos-file-field {
	border: 2px dashed #c3c4c7;
	border-radius: 6px;
	padding: 16px;
	background: #fafafa;
	transition: border-color 0.15s;
}

.eidos-file-field:hover {
	border-color: #37bff0;
}

.eidos-file-input {
	display: block;
	width: 100%;
	margin-bottom: 12px;
}

.eidos-file-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.eidos-file-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #e1e2e4;
	border-radius: 4px;
	font-size: 13px;
}

.eidos-file-item.is-uploading {
	background: #e8f4fb;
	border-color: #37bff0;
}

.eidos-file-item.has-error {
	background: #fdecea;
	border-color: #a00;
}

.eidos-file-name {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eidos-file-progress {
	color: #37bff0;
	font-weight: 600;
}

.eidos-file-error {
	color: #a00;
	font-size: 12px;
}

.eidos-file-remove {
	width: 24px;
	height: 24px;
	border: none;
	background: transparent;
	color: #a00;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	border-radius: 4px;
	transition: background 0.15s;
}

.eidos-file-remove:hover {
	background: #fdecea;
}

/* Image choice */
.eidos-image-choice {
	display: grid;
	gap: 12px;
}

.eidos-image-choice-cols-2 { grid-template-columns: repeat(2, 1fr); }
.eidos-image-choice-cols-3 { grid-template-columns: repeat(3, 1fr); }
.eidos-image-choice-cols-4 { grid-template-columns: repeat(4, 1fr); }
.eidos-image-choice-cols-5 { grid-template-columns: repeat(5, 1fr); }
.eidos-image-choice-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media ( max-width: 600px ) {
	.eidos-image-choice-cols-3,
	.eidos-image-choice-cols-4,
	.eidos-image-choice-cols-5,
	.eidos-image-choice-cols-6 {
		grid-template-columns: repeat(2, 1fr);
	}
}

.eidos-image-choice-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px;
	border: 2px solid #e1e2e4;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s;
	text-align: center;
}

.eidos-image-choice-item:hover {
	border-color: #37bff0;
	background: #f6fcff;
}

.eidos-image-choice-item.is-selected {
	border-color: #ec6608;
	background: #fff7ec;
}

.eidos-image-choice-item input[type="checkbox"],
.eidos-image-choice-item input[type="radio"] {
	display: none;
}

.eidos-image-choice-item img {
	width: 100%;
	height: auto;
	max-height: 120px;
	object-fit: cover;
	border-radius: 3px;
}

.eidos-image-placeholder {
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	color: #888;
	font-size: 24px;
	border-radius: 4px;
}

.eidos-image-choice-label {
	font-size: 12px;
	color: #0d1b2a;
	font-weight: 500;
}

/* Calculation */
.eidos-calc-wrapper {
	display: flex;
	align-items: center;
	gap: 6px;
}

.eidos-calc-prefix,
.eidos-calc-suffix {
	color: #50575e;
	font-weight: 600;
}

.eidos-calc-display {
	background: #f6f7f7 !important;
	font-weight: 600;
	color: #0d1b2a;
	cursor: not-allowed;
}

/* Captcha placeholder */
.eidos-captcha-placeholder {
	background: #f0f0f1;
	border: 1px dashed #c3c4c7;
	padding: 14px;
	border-radius: 4px;
	text-align: center;
	color: #888;
	font-size: 12px;
}

/* Chained selects */
.eidos-chained-select {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.eidos-chained-level label {
	display: block;
	font-size: 12px;
	color: #50575e;
	margin-bottom: 4px;
	font-weight: 500;
}

.eidos-chained-level select {
	width: 100%;
}

/* ============================================================
   BLOQUE 5 — Íconos en opciones (checkbox/radio)
   ============================================================ */

.eidos-field-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.eidos-option-icon {
	display: inline-block;
	vertical-align: middle;
	width: 20px;
	height: 20px;
	line-height: 20px;
	text-align: center;
	font-size: 16px;
	color: #ec6608;
	flex-shrink: 0;
}

.eidos-option-icon.dashicons {
	font-size: 18px;
}

.eidos-option-icon-emoji {
	font-size: 18px;
}

.eidos-option-icon-img {
	width: 20px;
	height: 20px;
	object-fit: contain;
	vertical-align: middle;
	border-radius: 3px;
	flex-shrink: 0;
}

/* Captcha placeholder cuando no está configurado */
.eidos-captcha-unconfigured .eidos-captcha-placeholder {
	padding: 12px 16px;
	background: #fdecea;
	border-left: 3px solid #a00;
	color: #a00;
	font-size: 13px;
}

/* ============================================================
   v1.8.0 — Bloque 8.1: Inteligencia de campos
   ============================================================ */

/* Unique ID display */
.eidos-unique-id-display {
	background: #f6f8fa !important;
	color: #6b7280 !important;
	font-style: italic;
	cursor: not-allowed;
}

/* Populate Anything — estado de carga */
.eidos-field.is-populating {
	opacity: 0.65;
	pointer-events: none;
	position: relative;
}
.eidos-field.is-populating::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 12px;
	width: 14px;
	height: 14px;
	border: 2px solid #e5e7eb;
	border-top-color: #ec6608;
	border-radius: 50%;
	animation: eidosSpin 0.8s linear infinite;
}
@keyframes eidosSpin {
	to { transform: rotate(360deg); }
}

/* Word Count counter */
.eidos-word-counter {
	font-size: 11px;
	color: #6b7280;
	margin-top: 4px;
	text-align: right;
}
.eidos-word-counter.is-over {
	color: #dc2626;
	font-weight: 500;
}
.eidos-word-counter.is-under {
	color: #ec6608;
}
.eidos-word-counter.is-ok {
	color: #16a34a;
}

/* Choice (limit checkboxes) counter */
.eidos-choice-counter {
	font-size: 11px;
	color: #6b7280;
	margin-top: 6px;
}
.eidos-choice-counter.is-over {
	color: #dc2626;
	font-weight: 500;
}

/* ============================================================
   v1.9.0 — Bloques 8.2-8.5
   ============================================================ */

/* TOS box */
.eidos-tos-box {
	max-height: 200px;
	overflow-y: auto;
	border: 1px solid #e5e7eb;
	background: #fafaf9;
	padding: 12px;
	border-radius: 6px;
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.5;
}
.eidos-tos-require-scroll {
	border-color: #ec6608;
	background: #fff7ed;
}
.eidos-tos-require-scroll.is-read {
	border-color: #93c01f;
	background: #f7fbe9;
}
.eidos-tos-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* Booking slots */
.eidos-booking-slots { display: flex; flex-direction: column; gap: 6px; }
.eidos-booking-slot {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 6px;
	background: #fff; cursor: pointer; transition: all 0.12s;
}
.eidos-booking-slot:hover { border-color: #ec6608; background: #fff7ed; }
.eidos-booking-slot input[type="radio"]:checked + strong { color: #ec6608; }
.eidos-booking-remaining { color: #6b7280; font-size: 12px; margin-left: auto; }
.eidos-booking-empty { color: #9ca3af; padding: 12px; background: #fafaf9; border-radius: 6px; }

/* Nested form */
.eidos-nested-form {
	border: 1px solid #e5e7eb; border-radius: 7px; padding: 12px;
	background: #fafaf9;
}
.eidos-nested-row {
	background: #fff; border: 1px solid #f0f0ee; border-radius: 6px;
	padding: 12px; margin-bottom: 8px;
}
.eidos-nested-row-header {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #f0f0ee;
}
.eidos-nested-row-header strong { font-size: 13px; color: #ec6608; }
.eidos-nested-remove {
	background: #fee2e2; border: none; color: #dc2626; width: 24px; height: 24px;
	border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1;
}
.eidos-nested-remove:hover { background: #dc2626; color: #fff; }
.eidos-nested-field { margin-bottom: 8px; }
.eidos-nested-field label { display: block; font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.eidos-nested-add {
	background: #fff; border: 1px dashed #d1d5db; color: #6b7280;
	padding: 8px 14px; border-radius: 5px; cursor: pointer; width: 100%;
	font-size: 12px; transition: all 0.12s;
}
.eidos-nested-add:hover { border-color: #ec6608; color: #ec6608; border-style: solid; }

/* Preview Submission overlay */
.eidos-preview-overlay {
	position: fixed; inset: 0; background: rgba(13, 27, 42, 0.5);
	display: flex; align-items: center; justify-content: center;
	z-index: 99999; padding: 20px;
}
.eidos-preview-modal {
	background: #fff; border-radius: 10px; padding: 24px;
	max-width: 600px; width: 100%; max-height: 85vh; overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.eidos-preview-modal h3 { margin: 0 0 16px; font-size: 18px; color: #0d1b2a; }
.eidos-preview-content { margin: 0 0 20px; display: grid; grid-template-columns: 1fr 2fr; gap: 8px 16px; }
.eidos-preview-content dt { font-weight: 500; color: #6b7280; font-size: 13px; }
.eidos-preview-content dd { margin: 0; color: #0d1b2a; font-size: 13px; }
.eidos-preview-actions { display: flex; gap: 8px; justify-content: flex-end; }
.eidos-preview-edit, .eidos-preview-confirm {
	padding: 10px 18px; border-radius: 6px; cursor: pointer;
	font-size: 13px; font-weight: 500; border: none;
}
.eidos-preview-edit { background: #fff; border: 1px solid #e5e7eb; color: #6b7280; }
.eidos-preview-edit:hover { background: #fafaf9; }
.eidos-preview-confirm { background: #ec6608; color: #fff; }
.eidos-preview-confirm:hover { background: #d4570a; }

/* Page Transitions */
.eidos-form-page { transition: opacity 0.25s ease, transform 0.25s ease; }
.eidos-page-transition-fade .eidos-form-page[hidden],
.eidos-page-transition-fade .eidos-form-page[style*="display: none"] {
	display: none !important;
}
.eidos-page-transition-fade .eidos-form-page { opacity: 1; }
.eidos-page-transition-slide .eidos-form-page {
	transform: translateX(0);
}

/* Email validation feedback */
.eidos-email-validation {
	font-size: 11px;
	margin-top: 4px;
	min-height: 14px;
}
.eidos-email-validation.is-checking { color: #6b7280; }
.eidos-email-validation.is-valid { color: #16a34a; }
.eidos-email-validation.is-invalid { color: #dc2626; }

/* ============================================================
   v1.9.3 — Layouts y field icons
   ============================================================ */

/* Field icon (al lado del label) */
.eidos-form-wrapper .eidos-field-icon {
	display: inline-block;
	vertical-align: middle;
	margin-right: 6px;
	color: #6b7280;
}
.eidos-form-wrapper .eidos-field-icon-dashicon {
	font-size: 16px !important;
	width: 16px !important;
	height: 16px !important;
	line-height: 16px !important;
}
.eidos-form-wrapper .eidos-field-icon-img {
	width: 16px;
	height: 16px;
	object-fit: contain;
	vertical-align: middle;
}
.eidos-form-wrapper .eidos-field-icon-emoji {
	font-size: 14px;
	line-height: 1;
}

/* ============================================================
   Layout A — Auto-fit grid (recomendado)
   ============================================================ */
.eidos-form-layout-auto_grid .eidos-form-fields {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px 16px;
	margin-bottom: 16px;
}

/* Reset del flex anterior cuando es grid */
.eidos-form-layout-auto_grid .eidos-field {
	width: auto !important;
	min-width: 0;
}

/* En grid, las widths ahora son spans de columnas */
.eidos-form-layout-auto_grid .eidos-field-width-full { grid-column: span 6; }
.eidos-form-layout-auto_grid .eidos-field-width-twothirds { grid-column: span 4; }
.eidos-form-layout-auto_grid .eidos-field-width-half { grid-column: span 3; }
.eidos-form-layout-auto_grid .eidos-field-width-third { grid-column: span 2; }

@media ( max-width: 768px ) {
	.eidos-form-layout-auto_grid .eidos-form-fields {
		grid-template-columns: 1fr;
	}
	.eidos-form-layout-auto_grid .eidos-field-width-full,
	.eidos-form-layout-auto_grid .eidos-field-width-twothirds,
	.eidos-form-layout-auto_grid .eidos-field-width-half,
	.eidos-form-layout-auto_grid .eidos-field-width-third {
		grid-column: span 1;
	}
}

/* ============================================================
   Layout B — Cards con borde (estilo Stripe Checkout)
   ============================================================ */
.eidos-form-layout-cards .eidos-form-fields {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

.eidos-form-layout-cards .eidos-field {
	width: auto !important;
	min-width: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 7px;
	padding: 10px 12px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.eidos-form-layout-cards .eidos-field:focus-within {
	border-color: #ec6608;
	box-shadow: 0 0 0 3px rgba(236, 102, 8, 0.12);
}

.eidos-form-layout-cards .eidos-field-width-full { grid-column: span 6; }
.eidos-form-layout-cards .eidos-field-width-twothirds { grid-column: span 4; }
.eidos-form-layout-cards .eidos-field-width-half { grid-column: span 3; }
.eidos-form-layout-cards .eidos-field-width-third { grid-column: span 2; }

/* En cards, los labels son chicos y grises arriba */
.eidos-form-layout-cards .eidos-field-label {
	font-size: 11px !important;
	color: #6b7280 !important;
	font-weight: 500 !important;
	margin-bottom: 4px !important;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.eidos-form-layout-cards .eidos-field-required-mark {
	color: #ec6608;
}

/* En cards, los inputs son sin borde (la card hace de borde) */
.eidos-form-layout-cards .eidos-field-input input[type="text"],
.eidos-form-layout-cards .eidos-field-input input[type="email"],
.eidos-form-layout-cards .eidos-field-input input[type="tel"],
.eidos-form-layout-cards .eidos-field-input input[type="url"],
.eidos-form-layout-cards .eidos-field-input input[type="number"],
.eidos-form-layout-cards .eidos-field-input input[type="date"],
.eidos-form-layout-cards .eidos-field-input input[type="datetime-local"],
.eidos-form-layout-cards .eidos-field-input input[type="time"],
.eidos-form-layout-cards .eidos-field-input input[type="password"],
.eidos-form-layout-cards .eidos-field-input select,
.eidos-form-layout-cards .eidos-field-input textarea {
	border: none !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 14px !important;
	min-height: 24px !important;
}

.eidos-form-layout-cards .eidos-field-input input:focus,
.eidos-form-layout-cards .eidos-field-input select:focus,
.eidos-form-layout-cards .eidos-field-input textarea:focus {
	outline: none !important;
}

/* Help text dentro de cards */
.eidos-form-layout-cards .eidos-field-help {
	font-size: 11px;
	color: #9ca3af;
	margin-top: 6px;
}

@media ( max-width: 768px ) {
	.eidos-form-layout-cards .eidos-form-fields {
		grid-template-columns: 1fr;
	}
	.eidos-form-layout-cards .eidos-field-width-full,
	.eidos-form-layout-cards .eidos-field-width-twothirds,
	.eidos-form-layout-cards .eidos-field-width-half,
	.eidos-form-layout-cards .eidos-field-width-third {
		grid-column: span 1;
	}
}

/* ============================================================
   v1.9.5 — Defensa contra Mega Main Menu y otros plugins agresivos
   ============================================================ */

/* SVG inline icons: inmunes a CSS de terceros */
.eidos-form-wrapper .eidos-field-icon-svg {
	display: inline-flex !important;
	align-items: center !important;
	vertical-align: middle !important;
	margin-right: 6px !important;
	color: #6b7280 !important;
	width: 16px !important;
	height: 16px !important;
	min-width: 16px !important;
	min-height: 16px !important;
	flex-shrink: 0 !important;
}
.eidos-form-wrapper .eidos-svg-icon {
	width: 16px !important;
	height: 16px !important;
	min-width: 16px !important;
	min-height: 16px !important;
	display: inline-block !important;
	vertical-align: middle !important;
	flex-shrink: 0 !important;
}

/* Fix Mega Main Menu: pisa height de selects en frontend.
 * El plugin aplica height/line-height/font-size con !important a todos los select
 * dentro de #wpbody (admin) Y dentro del contenido (frontend). */
*[class*="mega_main"] .eidos-form-wrapper select,
.eidos-form-wrapper select.eidos-defensive-select,
body .eidos-form-wrapper select {
	height: auto !important;
	min-height: 38px !important;
	line-height: 1.5 !important;
	font-size: 14px !important;
	padding: 8px 32px 8px 12px !important;
	-webkit-appearance: menulist !important;
	appearance: menulist !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23787c82' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 10px 6px !important;
	background-color: #fff !important;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
}

/* Select foco: borde Eidos */
*[class*="mega_main"] .eidos-form-wrapper select:focus,
body .eidos-form-wrapper select:focus {
	border-color: #ec6608 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(236, 102, 8, 0.12) !important;
}

/* Select dentro de cards layout: sin borde propio (la card hace de borde) */
.eidos-form-layout-cards .eidos-field-input select {
	border: none !important;
	padding: 0 24px 0 0 !important;
	background-position: right 0 center !important;
	box-shadow: none !important;
	min-height: 24px !important;
}
.eidos-form-layout-cards .eidos-field-input select:focus {
	box-shadow: none !important;
}

/* ============================================================
   v1.9.6 — Layouts de checkboxes/radios
   ============================================================ */

/* Stacked: comportamiento default (uno abajo del otro) — ya está cubierto arriba. */

/* Inline: lado a lado, con wrap si no entran. */
.eidos-form-wrapper .eidos-choices-layout-inline {
	flex-direction: row !important;
	flex-wrap: wrap !important;
	gap: 6px 16px !important;
}
.eidos-form-wrapper .eidos-choices-layout-inline .eidos-field-option {
	flex: 0 0 auto !important;
	margin: 0 !important;
}

/* Grid auto-fit: se acomodan según el espacio disponible. */
.eidos-form-wrapper .eidos-choices-layout-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
	gap: 6px 12px !important;
}
.eidos-form-wrapper .eidos-choices-layout-grid .eidos-field-option {
	margin: 0 !important;
}

@media ( max-width: 600px ) {
	.eidos-form-wrapper .eidos-choices-layout-inline,
	.eidos-form-wrapper .eidos-choices-layout-grid {
		flex-direction: column !important;
		grid-template-columns: 1fr !important;
	}
}

/* ============================================================
   v1.9.7 — Íconos SVG en opciones (radio/checkbox)
   ============================================================ */

.eidos-form-wrapper .eidos-option-icon-svg {
	display: inline-flex !important;
	align-items: center !important;
	vertical-align: middle !important;
	color: #6b7280 !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	flex-shrink: 0 !important;
	margin-right: 4px !important;
}
.eidos-form-wrapper .eidos-option-icon-svg svg {
	width: 18px !important;
	height: 18px !important;
}

/* ============================================================
   v1.9.8 — Layout Cards: checkboxes/radios como pills
   ============================================================
   Solo aplica cuando el form usa form_layout = "cards".
   Los inputs nativos quedan invisibles pero accesibles (sr-only),
   y el label se transforma en pill clickeable.
   ============================================================ */

/* Contenedor de opciones en cards: en línea con wrap por default */
.eidos-form-layout-cards .eidos-field-options-checkbox,
.eidos-form-layout-cards .eidos-field-options-radio {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	gap: 6px !important;
}

/* Si el campo eligió "stacked" mantenemos columna, pero igual con pills */
.eidos-form-layout-cards .eidos-choices-layout-stacked {
	flex-direction: column !important;
	align-items: flex-start !important;
}

/* Si eligió "grid", grid auto-fit con pills */
.eidos-form-layout-cards .eidos-choices-layout-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
	gap: 6px !important;
}

/* Esconder input nativo (accesible para lectores de pantalla) */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option input[type="checkbox"],
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option input[type="radio"] {
	position: absolute !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
}

/* Label como pill (estado base: no seleccionado) */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option,
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 6px 14px !important;
	background: #fafaf9 !important;
	color: #6b7280 !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 999px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: all 0.12s ease !important;
	user-select: none !important;
	margin: 0 !important;
	line-height: 1.4 !important;
}

/* Hover */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option:hover,
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option:hover {
	border-color: #fed7aa !important;
	background: #fff7ed !important;
	color: #9a3412 !important;
}

/* Seleccionado: pill naranja Eidos */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option:has(input[type="checkbox"]:checked),
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option:has(input[type="radio"]:checked) {
	background: #fff7ed !important;
	color: #ec6608 !important;
	border-color: #fed7aa !important;
	font-weight: 500 !important;
}

/* Foco (navegación por teclado): outline naranja */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option:focus-within,
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option:focus-within {
	box-shadow: 0 0 0 3px rgba(236, 102, 8, 0.18) !important;
	outline: none !important;
}

/* Disabled */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option:has(input:disabled),
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option:has(input:disabled) {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
}

/* Pseudo-elemento "✓" antes del texto cuando está chequeado */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option:has(input[type="checkbox"]:checked)::before,
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option:has(input[type="radio"]:checked)::before {
	content: "✓";
	display: inline-block;
	font-weight: 700;
	font-size: 13px;
	margin-right: -2px;
}

/* En layout cards, el campo de checkbox/radio tiene padding distinto del card */
.eidos-form-layout-cards .eidos-field.eidos-field-checkbox,
.eidos-form-layout-cards .eidos-field.eidos-field-radio {
	padding: 12px 14px !important;
}

/* El SVG de ícono dentro del pill se ajusta al color */
.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option .eidos-option-icon-svg svg,
.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option .eidos-option-icon-svg svg {
	width: 14px !important;
	height: 14px !important;
}

/* Fallback para navegadores sin :has() (browsers viejos): mostrar como checkbox normal */
@supports not selector(:has(*)) {
	.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option input[type="checkbox"],
	.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option input[type="radio"] {
		position: static !important;
		opacity: 1 !important;
		width: 16px !important;
		height: 16px !important;
		margin: 0 !important;
		pointer-events: auto !important;
	}
	.eidos-form-layout-cards .eidos-field-options-checkbox .eidos-field-option,
	.eidos-form-layout-cards .eidos-field-options-radio .eidos-field-option {
		background: transparent !important;
		border: none !important;
		padding: 4px !important;
		border-radius: 0 !important;
	}
}

/* ============================================================
   v1.9.9 — Personalización del botón Enviar
   ============================================================ */

/* Alineaciones del contenedor de acciones */
.eidos-form-wrapper .eidos-submit-align-left {
	display: flex;
	justify-content: flex-start;
	gap: 10px;
}
.eidos-form-wrapper .eidos-submit-align-center {
	display: flex;
	justify-content: center;
	gap: 10px;
}
.eidos-form-wrapper .eidos-submit-align-right {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}
.eidos-form-wrapper .eidos-submit-align-full {
	display: block;
}
.eidos-form-wrapper .eidos-submit-align-full .eidos-form-submit {
	width: 100% !important;
}

/* Tamaños */
.eidos-form-wrapper .eidos-form-submit.eidos-submit-size-small {
	padding: 8px 18px !important;
	font-size: 13px !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-size-normal {
	padding: 12px 28px !important;
	font-size: 14px !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-size-large {
	padding: 16px 36px !important;
	font-size: 16px !important;
}

/* Colores presets Eidos */
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-orange {
	background-color: #ec6608 !important;
	border-color: #ec6608 !important;
	color: #fff !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-orange:hover {
	background-color: #d4570a !important;
	border-color: #d4570a !important;
}

.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-teal {
	background-color: #37bff0 !important;
	border-color: #37bff0 !important;
	color: #fff !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-teal:hover {
	background-color: #2da5d2 !important;
	border-color: #2da5d2 !important;
}

.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-green {
	background-color: #93c01f !important;
	border-color: #93c01f !important;
	color: #fff !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-green:hover {
	background-color: #7ca21a !important;
	border-color: #7ca21a !important;
}

.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-navy {
	background-color: #0d1b2a !important;
	border-color: #0d1b2a !important;
	color: #fff !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-navy:hover {
	background-color: #1a2a3a !important;
	border-color: #1a2a3a !important;
}

.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-dark {
	background-color: #1f2937 !important;
	border-color: #1f2937 !important;
	color: #fff !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-dark:hover {
	background-color: #111827 !important;
	border-color: #111827 !important;
}

.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-gray {
	background-color: #6b7280 !important;
	border-color: #6b7280 !important;
	color: #fff !important;
}
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-gray:hover {
	background-color: #4b5563 !important;
	border-color: #4b5563 !important;
}

/* Custom hex: el inline style del PHP pisa el background, pero garantizamos color del texto */
.eidos-form-wrapper .eidos-form-submit.eidos-submit-color-custom {
	color: #fff !important;
}

/* Estado disabled (durante submitting) */
.eidos-form-wrapper .eidos-form-submit:disabled,
.eidos-form-wrapper .eidos-form-submit.is-submitting {
	opacity: 0.7 !important;
	cursor: not-allowed !important;
}

/* ========================================
 * v3.2.0 — Modal y Banner de confirmación
 * ======================================== */

/* Modal: overlay full-screen */
.eidos-confirmation-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(13, 27, 42, 0.55);
	backdrop-filter: blur(2px);
	z-index: 999999;
	opacity: 0;
	transition: opacity 0.2s ease;
	padding: 16px;
	box-sizing: border-box;
}
.eidos-confirmation-modal.is-open {
	opacity: 1;
}
.eidos-confirmation-modal.is-closing {
	opacity: 0;
}

.eidos-confirmation-modal__dialog {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	max-width: 520px;
	width: 100%;
	padding: 32px 28px 24px;
	position: relative;
	transform: scale(0.96);
	transition: transform 0.2s ease;
	overflow: hidden;
}
.eidos-confirmation-modal.is-open .eidos-confirmation-modal__dialog {
	transform: scale(1);
}

.eidos-confirmation-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: #6b7280;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s, color 0.15s;
}
.eidos-confirmation-modal__close:hover {
	background: #f3f4f6;
	color: #0d1b2a;
}
.eidos-confirmation-modal__close:focus {
	outline: 2px solid #93c01f;
	outline-offset: 2px;
}

.eidos-confirmation-modal__body {
	color: #0d1b2a;
	font-size: 16px;
	line-height: 1.6;
	padding: 8px 8px 16px;
	text-align: center;
}
.eidos-confirmation-modal__body p {
	margin: 0 0 12px;
}
.eidos-confirmation-modal__body p:last-child {
	margin-bottom: 0;
}

/* Barra de progreso para autocierre */
.eidos-confirmation-modal__progress {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: #f3f4f6;
}
.eidos-confirmation-modal__progress-bar {
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, #93c01f, #37bff0);
}

/* Banner: arriba o abajo del form */
.eidos-confirmation-banner {
	background: #f7fbe9;
	border: 1px solid #93c01f;
	border-left-width: 4px;
	border-radius: 6px;
	padding: 16px 20px;
	margin: 16px 0;
	color: #2d3a14;
	font-size: 15px;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.eidos-confirmation-banner.is-open {
	opacity: 1;
	transform: translateY(0);
}
.eidos-confirmation-banner p {
	margin: 0 0 8px;
}
.eidos-confirmation-banner p:last-child {
	margin-bottom: 0;
}

/* ============================================================
   [v3.6.0] PASSWORD FIELDS
   Toggle ver/ocultar, indicador de fortaleza, y wrapper.
============================================================ */
.eidos-password-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eidos-password-wrapper input[type="password"],
.eidos-password-wrapper input[type="text"] {
    width: 100%;
}

.eidos-password-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    color: #555;
    line-height: 1;
}

.eidos-password-toggle:hover {
    color: #000;
}

.eidos-password-strength-meter {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.eidos-password-strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    flex: 1;
    transition: width 0.2s ease, background 0.2s ease;
    width: 0;
}

.eidos-password-strength-label {
    flex: 0 0 auto;
    font-weight: 500;
    min-width: 75px;
    text-align: right;
}

/* En mobile el meter pasa a stack vertical */
@media (max-width: 480px) {
    .eidos-password-strength-meter {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .eidos-password-strength-label {
        text-align: left;
        min-width: 0;
    }
}
