/**
 * Ubuntu Contact Form — front-end styles.
 * Every colour, radius, width and font comes from CSS variables that the
 * admin sets, so this file rarely needs editing.
 */

.uc-wrap {
	--uc-primary: #C01722;
	--uc-primary-hover: #9A0F1A;
	--uc-heading: #1A1A1C;
	--uc-text: #4A4A50;
	--uc-label: #2B2B2E;
	--uc-bg: #ffffff;
	--uc-page-bg: #F5F4F2;
	--uc-field-bg: #ffffff;
	--uc-border: #E1E1E5;
	--uc-btn-text: #ffffff;
	--uc-radius: 14px;
	--uc-field-radius: 10px;
	--uc-max: 640px;
	--uc-logo-w: 190px;
	--uc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	font-family: var(--uc-font);
	display: block;
	width: 100%;
}

.uc-wrap *,
.uc-wrap *::before,
.uc-wrap *::after { box-sizing: border-box; }

.uc {
	position: relative;
	max-width: var(--uc-max);
	margin: 0 auto;
	overflow: hidden;
}

.uc--card {
	background: var(--uc-bg);
	border: 1px solid var(--uc-border);
	border-radius: var(--uc-radius);
	padding: clamp(24px, 4vw, 40px);
}

.uc--shadow { box-shadow: 0 18px 50px -22px rgba(17, 17, 19, .28); }

/* red bar across the top of the card */
.uc-accentbar {
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--uc-primary);
}

/* ---------- Header ---------- */
.uc-head { margin-bottom: 24px; }

.uc-logo {
	display: block;
	width: var(--uc-logo-w);
	max-width: 100%;
	height: auto;
	margin: 0 0 18px;
}

.uc-heading {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -.4px;
	color: var(--uc-heading);
}

.uc-sub {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--uc-text);
}

/* ---------- Layout ---------- */
.uc-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.uc--two .uc-row { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) {
	.uc--two .uc-row { grid-template-columns: 1fr; }
}

.uc-field { display: flex; flex-direction: column; }
.uc-field--full { margin-bottom: 16px; }

.uc-field label,
.uc-consent label {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--uc-label);
	margin-bottom: 7px;
	line-height: 1.4;
}

.uc-req { color: var(--uc-primary); font-weight: 700; }

/* ---------- Inputs ---------- */
.uc-field input,
.uc-field select,
.uc-field textarea {
	width: 100%;
	font-family: inherit;
	font-size: 15px;
	color: var(--uc-heading);
	background: var(--uc-field-bg);
	border: 1px solid var(--uc-border);
	border-radius: var(--uc-field-radius);
	padding: 12px 14px;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.uc-field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

.uc-field input::placeholder,
.uc-field textarea::placeholder { color: #A9A9B0; }

.uc-field input:focus,
.uc-field select:focus,
.uc-field textarea:focus {
	border-color: var(--uc-primary);
	box-shadow: 0 0 0 3px rgba(192, 23, 34, .15);              /* fallback */
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--uc-primary) 15%, transparent);
}

/* invalid state after a failed submit */
.uc-field.is-invalid input,
.uc-field.is-invalid textarea,
.uc-field.is-invalid select { border-color: var(--uc-primary); }

/* select caret */
.uc-selectwrap { position: relative; display: block; }
.uc-selectwrap select { padding-right: 38px; cursor: pointer; }
.uc-caret {
	position: absolute;
	right: 14px; top: 50%;
	transform: translateY(-50%);
	color: var(--uc-text);
	pointer-events: none;
}

/* ---------- Consent ---------- */
.uc-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 20px;
}
.uc-consent input {
	width: 18px; height: 18px;
	margin: 1px 0 0;
	accent-color: var(--uc-primary);
	flex: 0 0 auto;
	cursor: pointer;
}
.uc-consent label {
	margin: 0;
	font-weight: 500;
	font-size: 13.5px;
	color: var(--uc-text);
	cursor: pointer;
}
.uc-consent.is-invalid label { color: var(--uc-primary); }

/* ---------- Button ---------- */
.uc-actions { display: flex; }
.uc--btnfull .uc-actions { display: block; }

.uc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--uc-btn-text);
	background: var(--uc-primary);
	border: 0;
	border-radius: var(--uc-field-radius);
	padding: 14px 30px;
	cursor: pointer;
	transition: background .18s ease, transform .1s ease, box-shadow .2s ease;
	box-shadow: 0 8px 20px -8px rgba(192, 23, 34, .55);        /* fallback */
	box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--uc-primary) 65%, transparent);
}
.uc--btnfull .uc-btn { width: 100%; }

.uc-btn:hover { background: var(--uc-primary-hover); }
.uc-btn:active { transform: translateY(1px); }
.uc-btn[disabled] { opacity: .65; cursor: wait; }

/* ---------- Feedback note ---------- */
.uc-note {
	margin-top: 16px;
	font-size: 14px;
	line-height: 1.55;
	border-radius: var(--uc-field-radius);
	display: none;
	padding: 12px 15px;
}
.uc-note.is-visible { display: block; }
.uc-note.is-success {
	background: #EFF7F1;
	background: color-mix(in srgb, #15803d 8%, transparent);
	border: 1px solid #BBDCC6;
	border: 1px solid color-mix(in srgb, #15803d 28%, transparent);
	color: #15803d;
}
.uc-note.is-error {
	background: #FBEFF0;
	background: color-mix(in srgb, var(--uc-primary) 8%, transparent);
	border: 1px solid #EFC5C9;
	border: 1px solid color-mix(in srgb, var(--uc-primary) 30%, transparent);
	color: var(--uc-primary);
}

/* ---------- Honeypot: hidden from people, visible to bots ---------- */
.uc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* ---------- Sent state ---------- */
.uc-form.is-sent .uc-row,
.uc-form.is-sent .uc-field--full,
.uc-form.is-sent .uc-consent,
.uc-form.is-sent .uc-actions { display: none; }

@media (prefers-reduced-motion: reduce) {
	.uc-wrap *, .uc-wrap *::before, .uc-wrap *::after {
		transition: none !important;
		animation: none !important;
	}
}
