/* ==========================================================================
   Forms
   ========================================================================== */
.o2-lead-form {
	display: grid;
	gap: 16px;
}

.o2-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.o2-field {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 10px 16px;
	border: 1.2px solid var(--o2-input-line);
	border-radius: var(--o2-btn-radius);
	background: var(--o2-white);
	color: var(--o2-heading);
	font-size: 16px;
	line-height: 1.5;
	transition: border-color var(--o2-fast), box-shadow var(--o2-fast);
}

input::placeholder,
textarea::placeholder {
	color: #8a93a3;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--o2-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(24, 52, 91, 0.12);
}

.o2-field--icon input,
.o2-field--icon textarea {
	padding-left: 40px;
}

.o2-field__icon {
	position: absolute;
	top: 13px;
	left: 14px;
	width: 18px;
	height: 18px;
	color: var(--o2-accent);
	pointer-events: none;
}

.o2-field input:user-invalid,
.o2-field textarea:user-invalid,
.o2-field.is-invalid input {
	border-color: #d63638;
}

.o2-field__legend {
	margin-bottom: 12px;
	color: var(--o2-heading);
	font-size: 16px;
	font-weight: 700;
}

.o2-checks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
}

.o2-check {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--o2-heading);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
}

.o2-check input {
	position: absolute;
	opacity: 0;
	width: 20px;
	height: 20px;
	margin: 0;
}

.o2-check__box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 1.2px solid var(--o2-input-line);
	border-radius: 4px;
	background: var(--o2-white);
	color: transparent;
	transition: background-color var(--o2-fast), border-color var(--o2-fast), color var(--o2-fast);
}

.o2-check__box .o2-icon {
	width: 14px;
	height: 14px;
	stroke-width: 3;
}

.o2-check input:checked + .o2-check__box {
	border-color: var(--o2-primary);
	background: var(--o2-primary);
	color: var(--o2-white);
}

.o2-check input:focus-visible + .o2-check__box {
	outline: 2px solid var(--o2-accent);
	outline-offset: 2px;
}

.o2-lead-form__submit {
	position: relative;
	margin-top: 8px;
}

.o2-lead-form__note {
	margin: 0;
	color: var(--o2-text-soft);
	font-size: 14px;
	text-align: center;
}

.o2-form-message {
	padding: 12px 16px;
	border-radius: var(--o2-btn-radius);
	background: #ecf7ef;
	color: #1e6b3a;
	font-size: 15px;
	font-weight: 600;
}

.o2-form-message.is-error {
	background: #fcf0f1;
	color: #b32d2e;
}

/* Search form */
.search-form {
	display: flex;
	gap: 8px;
	max-width: 560px;
}

.search-form label {
	flex: 1 1 auto;
}

.search-form .search-submit {
	flex-shrink: 0;
}

.o2-search-form {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 420px;
}

.o2-search-form__input {
	width: 100%;
	height: 48px;
	padding: 10px 52px 10px 18px;
	border: 1.2px solid var(--o2-input-line);
	border-radius: 999px;
	background: var(--o2-white);
	color: var(--o2-heading);
	font: inherit;
	font-size: 16px;
}

.o2-search-form__input:focus {
	border-color: var(--o2-primary);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(24, 52, 91, 0.12);
}

.o2-search-form__btn {
	position: absolute;
	top: 4px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--o2-primary);
	color: var(--o2-white);
	cursor: pointer;
	transition: background var(--o2-fast);
}

.o2-search-form__btn:hover {
	background: var(--o2-primary-hover);
}

.o2-search-form__btn .o2-icon {
	width: 18px;
	height: 18px;
}

/* Comments */
.comment-form {
	display: grid;
	gap: 16px;
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	color: var(--o2-heading);
	font-size: 15px;
	font-weight: 700;
}

.comment-form .submit {
	padding: 10px 24px;
	border: 0;
	border-radius: var(--o2-btn-radius);
	background: var(--o2-secondary);
	color: var(--o2-primary);
	font-weight: 800;
	cursor: pointer;
}

@media (max-width: 575px) {
	.o2-checks {
		grid-template-columns: 1fr;
	}
}
