/* ==========================================================================
   TTS – Contact Form 7 styles
   Recreates the Fluent Forms look on /contact-us/ (underline fields,
   blue placeholders, dashed dropzone, pill "SEND" button).
   Everything is scoped to .tts-cf7 so other CF7 forms are untouched.
   ========================================================================== */

.tts-cf7 {
	--tts-blue: #085ba5;          /* button, focus line */
	--tts-blue-text: #1e6cab;     /* placeholder / field text */
	--tts-blue-bright: #1a7efb;   /* dropzone dashed border */
	--tts-line: #dadbdd;          /* field underline */
	--tts-dropzone-bg: #eef6fe;
	--tts-muted: #606266;
	--tts-body: #333333;
	--tts-error: #d63638;
	--tts-gap: 20px;

	width: 100%;
	font-size: 14px;
	line-height: 1.5;
}

.tts-cf7 *,
.tts-cf7 *::before,
.tts-cf7 *::after { box-sizing: border-box; }

/* ---------- Grid rows (mirror Fluent column containers) ---------- */
.tts-cf7 .tts-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tts-gap);
	margin-bottom: 26px;
}
.tts-cf7 .tts-row--tight { margin-bottom: 26px; }
.tts-cf7 .tts-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tts-cf7 .tts-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tts-cf7 .tts-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tts-cf7 .tts-cols-half-quarters { grid-template-columns: 2fr 1fr 1fr; } /* 50 / 25 / 25 */

.tts-cf7 .tts-field { position: relative; min-width: 0; }

.tts-cf7 .tts-group-title {
	color: var(--tts-blue);
	font-weight: 600;
	font-size: 14px;
	margin: -4px 0 0;
}

/* CF7 wraps every control in this span */
.tts-cf7 .wpcf7-form-control-wrap { display: block; position: relative; }

/* ---------- Text-type fields ---------- */
.tts-cf7 input[type="text"],
.tts-cf7 input[type="email"],
.tts-cf7 input[type="tel"],
.tts-cf7 textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--tts-line);
	border-radius: 0;
	box-shadow: none;
	color: var(--tts-blue-text);
	font: inherit;
	font-size: 14px;
	line-height: 1.5;
	transition: border-color .2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.tts-cf7 textarea {
	min-height: 68px;
	height: 68px;
	resize: vertical;
}
.tts-cf7 input::placeholder,
.tts-cf7 textarea::placeholder { color: var(--tts-blue-text); opacity: 1; }

.tts-cf7 input[type="text"]:focus,
.tts-cf7 input[type="email"]:focus,
.tts-cf7 input[type="tel"]:focus,
.tts-cf7 textarea:focus {
	outline: none;
	border-bottom-color: var(--tts-blue);
}

/* ---------- Phone with country flag (intl-tel-input) ---------- */
.tts-cf7 .tts-phone .iti { display: block; width: 100%; }
.tts-cf7 .tts-phone .iti__selected-country { background: transparent; }
.tts-cf7 .tts-phone .iti__selected-country-primary { padding: 0 6px 0 8px; }
.tts-cf7 .tts-phone .iti__arrow { border-top-color: var(--tts-muted); }
.tts-cf7 .tts-phone .iti__country-list,
.tts-cf7 .tts-phone .iti__dropdown-content { font-size: 13px; color: var(--tts-body); z-index: 30; }

/* ---------- File upload dropzone ---------- */
.tts-cf7 .tts-dropzone {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 380px;
	min-height: 78px;
	padding: 14px 20px;
	background: var(--tts-dropzone-bg);
	border: 1px dashed var(--tts-blue-bright);
	border-radius: 7px;
	color: var(--tts-muted);
	font-size: 13.5px;
	text-align: center;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}
.tts-cf7 .tts-dropzone:hover,
.tts-cf7 .tts-dropzone.is-dragover { background: #e1effd; border-color: var(--tts-blue); }
.tts-cf7 .tts-dropzone.has-file { color: var(--tts-blue); }

.tts-cf7 .tts-dropzone .wpcf7-form-control-wrap { position: static; }
.tts-cf7 .tts-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}
.tts-cf7 .tts-dropzone__text { pointer-events: none; word-break: break-word; }
.tts-cf7 .tts-dropzone .wpcf7-not-valid-tip {
	position: absolute;
	left: 0;
	top: calc(100% + 4px);
	text-align: left;
}

/* ---------- Consent checkbox ---------- */
.tts-cf7 .tts-consent { margin-bottom: 40px; }
.tts-cf7 .tts-consent .wpcf7-list-item { margin: 0; }
.tts-cf7 .tts-consent label {
	display: inline-flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--tts-body);
	font-size: 14px;
	cursor: pointer;
}
.tts-cf7 .tts-consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 13px;
	height: 13px;
	margin: 4px 0 0;
	accent-color: var(--tts-blue);
}

/* ---------- Submit ---------- */
.tts-cf7 .tts-submit {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 40px;
}
.tts-cf7 .tts-consent + .tts-submit { margin-top: 0; }
.tts-cf7 .wpcf7-submit {
	min-width: 162px;
	height: 44px;
	padding: 0 32px;
	background: var(--tts-blue);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .2s ease, transform .1s ease;
}
.tts-cf7 .wpcf7-submit:hover { background: #064a87; }
.tts-cf7 .wpcf7-submit:active { transform: translateY(1px); }
.tts-cf7 .wpcf7-submit:disabled { opacity: .6; cursor: not-allowed; }
.tts-cf7 .wpcf7-spinner { position: absolute; left: calc(50% + 92px); margin: 0; }

/* ---------- Validation & response messages ---------- */
.tts-cf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	color: var(--tts-error);
	font-size: 12.5px;
}
.tts-cf7 .wpcf7-not-valid { border-bottom-color: var(--tts-error) !important; }

.wpcf7:has(.tts-cf7) .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	border-width: 1px;
	border-radius: 6px;
	font-size: 14px;
	text-align: center;
}
.wpcf7:has(.tts-cf7) form.sent .wpcf7-response-output {
	border-color: #46b450;
	background: #f0faf1;
	color: #1e6b2a;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.tts-cf7 .tts-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tts-cf7 .tts-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tts-cf7 .tts-cols-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.tts-cf7 .tts-row { margin-bottom: 18px; }
	.tts-cf7 .tts-cols-2,
	.tts-cf7 .tts-cols-3,
	.tts-cf7 .tts-cols-4 { grid-template-columns: 1fr; }
	.tts-cf7 .tts-cols-half-quarters { grid-template-columns: 1fr 1fr; }
	.tts-cf7 .tts-cols-half-quarters > :first-child { grid-column: 1 / -1; }
	.tts-cf7 .tts-dropzone { max-width: none; }
	.tts-cf7 .wpcf7-spinner { left: auto; right: 0; }
}
