/* =========================================================================
 * Accounts for Elementor — estilos. Themable con variables; los controles de
 * Elementor sobrescriben color/typo/espaciado vía selectores {{WRAPPER}}.
 * ========================================================================= */
.wcrr-root {
	--wcrr-accent: #2563eb;
	--wcrr-border: #d1d5db;
	--wcrr-error: #dc2626;
	--wcrr-ok: #16a34a;
	--wcrr-muted: #6b7280;
}

.wcrr-form {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
}

/* Campos en rejilla flexible por ancho (100/50/33/25). */
.wcrr-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.wcrr-field {
	display: flex;
	flex-direction: column;
	flex: 1 1 100%;
	min-width: 0;
}
.wcrr-w-50  { flex-basis: calc(50% - 8px); }
.wcrr-w-33  { flex-basis: calc(33.333% - 11px); }
.wcrr-w-25  { flex-basis: calc(25% - 12px); }

.wcrr-label {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #111827;
}
.wcrr-req { color: var(--wcrr-error); }

.wcrr-input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	font-size: 15px;
	line-height: 1.4;
	color: #111827;
	background: #fff;
	border: 1px solid var(--wcrr-border);
	border-radius: 8px;
	transition: border-color .15s, box-shadow .15s;
}
.wcrr-input:focus {
	outline: none;
	border-color: var(--wcrr-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wcrr-accent) 20%, transparent);
}
textarea.wcrr-input { resize: vertical; min-height: 90px; }

.wcrr-field.has-error .wcrr-input { border-color: var(--wcrr-error); }
.wcrr-field-error {
	display: block;
	color: var(--wcrr-error);
	font-size: 12.5px;
	margin-top: 5px;
	min-height: 1em;
}

/* Choices (radio / checkbox). */
.wcrr-choices { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.wcrr-choice { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

/* Aceptación / heading. */
.wcrr-acceptance { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; }
.wcrr-acceptance input { margin-top: 2px; }
.wcrr-heading { font-size: 18px; font-weight: 700; margin: 6px 0 0; }

/* Contraseña: toggle + medidor. */
.wcrr-pass-wrap { position: relative; }
.wcrr-pass-wrap .wcrr-input { padding-right: 44px; }
.wcrr-pass-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	cursor: pointer;
	opacity: .55;
}
.wcrr-pass-toggle::before {
	content: "";
	display: block;
	width: 20px; height: 20px;
	margin: 0 auto;
	background: currentColor;
	-webkit-mask: no-repeat center / contain;
	        mask: no-repeat center / contain;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.wcrr-pass-toggle.is-on { opacity: .9; }

.wcrr-strength {
	height: 5px;
	border-radius: 3px;
	background: #e5e7eb;
	margin-top: 7px;
	overflow: hidden;
}
.wcrr-strength i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--wcrr-error);
	transition: width .2s, background .2s;
}
.wcrr-strength[data-score="2"] i { background: #f59e0b; }
.wcrr-strength[data-score="3"] i { background: #eab308; }
.wcrr-strength[data-score="4"] i { background: var(--wcrr-ok); }

.wcrr-availability { font-size: 12.5px; margin-top: 5px; }
.wcrr-availability.is-ok  { color: var(--wcrr-ok); }
.wcrr-availability.is-bad { color: var(--wcrr-error); }

/* Botón principal. */
.wcrr-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--wcrr-accent);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, opacity .15s;
}
.wcrr-submit:hover { background: color-mix(in srgb, var(--wcrr-accent) 88%, #000); color: #fff; }
.wcrr-submit:disabled, .wcrr-submit.is-loading { opacity: .7; cursor: default; }
.wcrr-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: wcrr-spin .7s linear infinite; }
.wcrr-submit.is-loading .wcrr-spinner { display: inline-block; }
@keyframes wcrr-spin { to { transform: rotate(360deg); } }

/* Mensajes. */
.wcrr-msg { font-size: 14px; border-radius: 8px; }
.wcrr-msg.is-error { color: var(--wcrr-error); background: #fef2f2; padding: 10px 12px; }
.wcrr-msg.is-ok    { color: var(--wcrr-ok);    background: #f0fdf4; padding: 10px 12px; }

/* Enlaces alternativos. */
.wcrr-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; }
.wcrr-alt a { color: var(--wcrr-accent); text-decoration: none; }
.wcrr-alt a:hover { text-decoration: underline; }

/* Divisor + social. */
.wcrr-divider { display: flex; align-items: center; gap: 12px; color: var(--wcrr-muted); font-size: 13px; }
.wcrr-divider::before, .wcrr-divider::after { content: ""; flex: 1; height: 1px; background: var(--wcrr-border); }
.wcrr-social { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.wcrr-social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 11px 16px;
	font-size: 14.5px;
	font-weight: 600;
	border: 1px solid var(--wcrr-border);
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: filter .15s, opacity .15s;
}
.wcrr-social-btn:hover { filter: brightness(.96); }
.wcrr-social-btn.is-loading { opacity: .7; pointer-events: none; }
.wcrr-social-icon { display: inline-flex; }

/* Sesión iniciada. */
.wcrr-logged { max-width: 420px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 12px; }

/* Honeypot: oculto accesiblemente. */
.wcrr-hp-wrap {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* Toasts. */
.wcrr-toasts { position: fixed; z-index: 99999; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.wcrr-toast {
	max-width: 320px;
	padding: 12px 16px;
	border-radius: 8px;
	color: #fff;
	background: #111827;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0,0,0,.18);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .3s, transform .3s;
}
.wcrr-toast.is-in { opacity: 1; transform: none; }
.wcrr-toast.is-error { background: var(--wcrr-error); }
.wcrr-toast.is-ok { background: var(--wcrr-ok); }

@media (max-width: 480px) {
	.wcrr-w-50, .wcrr-w-33, .wcrr-w-25 { flex-basis: 100%; }
}
