/**
 * Professional styling for Contact Form 7 forms,
 * including the Ultimate Addons multistep tabs and
 * the Country Phone Field intl-tel-input dropdown.
 */

:root {
	--ccca-primary: #c8102e;
	--ccca-primary-dark: #a40d24;
	--ccca-text: #1f2937;
	--ccca-muted: #6b7280;
	--ccca-border: #d1d5db;
	--ccca-border-focus: #c8102e;
	--ccca-bg: #ffffff;
	--ccca-bg-soft: #f9fafb;
	--ccca-radius: 8px;
	--ccca-error: #b91c1c;
}

.wpcf7 {
	color: var(--ccca-text);
	font-size: 15px;
	line-height: 1.5;
}

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

.wpcf7 form p,
.wpcf7 form .uacf7-form-row,
.wpcf7 form .uacf7-col {
	margin: 0 0 18px;
}

.wpcf7 form label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--ccca-text);
}

.wpcf7 form .wpcf7-form-control:not(.wpcf7-submit):not([type="checkbox"]):not([type="radio"]),
.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form input[type="url"],
.wpcf7 form input[type="number"],
.wpcf7 form input[type="date"],
.wpcf7 form select,
.wpcf7 form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--ccca-border);
	border-radius: var(--ccca-radius);
	background: var(--ccca-bg);
	color: var(--ccca-text);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	box-shadow: none;
	outline: none;
	appearance: none;
}

.wpcf7 form input:focus,
.wpcf7 form select:focus,
.wpcf7 form textarea:focus {
	border-color: var(--ccca-border-focus);
	box-shadow: 0 0 0 3px rgba(200, 16, 46, .15);
	background: var(--ccca-bg);
}

.wpcf7 form input::placeholder,
.wpcf7 form textarea::placeholder {
	color: var(--ccca-muted);
	opacity: 1;
}

.wpcf7 form select {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12' height='8'><path fill='%236b7280' d='M6 8L0 0h12z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}

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

/* Required asterisk */
.wpcf7 form .wpcf7-form-control-wrap[data-name] + .wpcf7-not-valid-tip,
.wpcf7 form .wpcf7-not-valid-tip {
	color: var(--ccca-error);
	font-size: 13px;
	margin-top: 4px;
}

.wpcf7 form input.wpcf7-not-valid,
.wpcf7 form select.wpcf7-not-valid,
.wpcf7 form textarea.wpcf7-not-valid {
	border-color: var(--ccca-error);
	box-shadow: 0 0 0 3px rgba(185, 28, 28, .12);
}

/* Submit / Next buttons */
.wpcf7 form .wpcf7-submit,
.wpcf7 form .uacf7-step-btns button,
.wpcf7 form .uacf7-step-btns input[type="button"] {
	display: inline-block;
	padding: 12px 28px;
	background: var(--ccca-primary);
	color: #fff;
	border: none;
	border-radius: var(--ccca-radius);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .03em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s ease, transform .05s ease;
}

.wpcf7 form .wpcf7-submit:hover,
.wpcf7 form .uacf7-step-btns button:hover {
	background: var(--ccca-primary-dark);
}

.wpcf7 form .wpcf7-submit:active,
.wpcf7 form .uacf7-step-btns button:active {
	transform: translateY(1px);
}

/* Multistep tabs (Ultimate Addons) */
.uacf7-multistep-progressbar,
.uacf7-step-tabs,
.steps-step {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.uacf7-multistep-progressbar li,
.uacf7-step-tabs li,
.steps-step li {
	flex: 1 1 0;
	min-width: 140px;
	margin: 0;
}

.uacf7-multistep-progressbar a,
.uacf7-step-tabs a,
.steps-step a {
	display: block;
	padding: 14px 18px;
	background: #e5e7eb;
	color: var(--ccca-muted);
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	border-radius: 6px;
	transition: background .15s ease, color .15s ease;
	pointer-events: none; /* Tabs advance via Next button only */
}

.uacf7-multistep-progressbar a.uacf7-btn-active,
.uacf7-step-tabs a.uacf7-btn-active,
.steps-step a.uacf7-btn-active,
.uacf7-multistep-progressbar li.active a,
.steps-step li.active a {
	background: var(--ccca-primary);
	color: #fff;
}

.uacf7-step {
	background: var(--ccca-bg-soft);
	padding: 24px;
	border-radius: var(--ccca-radius);
}

.uacf7-step-btns {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
}

.uacf7-step-btns .uacf7-prev-btn {
	background: #6b7280;
}

.uacf7-step-btns .uacf7-prev-btn:hover {
	background: #4b5563;
}

/* Two-column row helper */
.uacf7-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 600px) {
	.uacf7-form-row { grid-template-columns: 1fr; }
}

/* intl-tel-input dropdown integration */
.wpcf7 .iti,
.wpcf7 .intl-tel-input {
	display: block;
	width: 100%;
	position: relative;
}

.wpcf7 .intl-tel-input.separate-dial-code .selected-flag {
	background: var(--ccca-bg-soft);
	border-right: 1px solid var(--ccca-border);
	border-radius: var(--ccca-radius) 0 0 var(--ccca-radius);
}

.wpcf7 .intl-tel-input input[type="tel"],
.wpcf7 .intl-tel-input input[type="text"] {
	height: 46px;
	padding-top: 12px !important;
	padding-bottom: 12px !important;
	padding-right: 14px !important;
}

/* Restore left padding so the typed text/placeholder doesn't slide under
   the flag + dial-code container. The plugin assigns iti-sdc-N classes
   based on the dial-code length; we mirror those widths so longer codes
   (e.g. +359, +1-869) still leave room for the user's input. */
.wpcf7 .intl-tel-input.separate-dial-code input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code input[type="text"],
.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown input[type="text"] {
	padding-left: 96px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-2 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-2 input[type="text"] {
	padding-left: 76px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type="text"] {
	padding-left: 86px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-3 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-3 input[type="text"] {
	padding-left: 84px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type="text"] {
	padding-left: 96px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-4 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-4 input[type="text"] {
	padding-left: 94px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type="text"] {
	padding-left: 106px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-5 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.iti-sdc-5 input[type="text"] {
	padding-left: 104px !important;
}

.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type="tel"],
.wpcf7 .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type="text"] {
	padding-left: 116px !important;
}

/* When intl-tel-input is just a flag dropdown without separate dial code */
.wpcf7 .intl-tel-input.allow-dropdown input[type="tel"],
.wpcf7 .intl-tel-input.allow-dropdown input[type="text"] {
	padding-left: 56px !important;
}

.wpcf7 .intl-tel-input .country-list {
	border-radius: var(--ccca-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	max-height: 240px;
}

/* Keep the flag container aligned with the input height. The plugin uses
   display:table on .selected-flag in separate-dial-code mode so the flag
   image and the dial code sit side-by-side without overlapping — keep that
   layout, just match the input height and tidy the dial-code typography. */
.wpcf7 .intl-tel-input .flag-container {
	height: 46px;
}

.wpcf7 .intl-tel-input .selected-flag {
	height: 46px;
}

.wpcf7 .intl-tel-input.separate-dial-code .selected-dial-code {
	font-size: 14px;
	color: var(--ccca-text);
	padding-right: 8px;
}

/* Hide the country_of_residence helper field (it's filled server-side). */
.wpcf7 .ccca-hidden-field,
.wpcf7 .wpcf7-form-control-wrap[data-name="country_of_residence"] {
	display: none !important;
}

/* UACF7 Country Dropdown (Nationality field) — leave room for the
   flag icon that the plugin overlays inside the input on the left. */
.wpcf7 .uacf7_country_dropdown_with_flag,
.wpcf7 input.uacf7_country_dropdown_with_flag {
	padding-left: 44px !important;
	background-position: 12px center !important;
	background-repeat: no-repeat !important;
}

#uacf7_country_select,
.wpcf7 [id^="uacf7_country_select"] {
	display: block;
	position: relative;
}
