/* Contact module — visual layer atop existing site CSS.
   Palette:
     brand blue    #00225d   accents, focus rings, selected state, required asterisk
     brand green   #00ab67   primary action button
     hover blue    #003da6   button hover
     border gray   #c8c8c8   input borders
   All selectors are scoped under #contact-app so they cannot bleed out. */

/* Site root is `html { font-size: 62.5% }` → 1rem = 10px.
   All rem values below assume the 10px-root convention. */

#contact-app {
	margin: 1.5rem 0 3rem;
	font-size: 1.6rem;       /* 16px */
	line-height: 1.5;
	color: #333;
}

#contact-app p strong { color: #00225d; }

/* honeypot — visually hidden, NOT display:none (some bots skip those). */
#contact-app .hp {
	position: absolute;
	left: -9999px;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* ============================ Inquiry-type selector ====================== */

#contact-app .contact-type {
	border: 0; padding: 0; margin: 0 0 2rem;
	display: flex; flex-wrap: wrap; gap: 1rem;
}

#contact-app .contact-type__opt {
	flex: 1 1 280px;
	padding: 1.5rem 1.9rem;
	border: 2px solid #c8c8c8;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
	user-select: none;
}

#contact-app .contact-type__opt:hover {
	border-color: #20985c;
	background: #f3faf6;
}

/* radio is visually hidden but remains in the tab order + accessible to
   screen readers; the card itself acts as the visual control */
#contact-app .contact-type__opt input[type=radio] {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* show a clear focus ring when keyboard-navigating */
#contact-app .contact-type__opt:has(input[type=radio]:focus-visible) {
	outline: 3px solid rgba(32, 152, 92, .35);
	outline-offset: 2px;
}

#contact-app .contact-type__opt:has(input:checked),
#contact-app .contact-type__opt.is-selected {
	border-color: #20985c;
	background: #e7f5ee;
}

#contact-app .contact-type__body {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	min-width: 0;
}
#contact-app .contact-type__body strong { font-weight: 700; color: #222; font-size: 1.7rem; }
#contact-app .contact-type__body small  { color: #555; font-size: 1.4rem; line-height: 1.4; }

/* ============================ Form layout ================================ */

#contact-app .contact-form {
	margin-top: 1.5rem;
	padding: 2rem;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

#contact-app .contact-form > h3 {
	margin: 0 0 1.5rem;
	padding-bottom: .75rem;
	border-bottom: 1px solid #eef0f3;
	color: #00225d;
	font-size: 2rem;          /* 20px */
	font-weight: 700;
}

#contact-app .form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 1rem;
	margin-bottom: 3rem;
}

@media (max-width: 600px) {
	#contact-app .form-grid { grid-template-columns: 1fr; gap: 1rem; }
}

#contact-app .form-row {
	display: flex; flex-direction: column;
	margin-bottom: 1.25rem;
}

#contact-app .form-row > label {
	font-weight: 600;
	font-size: 1.5rem;        /* 15px */
	margin-bottom: .4rem;
	color: #333;
}

#contact-app .form-row .req { color: #00225d; font-weight: 700; }

#contact-app .form-row__help {
	color: #888;
	font-size: 1.3rem;
	line-height: 1.4;
	margin: -.15rem 0 .6rem;
}
#contact-app .form-row .hint {
	color: #666;
	font-size: 1.2rem;
	margin-top: .6rem;
	margin-bottom: 2rem;
	padding-left: 1rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	font-weight: 600;
}

/* ============================ Inputs ===================================== */

#contact-app input[type=text],
#contact-app input[type=email],
#contact-app input[type=tel],
#contact-app textarea {
	font: inherit;
	width: 100%;
	padding: .6em .8em;
	border: 1px solid #c8c8c8;
	border-radius: 6px;
	background: #fff;
	color: #222;
	transition: border-color .15s ease, box-shadow .15s ease;
	box-sizing: border-box;
}

#contact-app input[type=text]:hover,
#contact-app input[type=email]:hover,
#contact-app input[type=tel]:hover,
#contact-app textarea:hover { border-color: #9aa3ad; }

#contact-app input[type=text]:focus,
#contact-app input[type=email]:focus,
#contact-app input[type=tel]:focus,
#contact-app textarea:focus {
	border-color: #00225d;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 34, 93, .18);
}

#contact-app textarea {
	min-height: 8rem;
	resize: vertical;
	line-height: 1.5;
}

/* File input — custom overlay so the visible button label can be controlled.
   The native <input type=file> sits invisibly on top of the visible UI; clicks
   pass through to it and the change handler in contact.js updates the
   [data-file-name] span. */
#contact-app .file-input {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1.2rem;
	width: 100%;
	padding: .7rem;
	border: 1px solid #c8c8c8;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
}
#contact-app .file-input:hover { border-color: #20985c; }
#contact-app .file-input:focus-within {
	border-color: #00225d;
	box-shadow: 0 0 0 3px rgba(0, 34, 93, .18);
}

#contact-app .file-input input[type=file] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

#contact-app .file-input__btn {
	flex: 0 0 auto;
	padding: .55rem 1.4rem;
	border-radius: 4px;
	background: #eef0f3;
	color: #333;
	font-weight: 600;
	font-size: 1.4rem;
}
#contact-app .file-input:hover .file-input__btn { background: #dde1e6; }

#contact-app .file-input__name {
	flex: 1 1 auto;
	min-width: 0;
	color: #777;
	font-size: 1.4rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#contact-app .file-input.has-file .file-input__name { color: #222; }

/* ============================ Checkboxes ================================= */

#contact-app .form-row--checkbox {
	margin-top: 1rem;
}
#contact-app .form-row--checkbox label {
	display: inline-flex;
	align-items: center;
	gap: 1.2rem;
	font-weight: 400;
	font-size: 1.6rem;
	cursor: pointer;
	padding: .25rem 0;
}

#contact-app input[type=checkbox] {
	width: 2.4rem;
	height: 2.4rem;
	accent-color: #20985c;
	cursor: pointer;
	flex: 0 0 auto;
}

/* ============================ Submit ===================================== */

#contact-app .form-row--captcha {
	margin: 5rem 0 3rem;
}

#contact-app .form-row--submit {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #eef0f3;
}

#contact-app .form-row--submit button {
	display: inline-block;
	padding: .8rem 2rem;
	border: 2px solid #00ab67;
	border-radius: 6px;
	background: #00ab67;
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, transform .1s ease;
}

#contact-app .form-row--submit button:hover {
	background: #003da6;
	border-color: #003da6;
}
#contact-app .form-row--submit button:active {
	background: #002a73;
	border-color: #002a73;
	transform: translateY(1px);
}
#contact-app .form-row--submit button[disabled] {
	opacity: .55;
	cursor: progress;
	transform: none;
}

/* ============================ Result panel (inline) ====================== */

#contact-app .contact-result {
	margin: 1.5rem 0;
	padding: 1.25rem 1.5rem;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 1.6rem;        /* 16px */
	line-height: 1.5;
}

#contact-app .contact-result--success {
	background: #f1faf5;
	border-color: #00ab67;
	color: #006e42;
}

#contact-app .contact-result--error {
	background: #fdf2f3;
	border-color: #d24052;
	color: #8c1c2b;
}

#contact-app .contact-result h3 {
	margin: 0 0 .5rem;
	font-size: 1.8rem;        /* 18px */
	font-weight: 700;
}

#contact-app .contact-result p { margin: 0; }
#contact-app .contact-result p + p { margin-top: .8rem; }
#contact-app .contact-result ul { margin: .65rem 0 0 1.5rem; padding: 0; }
#contact-app .contact-result ul li { margin-bottom: .25rem; }

#contact-app .contact-result__again {
	display: inline-block;
	font-weight: 700;
	text-decoration: underline;
	color: inherit;
	cursor: pointer;
}
#contact-app .contact-result__again:hover { text-decoration: none; }

/* ============================ Field-level errors ========================= */

#contact-app .field-error {
	color: #8c1c2b;
	font-size: 1.3rem;        /* 13px */
	margin-top: .35rem;
}

#contact-app input.is-invalid,
#contact-app textarea.is-invalid {
	border-color: #d24052;
	background: #fdf6f7;
}

#contact-app input.is-invalid:focus,
#contact-app textarea.is-invalid:focus {
	box-shadow: 0 0 0 3px rgba(210, 64, 82, .18);
}

/* ============================ Small accessibility helpers ================ */

#contact-app .sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
