/*
 * Microcubo UI · forms (Contact Form 7)
 *   mc-form, mc-form--dark, mc-form--wide     on the <form> (shortcode html_class); --dark: white on black (footer),
 *                                             --wide: the newsletter on the home page (the consent under the line,
 *                                             then SUBSCREVER)
 *   mc-newsletter                             newsletter template ("Newsletter Footer Figma 2026")
 *   mc-contact-form, __fields, __foot         contact template ("Contactos Figma 2026")
 *
 * The theme styles every input and turns the CF7 submit into its own button (svg + .qodef-m-text),
 * hence the !important flags.
 */

.mc-form {
	position: relative;
	color: var(--mc-black);
}

.mc-form--dark {
	color: var(--mc-white);
}

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

.mc-form .wpcf7-acceptance {
	display: block;
}

.mc-form .wpcf7-list-item {
	display: block;
	margin: 0 !important;
}

.mc-form .wpcf7-list-item label {
	display: flex;
	align-items: flex-start;
	margin: 0;
	cursor: pointer;
}

.mc-form input[type=checkbox] {
	-webkit-appearance: none !important;
	appearance: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	background: var(--mc-white) no-repeat center / 12px 12px !important;
	cursor: pointer;
}

.mc-form input[type=checkbox]:checked {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' d='M2.5 6.2 5 8.6l4.6-5'/%3E%3C/svg%3E") !important;
}

/* submit: an underlined uppercase link instead of the theme's button */
.mc-form .wpcf7-submit {
	height: auto !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	font: 600 16px/1.22 var(--mc-font) !important;
	letter-spacing: 0 !important;
	text-transform: uppercase !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
	cursor: pointer;
	transition: opacity .2s;
}

.mc-form .wpcf7-submit:hover {
	opacity: .7;
}

.mc-form .wpcf7-submit svg {
	display: none !important;
}

.mc-form .wpcf7-submit .qodef-m-text {
	padding: 0 !important;
}

.mc-form .wpcf7-spinner {
	position: absolute;
	right: 0;
	margin: 0;
}

.mc-form .wpcf7-response-output {
	margin: 12px 0 0 !important;
	padding: 6px 8px !important;
	border-width: 1px !important;
	color: inherit;
	font: 400 12px/1.3 var(--mc-font);
}

.mc-form .wpcf7-not-valid-tip {
	margin-top: 4px;
	color: #c62828;
	font-size: 12px;
}

.mc-form--dark .wpcf7-not-valid-tip {
	color: #ff8a80;
}

/* ------------------------------------------------------------------ newsletter
   The same form in the footer (white on black, mc-form--dark) and on the home page (mc-form--wide): the colours
   follow the form's text colour. */

.mc-newsletter {
	display: flex;
	flex-direction: column;
}

.mc-newsletter input[type=email] {
	display: block !important;
	width: 100% !important;
	height: 45px !important;
	margin: 0 !important;
	padding: 0 8px !important;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid currentColor !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	font: 400 15px/1.22 var(--mc-font) !important;
}

.mc-newsletter input[type=email]::placeholder {
	color: inherit;
	opacity: 1;
}

.mc-newsletter .wpcf7-acceptance {
	margin: 15px 0 0;
}

.mc-newsletter .wpcf7-list-item label {
	gap: 5px;
	padding-left: 10px;
	font: 400 10px/1.22 var(--mc-font);
	color: inherit;
}

.mc-newsletter .wpcf7-list-item-label a {
	color: inherit;
	font-weight: 600;
	text-decoration: none;
}

/* the border takes the label colour: invisible on the white box in the footer, grey on the home page */
.mc-newsletter input[type=checkbox] {
	flex: 0 0 12px;
	width: 12px !important;
	height: 12px !important;
	border: 1px solid currentColor !important;
	color: inherit;
}

.mc-newsletter .wpcf7-submit {
	align-self: flex-end;
	margin: 35px 0 0 !important;
	font-size: 19px !important;
}

/* tablet and mobile: SUBSCREVER the size of the other links */
@media (max-width: 1024px) {
	.mc-newsletter .wpcf7-submit {
		font-size: 16px !important;
	}
}

/* wide (home page): the consent (not in Figma) in small print under the line, then SUBSCREVER */
.mc-form--wide .mc-newsletter input[type=email] {
	height: clamp(40px, 2.344vw, 45px) !important;
	padding: 0 5px !important;
	font-size: clamp(18px, 1.25vw, 24px) !important;
}

.mc-form--wide .mc-newsletter .wpcf7-acceptance {
	margin: clamp(14px, 1.042vw, 20px) 0 0;
}

.mc-form--wide .mc-newsletter .wpcf7-submit {
	margin: clamp(20px, 1.25vw, 24px) 0 0 !important;
	font-size: clamp(16px, .99vw, 19px) !important;
}

.mc-form--wide .mc-newsletter .wpcf7-list-item label {
	gap: 7px;
	padding-left: 0;
	font-size: 13px;
	color: var(--mc-grey-line);
}

.mc-form--wide .mc-newsletter input[type=checkbox] {
	flex-basis: 16px;
	width: 16px !important;
	height: 16px !important;
	margin-top: 1px !important;
}

/* ------------------------------------------------------------------ contact form (Contactos) */

.mc-contact-form__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: clamp(12px, 1.094vw, 21px);
	row-gap: clamp(16px, 2.135vw, 41px);
}

.mc-contact-form__fields .wpcf7-form-control-wrap:has(textarea) {
	grid-column: 1 / -1;
}

.mc-contact-form input:is([type=text], [type=tel], [type=email]),
.mc-contact-form textarea {
	display: block !important;
	width: 100% !important;
	height: 50px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	background: var(--mc-white) !important;
	border: 1px solid var(--mc-grey-line) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--mc-black) !important;
	font: 500 15px/25px var(--mc-font) !important;
}

.mc-contact-form textarea {
	height: clamp(140px, 10.208vw, 196px) !important;
	padding: 11px 14px !important;
	resize: vertical;
}

.mc-contact-form input:focus,
.mc-contact-form textarea:focus {
	border-color: var(--mc-black) !important;
	outline: none;
}

.mc-contact-form ::placeholder {
	color: var(--mc-grey-text);
	opacity: 1;
}

.mc-contact-form__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-top: clamp(16px, 1.354vw, 26px);
}

.mc-contact-form .wpcf7-list-item label {
	gap: 7px;
	max-width: 367px;
	font: 400 13px/1.22 var(--mc-font);
	color: var(--mc-grey-line);
}

.mc-contact-form .wpcf7-list-item-label a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mc-contact-form input[type=checkbox] {
	flex: 0 0 16px;
	width: 16px !important;
	height: 16px !important;
	margin-top: 1px !important;
	border: 1px solid var(--mc-grey-line) !important;
}

.mc-contact-form input[type=checkbox]:focus-visible {
	outline: 1px solid var(--mc-black);
	outline-offset: 2px;
}

.mc-contact-form .wpcf7-submit {
	flex: none;
}

@media (max-width: 767px) {
	.mc-contact-form__fields {
		grid-template-columns: 1fr;
	}

	.mc-contact-form__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.mc-contact-form .wpcf7-submit {
		align-self: flex-end;
	}
}
