/* Inquiry forms (Contact Form 7; forms built by bin/setup/forms.php). Figma 285:1176 (Kontakt) and
   282:349 (Privatna događanja): two columns of 297 with 20 between them; each field is a caps label
   (Inter SemiBold 11, 2.5 tracking, taupe) and a borderless input over a 0.5px rule 55 under the
   label's top; fields 82 apart. The restaurant choice is two pills (dark when chosen, outline
   otherwise). Under the fields: the note (Inter 12/14) on the left, the button on the right. */

.mano-form {
	--mano-form-ink: var(--wp--preset--color--dark-kaptol);
	--mano-form-muted: var(--wp--preset--color--kaptol);
	color: var(--mano-form-ink);
	font-family: var(--wp--preset--font-family--sans);
}

.mano-form__label {
	display: block;
	color: var(--mano-form-muted);
	font-size: 11px;
	font-weight: 600;
	line-height: 13px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
}

/* Restaurant pills (Figma 295:3397 / 296:3399): 30 under the label, 42 tall. */
.mano-form__restaurant {
	margin-bottom: 69px;
}

.mano-form__pills.mano-form__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
}

.mano-form__pills .wpcf7-list-item {
	margin: 0;
}

.mano-form__pills label {
	position: relative;
	display: block;
	cursor: pointer;
}

.mano-form__pills input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mano-form__pills .wpcf7-list-item-label {
	display: block;
	padding: 12px 21px;
	border: 1px solid var(--mano-form-ink);
	border-radius: 100px;
	font-size: 13px;
	font-weight: 600;
	line-height: 16px;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mano-form__pills input:checked + .wpcf7-list-item-label {
	background: var(--mano-form-ink);
	color: var(--wp--preset--color--topla-bijela);
}

.mano-form__pills input:focus-visible + .wpcf7-list-item-label {
	outline: 2px solid var(--mano-form-ink);
	outline-offset: 2px;
}

.mano-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 27px 20px;
}

.mano-form__field {
	position: relative;
	display: block;
}

.mano-form__field--wide {
	grid-column: 1 / -1;
}

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

.mano-form input:where([type="text"], [type="email"], [type="tel"], [type="date"], [type="number"]),
.mano-form select,
.mano-form textarea {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 10px 0 8px;
	border: 0;
	border-bottom: 0.5px solid var(--mano-form-muted);
	border-radius: 0;
	background: transparent;
	color: var(--mano-form-ink);
	font: 500 14px/20px var(--wp--preset--font-family--sans);
	-webkit-appearance: none;
	appearance: none;
}

.mano-form textarea {
	height: 93px; /* the message rule 106 under its label */
	resize: none;
}

.mano-form input:focus,
.mano-form select:focus,
.mano-form textarea:focus {
	outline: none;
	border-bottom-color: var(--mano-form-ink);
	border-bottom-width: 1px;
}

/* Select: the small "v" on the right of the label line (Figma 296:3401), drawn as a chevron. */
.mano-form__field--select::after {
	content: "";
	position: absolute;
	top: 2px;
	right: 0;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid var(--mano-form-muted);
	border-bottom: 1.5px solid var(--mano-form-muted);
	transform: rotate(45deg);
	pointer-events: none;
}

.mano-form select {
	cursor: pointer;
}

/* Nothing chosen yet: the field stays an empty line, as in Figma (the blank option keeps its text
   for screen readers and in the open list). */
.mano-form select:has(option[value=""]:checked) {
	color: transparent;
}

.mano-form select option {
	color: var(--wp--preset--color--dark-kaptol);
}

/* Phone (client, 2026-11-19): the country code picker and the number on one line, each on the
   field's rule; the code keeps a chevron on phones too, or it reads like plain text. */
.mano-form__field--phone .mano-form__label {
	display: block;
}

.mano-form__phone {
	display: flex;
	align-items: flex-start; /* an error message under the number must not lift it off the code's line */
	gap: 14px;
}

.mano-form__code {
	position: relative;
	flex: 0 0 92px;
}

.mano-form__code select {
	padding-right: 16px;
}

.mano-form__code::after {
	content: "";
	position: absolute;
	top: 21px; /* middle of the 42px select (35px on phones, below) */
	right: 2px;
	width: 6px;
	height: 6px;
	margin-top: -5px;
	border-right: 1.5px solid var(--mano-form-muted);
	border-bottom: 1.5px solid var(--mano-form-muted);
	transform: rotate(45deg);
	pointer-events: none;
}

.mano-form__phone > .wpcf7-form-control-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

/* Date: Safari on iPhone centres the value; start it at the left like every other field. */
.mano-form input[type="date"] {
	text-align: left;
}

.mano-form input[type="date"]::-webkit-date-and-time-value {
	text-align: left;
}

.mano-form input[type="date"]::-webkit-datetime-edit {
	padding: 0;
}

.mano-form__footer {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-top: 17px;
}

.mano-form__note.mano-form__note {
	margin: 0;
	color: var(--mano-form-muted);
	font-size: 12px;
	line-height: 14px;
}

.mano-form .mano-form__submit.mano-form__submit {
	margin: 0;
	padding: 13px 22px;
	border: 0;
	border-radius: 100px;
	background: var(--wp--preset--color--mano-dva-bez);
	color: var(--wp--preset--color--taupe);
	font: 600 13px/16px var(--wp--preset--font-family--sans);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.mano-form .mano-form__submit:hover,
.mano-form .mano-form__submit:focus-visible {
	background: var(--wp--preset--color--pijesak);
}

/* CF7's messages: under the field / under the form, in the form's colours. */
.mano-form .wpcf7-not-valid-tip {
	margin-top: 6px;
	color: #a1432f;
	font-size: 12px;
	line-height: 14px;
}

.wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	border: 1px solid var(--wp--preset--color--pijesak);
	border-radius: 5px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	line-height: 18px;
}

.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--mano-zelena);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
	border-color: #a1432f;
}

/* CF7's spinner: under the button, so the button keeps the right edge. */
.mano-form .wpcf7-spinner {
	position: absolute;
	top: 100%;
	right: 0;
	margin: 8px 0 0;
}

/* Phones (Figma 365:155 / 386:2145, update 03/11): one column of fields 35 apart, each a label
   (Inter SemiBold 10/12, 2.5 tracking) with its 0.5px rule 47 under the label's top; on Privatna
   događanja the two choices share a row (24 apart). Restaurant pills 15 under their label, at the
   two ends of the row, 50 above the fields. Under the fields (50 lower) the note and the button,
   centred, 15 apart. */
@media (max-width: 781px) {
	.mano-form__label {
		font-size: 10px;
		line-height: 12px;
	}

	.mano-form__restaurant {
		margin-bottom: 50px;
	}

	/* The phone frames draw selects as a label and a line only, no chevron. */
	.mano-form__field--select::after {
		content: none;
	}

	.mano-form__pills.mano-form__pills {
		justify-content: space-between;
		margin-top: 15px;
	}

	.mano-form__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 35px;
	}

	.mano-form.mano-form--privatna .mano-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 24px;
	}

	.mano-form.mano-form--privatna .mano-form__field:not(.mano-form__field--select) {
		grid-column: 1 / -1;
	}

	.mano-form input:where([type="text"], [type="email"], [type="tel"], [type="date"], [type="number"]),
	.mano-form select,
	.mano-form textarea {
		height: 35px;
		padding: 8px 0 7px;
	}

	.mano-form__code::after {
		top: 17px;
	}

	.mano-form .mano-form__footer,
	.mano-form.mano-form--privatna .mano-form__footer {
		flex-direction: column;
		justify-content: flex-start;
		gap: 15px;
		margin-top: 50px;
	}

	/* The note sits in a 270 wide box, centred (Frame 102); 276 here because Chromium sets the
	   one-line Figma text 1–3px wider than 270. */
	.mano-form__note.mano-form__note {
		max-width: 276px;
		margin-inline: auto;
		text-align: center;
	}

	.mano-form .wpcf7-spinner {
		right: auto;
	}

	/* Both pills on one row down to 360 wide. */
	@media (max-width: 374px) {
		.mano-form__pills .wpcf7-list-item-label {
			padding-inline: 15px;
		}
	}
}
