/* ═══════════════════════════════════════════════════════════
   Contact Form 7 — Estilos globales
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper y layout ────────────────────────────────────── */

.wpcf7-form .wpcf7-form-control-wrap {
	display: block;
}

.wpcf7-form p {
	margin: 0 0 var(--wp--custom--gap--m);
}

/* ── Label ───────────────────────────────────────────────── */

.wpcf7-form label {
	display: block;
	font-size: var(--wp--preset--font-size--xxs);
	line-height: var(--wp--custom--line-height--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
	font-weight: 300;
	color: var(--wp--preset--color--black);
	margin-bottom: var(--wp--custom--gap--xs);
	cursor: default;
}

/* ── Inputs, select y textarea ───────────────────────────── */

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="url"],
.wpcf7-form select,
.wpcf7-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--warm-gray);
	border-radius: var(--wp--custom--radius--s);
	padding: 12px;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--xxs);
	line-height: var(--wp--custom--line-height--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
	font-weight: 300;
	color: var(--wp--preset--color--black);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease;
}

.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="email"]::placeholder,
.wpcf7-form input[type="tel"]::placeholder,
.wpcf7-form input[type="number"]::placeholder,
.wpcf7-form input[type="url"]::placeholder,
.wpcf7-form textarea::placeholder {
	color: var(--wp--preset--color--warm-gray);
}

.wpcf7-form textarea {
	min-height: 83px;
	resize: vertical;
}

.wpcf7-form select {
	background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 6.75L9 11.25L13.5 6.75' stroke='%23111111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
	cursor: pointer;
}

/* Focus */
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
	border-color: var(--wp--preset--color--primary);
}

/* Error (CF7 añade .wpcf7-not-valid al campo inválido) */
.wpcf7-form input.wpcf7-not-valid,
.wpcf7-form select.wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid {
	border-color: #e53935;
}

/* ── Campo de adjunto (file) ─────────────────────────────── */

.wpcf7-form input[type="file"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	background-color: var(--wp--preset--color--glass);
	border: 1px solid var(--wp--preset--color--warm-gray);
	border-radius: var(--wp--custom--radius--m);
	padding: 12px;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--xxs);
	line-height: var(--wp--custom--line-height--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
	font-weight: 300;
	color: var(--wp--preset--color--warm-gray);
	cursor: pointer;
	outline: none;
	transition: border-color 0.2s ease;
}

.wpcf7-form input[type="file"]:focus {
	border-color: var(--wp--preset--color--white);
}

.wpcf7-form input[type="file"].wpcf7-not-valid {
	border-color: #e53935;
}

/* ── Mensaje de validación por campo ─────────────────────── */

.wpcf7-not-valid-tip {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--custom--gap--xs);
	font-size: var(--wp--preset--font-size--xxs);
	line-height: var(--wp--custom--line-height--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
	font-weight: 300;
	color: var(--wp--preset--color--black);
	margin-top: var(--wp--custom--gap--xs);
}

.wpcf7-not-valid-tip::before {
	content: "⚠";
	display: inline-block;
	color: #e53935;
	font-size: 14px;
	line-height: var(--wp--custom--line-height--xxs);
	flex-shrink: 0;
}

/* ── Checkboxes (wpcf7-checkbox y wpcf7-acceptance) ─────── */

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item,
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item {
	display: flex;
	align-items: center;
	margin: 0 0 var(--wp--custom--gap--xs);
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item label,
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--custom--gap--xs);
	margin: 0;
	cursor: pointer;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"],
.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	min-width: 24px;
	border: 1.5px solid var(--wp--preset--color--black);
	border-radius: var(--wp--custom--radius--s);
	background-color: var(--wp--preset--color--white);
	cursor: pointer;
	position: relative;
	margin: 0;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"]:checked,
.wpcf7-form .wpcf7-acceptance input[type="checkbox"]:checked {
	background-color: var(--wp--preset--color--black);
	border-color: var(--wp--preset--color--black);
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"]:checked::after,
.wpcf7-form .wpcf7-acceptance input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 4px;
	width: 6px;
	height: 10px;
	border: 2px solid var(--wp--preset--color--white);
	border-top: none;
	border-left: none;
	transform: rotate(45deg);
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"].wpcf7-not-valid,
.wpcf7-form .wpcf7-acceptance input[type="checkbox"].wpcf7-not-valid {
	border-color: #e53935;
}

/* ── Radio buttons ───────────────────────────────────────── */

.wpcf7-form .wpcf7-radio .wpcf7-list-item {
	display: flex;
	align-items: center;
	margin: 0 0 var(--wp--custom--gap--xs);
}

.wpcf7-form .wpcf7-radio .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--custom--gap--xs);
	margin: 0;
	cursor: pointer;
}

.wpcf7-form .wpcf7-radio input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	min-width: 24px;
	border: 1.5px solid var(--wp--preset--color--warm-gray);
	border-radius: 50%;
	background-color: var(--wp--preset--color--white);
	cursor: pointer;
	position: relative;
	margin: 0;
	transition: border-color 0.2s ease;
}

.wpcf7-form .wpcf7-radio input[type="radio"]:checked {
	border-color: var(--wp--preset--color--primary);
}

.wpcf7-form .wpcf7-radio input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
}

.wpcf7-form .wpcf7-radio input[type="radio"].wpcf7-not-valid {
	border-color: #e53935;
}

/* ── Etiquetas de checkbox y radio ───────────────────────── */

.wpcf7-form .wpcf7-list-item-label {
	font-size: var(--wp--preset--font-size--xxs);
	line-height: var(--wp--custom--line-height--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
	font-weight: 300;
	color: var(--wp--preset--color--black);
}

.wpcf7-form .wpcf7-list-item-label a {
	text-decoration: underline;
	color: inherit;
}

/* ── Mensajes de respuesta del formulario ────────────────── */

.wpcf7-response-output {
	display: flex;
	align-items: center;
	gap: 12px;
	backdrop-filter: blur(32px);
	-webkit-backdrop-filter: blur(32px);
	background-color: rgba(125, 125, 125, 0.35);
	border-radius: var(--wp--custom--radius--8);
	/* Contact Form 7 añade un borde de color según el estado (.sent/.failed/...)
	   con selectores más específicos; lo anulamos para mantener el look "glass". */
	border: none !important;
	padding: var(--wp--custom--gap--xs);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--xs);
	line-height: 22px;
	color: var(--wp--preset--color--white);
	margin-top: var(--wp--custom--gap--s);
}

.wpcf7-response-output::before {
	content: "";
	display: block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 12.5L10 15.5L17 8.5' stroke='%23F5F5F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z' stroke='%23F5F5F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.wpcf7-form.failed .wpcf7-response-output::before,
.wpcf7-form.invalid .wpcf7-response-output::before,
.wpcf7-form.spam .wpcf7-response-output::before,
.wpcf7-form.aborted .wpcf7-response-output::before {
	background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 8V13' stroke='%23F5F5F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 16.5V16.51' stroke='%23F5F5F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z' stroke='%23F5F5F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── Botón de envío ──────────────────────────────────────── */

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
	display: inline-block;
	background-color: var(--wp--preset--color--accent);
	border: none;
	border-radius: var(--wp--custom--radius--m);
	padding: 24px;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--xs);
	line-height: var(--wp--custom--line-height--xs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
	font-weight: 600;
	color: var(--wp--preset--color--black);
	cursor: pointer;
	transition: background-color 0.25s ease;
	appearance: none;
	-webkit-appearance: none;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
	background-color: var(--wp--preset--color--hover);
}
