/*
 * Amici — Contact Form 7 and its drag-and-drop upload add-on.
 * Visual only: no field, hidden input or script behaviour is changed.
 * Loaded only on pages that contain a form (see amici_has_form()).
 */

.wpcf7 {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	box-shadow: 0 1px 2px #2d1e1c0d, 0 8px 24px #2d1e1c0d;
	padding: var(--wp--preset--spacing--40);
}

.wpcf7-form > p {
	margin: 0 0 1.1rem;
}

/* The form template puts <br> around each field; the label stacks instead. */
.wpcf7-form label > br {
	display: none;
}

.wpcf7-form label {
	color: var(--wp--preset--color--heading);
	display: flex;
	flex-direction: column;
	font-weight: 700;
	gap: 0.35rem;
}

.wpcf7-form-control-wrap {
	font-weight: 400;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="date"],
.wpcf7-form textarea,
.wpcf7-form select {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	box-sizing: border-box;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-family: var(--wp--preset--font-family--body);
	letter-spacing: 0.03em;
	padding: 0.7rem 0.85rem;
	width: 100%;
}

.wpcf7-form textarea {
	min-height: 9rem;
	resize: vertical;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px #f55d0533;
	outline: none;
}

.wpcf7-form ::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 0.8;
}

.wpcf7-form .wpcf7-submit {
	background: var(--wp--preset--color--primary);
	border: 0;
	border-radius: 999px;
	color: var(--wp--preset--color--on-primary);
	cursor: pointer;
	font: inherit;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	letter-spacing: 0.03em;
	padding: 0.85em 2em;
}

.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .wpcf7-submit:focus-visible {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.wpcf7-form .wpcf7-submit:disabled {
	cursor: progress;
	opacity: 0.7;
}

.wpcf7-not-valid-tip {
	color: #b42318;
	font-size: var(--wp--preset--font-size--small);
	margin-top: 0.3rem;
}

.wpcf7 form .wpcf7-response-output {
	border-radius: 6px;
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
}

/* Honeypot field: must stay in the form but never be visible. */
.wpcf7_hp_field {
	height: 1px !important;
	left: -9999px !important;
	overflow: hidden !important;
	position: absolute !important;
	width: 1px !important;
}

/* ---------- Drag & drop uploader ---------- */

.codedropz-upload-handler {
	background: var(--wp--preset--color--base-alt);
	border: 2px dashed #48302c55 !important;
	border-radius: 10px !important;
	color: var(--wp--preset--color--heading);
	margin-bottom: 0.75rem;
}

.codedropz-upload-handler.codedropz-dragover,
.codedropz-upload-handler:hover {
	border-color: var(--wp--preset--color--primary) !important;
}

.codedropz-upload-inner h3 {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	margin: 0 0 0.25rem;
}

.codedropz-upload-inner .cd-upload-btn a,
.codedropz-btn-wrap a {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

.dnd-upload-status {
	border-color: #48302c26 !important;
	border-radius: 6px;
}

.dnd-upload-status .dnd-upload-details .name {
	color: var(--wp--preset--color--contrast);
}

.dnd-progress-bar {
	border-radius: 999px;
}

.dnd-progress-bar span {
	background: var(--wp--preset--color--primary) !important;
}

/* ---------- Contact page: the form sits inside its own card ---------- */

.amici-contact__form .wpcf7 {
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0;
}

.amici-contact__form .wpcf7-form > p {
	margin-bottom: 0.9rem;
}

.amici-contact__form .wpcf7-form label {
	font-size: 0.875rem;
	font-weight: 600;
}

.amici-contact__form .wpcf7-submit {
	font-weight: 600;
	letter-spacing: 0;
	padding: 0.9em 1.6em;
}
