/**
 * Public audit form and result styles.
 *
 * @package ELWHC
 */

.elwhc-app {
	max-width: 640px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
}

.elwhc-form {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 24px;
}

.elwhc-field {
	margin-bottom: 16px;
}

.elwhc-field-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.elwhc-field-row .elwhc-field {
	flex: 1 1 200px;
}

.elwhc-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.elwhc-field input[type="url"],
.elwhc-field input[type="text"],
.elwhc-field input[type="email"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	box-sizing: border-box;
}

.elwhc-field--consent label {
	font-weight: 400;
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.elwhc-req {
	color: #d63638;
}

.elwhc-submit {
	background: #2271b1;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 12px 20px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
}

.elwhc-submit:hover {
	background: #135e96;
}

.elwhc-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.elwhc-form__error {
	color: #d63638;
	margin-top: 12px;
	font-weight: 600;
}

.elwhc-loading {
	text-align: center;
	padding: 24px;
}

.elwhc-spinner {
	display: inline-block;
	width: 28px;
	height: 28px;
	border: 3px solid #dcdcde;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: elwhc-spin 0.8s linear infinite;
	vertical-align: middle;
	margin-right: 10px;
}

@keyframes elwhc-spin {
	to {
		transform: rotate( 360deg );
	}
}

.elwhc-result {
	margin-top: 24px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 24px;
}

.elwhc-score {
	text-align: center;
	padding: 16px;
	border-radius: 10px;
	margin-bottom: 16px;
	color: #fff;
}

.elwhc-score--good {
	background: #2a8a3e;
}

.elwhc-score--warning {
	background: #b26a00;
}

.elwhc-score--critical {
	background: #b32d2e;
}

.elwhc-score__value {
	display: block;
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
}

.elwhc-score__value small {
	font-size: 18px;
	opacity: 0.85;
}

.elwhc-score__label {
	display: block;
	margin-top: 6px;
	font-size: 18px;
}

.elwhc-result__scores {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.elwhc-result__scores li {
	display: flex;
	justify-content: space-between;
	padding: 8px 12px;
	border-left: 4px solid #dcdcde;
	background: #f6f7f7;
	margin-bottom: 6px;
	border-radius: 4px;
}

.elwhc-status--good {
	border-left-color: #2a8a3e;
}

.elwhc-status--warning {
	border-left-color: #b26a00;
}

.elwhc-status--critical {
	border-left-color: #b32d2e;
}

.elwhc-status--info {
	border-left-color: #2271b1;
}

.elwhc-result__heading {
	margin: 20px 0 10px;
	font-size: 16px;
}

.elwhc-result__allgood {
	background: #edfaf0;
	border-left: 4px solid #2a8a3e;
	padding: 12px 14px;
	border-radius: 4px;
	margin: 12px 0;
}

.elwhc-scores__na {
	color: #646970;
	font-style: italic;
}

.elwhc-result__cwv {
	color: #646970;
	font-size: 13px;
	margin: 4px 0 8px;
}

.elwhc-psi {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 16px;
	font-size: 14px;
}

.elwhc-psi th,
.elwhc-psi td {
	padding: 8px 10px;
	border-bottom: 1px solid #f0f0f1;
	text-align: center;
}

.elwhc-psi thead th {
	color: #646970;
	font-weight: 600;
	border-bottom: 2px solid #e2e4e7;
}

.elwhc-psi tbody th {
	text-align: left;
	font-weight: 600;
}

.elwhc-psi td.elwhc-status--good {
	color: #2a8a3e;
	font-weight: 700;
}

.elwhc-psi td.elwhc-status--warning {
	color: #b26a00;
	font-weight: 700;
}

.elwhc-psi td.elwhc-status--critical {
	color: #b32d2e;
	font-weight: 700;
}

.elwhc-psi__na {
	color: #646970;
}

.elwhc-psi__cwv {
	color: #646970;
	font-size: 12px;
	line-height: 1.5;
}

.elwhc-result__findings {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.elwhc-result__findings li {
	padding: 12px;
	border: 1px solid #e2e4e7;
	border-left-width: 4px;
	border-radius: 6px;
	margin-bottom: 8px;
}

.elwhc-result__findings strong {
	display: block;
	margin: 4px 0;
}

.elwhc-finding__tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	padding: 2px 8px;
	border-radius: 10px;
	color: #fff;
}

.elwhc-finding__desc {
	display: block;
	color: #50575e;
	font-size: 14px;
}

.elwhc-finding__reco {
	display: block;
	color: #135e96;
	font-size: 14px;
	margin-top: 4px;
}

.elwhc-finding--critical {
	border-left-color: #b32d2e;
}

.elwhc-finding--critical .elwhc-finding__tag {
	background: #b32d2e;
}

.elwhc-finding--warning {
	border-left-color: #b26a00;
}

.elwhc-finding--warning .elwhc-finding__tag {
	background: #b26a00;
}

.elwhc-finding--info {
	border-left-color: #2271b1;
}

.elwhc-finding--info .elwhc-finding__tag {
	background: #2271b1;
}

.elwhc-result__estimate {
	background: #f6f7f7;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 16px;
}

.elwhc-result__disclaimer {
	font-size: 13px;
	color: #646970;
	margin: 8px 0 0;
}

.elwhc-result__cta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.elwhc-btn {
	flex: 1 1 200px;
	text-align: center;
	padding: 12px 16px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	color: #fff;
}

.elwhc-btn--line {
	background: #06c755;
}

.elwhc-btn--quote {
	background: #2271b1;
}

.elwhc-btn--pdf {
	background: #50575e;
}

.elwhc-notice {
	padding: 16px;
	background: #f6f7f7;
	border-radius: 8px;
	text-align: center;
}

/* Honeypot: kept in the layout but off-screen so bots fill it, humans do not. */
.elwhc-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.elwhc-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 15px;
	resize: vertical;
}

/* Quote popup */
.elwhc-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 16px;
}

.elwhc-modal[hidden] {
	display: none;
}

.elwhc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
}

.elwhc-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 24px;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.3 );
}

.elwhc-modal__title {
	margin: 0 0 16px;
	font-size: 20px;
}

.elwhc-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #646970;
}

.elwhc-modal__close:hover {
	color: #1d2327;
}

.elwhc-quote-form__error {
	color: #d63638;
	font-weight: 600;
	margin-top: 12px;
}

.elwhc-quote-form__success {
	color: #2a8a3e;
	font-weight: 600;
	margin-top: 12px;
}

body.elwhc-modal-open {
	overflow: hidden;
}
