/* ATLCO Inspection Form — design tokens from Figma */
.atlco-if {
	--atlco-primary: #0d1a63;
	--atlco-secondary: #f37a2a;
	--atlco-titles: #1f212f;
	--atlco-text-tertiary: #686e7d;
	--atlco-placeholder: #9fa5b2;
	--atlco-border: #e9ebf0;
	--atlco-border-2: #f1f3f7;
	--atlco-bg-secondary: #f9fafc;
	--atlco-white: #ffffff;
	--atlco-error: #d64545;

	font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	box-sizing: border-box;
	width: 100%;
}

.atlco-if *,
.atlco-if *::before,
.atlco-if *::after {
	box-sizing: border-box;
}

.atlco-if__card {
	background: var(--atlco-bg-secondary);
	border-radius: 16px;
	padding: 64px;
	max-width: 1344px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

/* ---------- Intro ---------- */
.atlco-if__intro {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 596px;
}

.atlco-if__title {
	margin: 0;
	font-family: inherit;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -1.08px;
	text-transform: capitalize;
	color: var(--atlco-primary);
}

.atlco-if__title span {
	color: var(--atlco-secondary);
}

.atlco-if__subtitle {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--atlco-text-tertiary);
}

/* ---------- Layout ---------- */
.atlco-if__form {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.atlco-if__section {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.atlco-if__section-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 0;
}

.atlco-if__section-icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	color: var(--atlco-secondary);
	flex-shrink: 0;
}

.atlco-if__section-head h3 {
	margin: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.54px;
	text-transform: capitalize;
	color: var(--atlco-primary);
}

.atlco-if__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 24px;
	width: 100%;
}

.atlco-if__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.atlco-if__field--full {
	width: 100%;
}

.atlco-if__field label {
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	text-transform: capitalize;
	color: var(--atlco-titles);
}

/* ---------- Controls ---------- */
.atlco-if__field input[type='text'],
.atlco-if__field input[type='email'],
.atlco-if__field input[type='tel'],
.atlco-if__field input[type='number'],
.atlco-if__field input[type='date'],
.atlco-if__field select,
.atlco-if__field textarea {
	width: 100%;
	height: 56px;
	padding: 0 24px;
	background: var(--atlco-white);
	border: 1px solid var(--atlco-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--atlco-titles);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-shadow: none;
	margin: 0;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.atlco-if__field textarea {
	height: 180px;
	padding: 20px 24px;
	resize: vertical;
	min-height: 120px;
}

.atlco-if__field input::placeholder,
.atlco-if__field textarea::placeholder {
	color: var(--atlco-placeholder);
	text-transform: capitalize;
	opacity: 1;
}

.atlco-if__field input:focus,
.atlco-if__field select:focus,
.atlco-if__field textarea:focus {
	border-color: var(--atlco-secondary);
	box-shadow: 0 0 0 3px rgba(243, 122, 42, 0.12);
}

/* Select / date wrappers with trailing icon */
.atlco-if__control {
	position: relative;
	width: 100%;
}

.atlco-if__control select,
.atlco-if__control input[type='date'] {
	padding-right: 60px;
}

.atlco-if__control select {
	cursor: pointer;
	color: var(--atlco-titles);
}

.atlco-if__control select:invalid,
.atlco-if__control select option[value=''] {
	color: var(--atlco-placeholder);
}

.atlco-if__control select.atlco-if--empty {
	color: var(--atlco-placeholder);
	text-transform: capitalize;
}

.atlco-if__control-icon {
	position: absolute;
	top: 50%;
	right: 24px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	display: inline-flex;
	color: var(--atlco-titles);
	pointer-events: none;
}

/* Date input: hide native indicator, keep it clickable over our icon */
.atlco-if__control--date input[type='date']::-webkit-calendar-picker-indicator {
	position: absolute;
	top: 0;
	right: 0;
	width: 60px;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.atlco-if__control--date input[type='date'].atlco-if--empty {
	color: var(--atlco-placeholder);
}

/* ---------- Checkbox ---------- */
.atlco-if__consent {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.atlco-if__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.atlco-if__checkbox input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.atlco-if__checkbox-box {
	width: 20px;
	height: 20px;
	border: 1.5px solid var(--atlco-placeholder);
	border-radius: 5px;
	background: var(--atlco-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: transparent;
	flex-shrink: 0;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.atlco-if__checkbox input:checked + .atlco-if__checkbox-box {
	background: var(--atlco-secondary);
	border-color: var(--atlco-secondary);
	color: var(--atlco-white);
}

.atlco-if__checkbox input:focus-visible + .atlco-if__checkbox-box {
	box-shadow: 0 0 0 3px rgba(243, 122, 42, 0.25);
}

.atlco-if__checkbox-label {
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	text-transform: capitalize;
	color: var(--atlco-titles);
}

/* ---------- Errors / notices ---------- */
.atlco-if__error {
	display: none;
	font-size: 12px;
	line-height: 1.4;
	color: var(--atlco-error);
}

.atlco-if__field.atlco-if--invalid input,
.atlco-if__field.atlco-if--invalid select,
.atlco-if__field.atlco-if--invalid textarea,
.atlco-if__consent.atlco-if--invalid .atlco-if__checkbox-box {
	border-color: var(--atlco-error);
}

.atlco-if__field.atlco-if--invalid .atlco-if__error,
.atlco-if__consent.atlco-if--invalid .atlco-if__error {
	display: block;
}

.atlco-if__notice {
	padding: 14px 20px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	background: #fdecec;
	border: 1px solid #f5c6c6;
	color: #a03030;
}

.atlco-if__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* ---------- Submit button ---------- */
.atlco-if__submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 56px;
	padding: 12px 24px;
	background: var(--atlco-secondary);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	overflow: hidden;
	align-self: flex-start;
	text-decoration: none;
	font-family: inherit;
	transition: filter 0.2s ease, transform 0.1s ease;
}

.atlco-if__submit::before {
	content: '';
	position: absolute;
	top: -34px;
	left: 50%;
	transform: translateX(-50%);
	width: 176px;
	height: 46px;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
	pointer-events: none;
}

.atlco-if__submit:hover {
	filter: brightness(1.06);
}

.atlco-if__submit:active {
	transform: translateY(1px);
}

.atlco-if__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.atlco-if__submit-label {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.64px;
	text-transform: capitalize;
	color: var(--atlco-white);
	line-height: normal;
}

.atlco-if__submit-icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
	color: var(--atlco-white);
	flex-shrink: 0;
}

/* ---------- Success popup ---------- */
.atlco-if__overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(12, 10, 32, 0.2);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.atlco-if__overlay.atlco-if--visible {
	opacity: 1;
}

.atlco-if__overlay[hidden] {
	display: none;
}

.atlco-if__modal {
	background: var(--atlco-white);
	border-radius: 16px;
	padding: 40px 24px;
	width: 440px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
	transform: translateY(12px) scale(0.97);
	transition: transform 0.25s ease;
}

.atlco-if__overlay.atlco-if--visible .atlco-if__modal {
	transform: translateY(0) scale(1);
}

.atlco-if__modal-close-wrap {
	display: flex;
	justify-content: flex-end;
	width: 100%;
}

.atlco-if__modal-close {
	width: 32px;
	height: 32px;
	padding: 8px;
	border: none;
	border-radius: 100px;
	background: var(--atlco-border-2);
	color: var(--atlco-titles);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
}

.atlco-if__modal-close:hover {
	background: var(--atlco-border);
}

.atlco-if__modal-close svg {
	flex-shrink: 0;
}

.atlco-if__modal-image {
	width: 100%;
	aspect-ratio: 1536 / 1024;
	border-radius: 8px;
	overflow: hidden;
}

.atlco-if__modal-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.atlco-if__modal-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.atlco-if__modal-text h4 {
	margin: 0;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: -0.2px;
	color: #191c1c;
}

.atlco-if__modal-text p {
	margin: 0;
	max-width: 391px;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	color: #727e92;
}

.atlco-if__modal-home {
	align-self: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.atlco-if__card {
		padding: 48px 32px;
	}
}

@media (max-width: 768px) {
	.atlco-if__card {
		padding: 32px 20px;
		gap: 32px;
		border-radius: 12px;
	}

	.atlco-if__title {
		font-size: 28px;
	}

	.atlco-if__subtitle {
		font-size: 15px;
	}

	.atlco-if__row {
		grid-template-columns: 1fr;
	}

	.atlco-if__section-head {
		padding: 12px 0;
	}

	.atlco-if__submit {
		align-self: stretch;
		width: 100%;
	}

	.atlco-if__modal {
		padding: 32px 20px;
		gap: 24px;
	}
}

@media (max-width: 480px) {
	.atlco-if__title {
		font-size: 24px;
		letter-spacing: -0.72px;
	}

	.atlco-if__field input[type='text'],
	.atlco-if__field input[type='email'],
	.atlco-if__field input[type='tel'],
	.atlco-if__field input[type='number'],
	.atlco-if__field input[type='date'],
	.atlco-if__field select {
		height: 52px;
		padding: 0 18px;
	}

	.atlco-if__control select,
	.atlco-if__control input[type='date'] {
		padding-right: 50px;
	}

	.atlco-if__control-icon {
		right: 18px;
	}

	.atlco-if__field textarea {
		padding: 16px 18px;
	}
}
