/* Apply forms wizard
------------------------------------- */

.apply-form-page { padding: 40px 0 60px; }

.apply-form-intro { max-width: 760px; margin: 0 auto 30px; }
.apply-form-intro p { font-size: 16px; line-height: 1.6; color: #555; }

/* Заголовок + подзаголовок страницы - они же og:title/og:description превью ссылки
   (см. ORG_ID_PAGE/MICROCHIP_PROGRAM_PAGE в controllers/ApplyFormsController.js) */
.apply-form-hero { margin-bottom: 22px; }
.apply-form-intro .apply-form-subtitle {
	max-width: 640px;
	margin: 0 auto;
	font-size: 20px;
	line-height: 1.5;
	color: #666;
}
@media (max-width: 767px) {
	.apply-form-intro .apply-form-subtitle { font-size: 18px; }
}

.apply-form-benefits {
	background-color: #fcfcfc;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 20px 25px;
	margin: 20px 0;
}
.apply-form-benefits h4 { margin: 0 0 10px; font-weight: 600; }
.apply-form-benefits ul { margin: 0; padding-left: 20px; }
.apply-form-benefits li { line-height: 1.8; }

.apply-wizard {
	max-width: 760px;
	margin: 0 auto;
	background-color: #fff;
	border-radius: 10px;
	box-shadow: 0 3px 20px rgba(0,0,0,0.08);
	padding: 35px 40px 40px;
}
@media (max-width: 767px) {
	.apply-wizard { padding: 25px 18px 30px; }
}

/* Progress indicator */
.wizard-progress {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 35px;
	position: relative;
}
.wizard-progress-step {
	flex: 1;
	text-align: center;
	position: relative;
	cursor: default;
}
.wizard-progress-step:not(:last-child):after {
	content: '';
	position: absolute;
	top: 15px;
	left: 50%;
	width: 100%;
	height: 2px;
	background-color: #e6e6e6;
	z-index: 0;
}
.wizard-progress-step.done:not(:last-child):after { background-color: #66676b; }

.wizard-progress-step .dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: #fff;
	border: 2px solid #d8d8d8;
	color: #999;
	font-weight: 600;
	font-size: 14px;
	position: relative;
	z-index: 1;
	transition: all 0.2s ease-in-out;
}
.wizard-progress-step.active .dot {
	border-color: #66676b;
	color: #66676b;
	background-color: #fff;
}
.wizard-progress-step.done .dot {
	border-color: #66676b;
	background-color: #66676b;
	color: #fff;
	cursor: pointer;
}
.wizard-progress-step .dot .fa-check { display: none; }
.wizard-progress-step.done .dot .num { display: none; }
.wizard-progress-step.done .dot .fa-check { display: inline-block; }

.wizard-progress-step .label {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: #999;
	font-weight: 600;
}
.wizard-progress-step.active .label,
.wizard-progress-step.done .label { color: #333; }

/* Steps */
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wizardFadeIn 0.25s ease-in-out; }

@keyframes wizardFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.wizard-step h3 {
	margin: 0 0 4px;
	font-weight: 600;
}
.wizard-step .step-hint {
	color: #999;
	font-size: 14px;
	margin-bottom: 22px;
}

.wizard-step .form-row { margin-bottom: 18px; }
.wizard-step .form-row > label:not(.radio-inline-label) {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
	color: #333;
}
.wizard-step .form-row .hint {
	display: block;
	font-weight: 400;
	color: #999;
	font-size: 12.5px;
	margin-top: 3px;
}
.wizard-step .required-star { color: #f00; margin-left: 2px; }

.wizard-step input.input-text,
.wizard-step textarea.input-text,
.wizard-step select.input-text {
	width: 100%;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	background-color: #fff;
}
.wizard-step input.input-text:focus,
.wizard-step textarea.input-text:focus,
.wizard-step select.input-text:focus {
	border-color: #66676b;
	outline: none;
}
.wizard-step textarea.input-text { resize: vertical; min-height: 80px; }

/* Варианты ответа - строго по одному на строку на любой ширине экрана: вперемешку
   в строку короткие и длинные варианты читаются плохо, а на мобиле ещё и мелко
   прокликиваются. Кликабельна вся строка варианта - label блочный (глобальный
   label {display: block} из style.css), а .radio/.checkbox-opt растянуты на ширину. */
.wizard-options { display: flex; flex-direction: column; gap: 8px; }
.wizard-options .checkbox-opt label {
	position: relative;
	padding-left: 26px;
	cursor: pointer;
	line-height: 22px;
}
.wizard-options .checkbox-opt input[type="checkbox"] {
	position: absolute;
	opacity: 0;
}
.wizard-options .checkbox-opt .cb-label {
	position: absolute;
	left: 0;
	top: 2px;
	width: 17px;
	height: 17px;
	border: 2px solid #b4b4b4;
	border-radius: 4px;
	background-color: #fff;
}
.wizard-options .checkbox-opt input[type="checkbox"]:checked + label .cb-label {
	background-color: #66676b;
	border-color: #66676b;
}
.wizard-options .checkbox-opt input[type="checkbox"]:checked + label .cb-label:after {
	content: '';
	position: absolute;
	left: 4px;
	top: 0px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.wizard-conditional {
	margin-top: 12px;
	padding: 14px 16px;
	background-color: #fafafa;
	border-radius: 6px;
	border: 1px dashed #ddd;
}

.wizard-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}
.wizard-nav .btn-back { visibility: visible; }
.wizard-nav .btn-back.is-hidden { visibility: hidden; }
.wizard-nav .nav-spacer { flex: 1; }

/* Success screen */
.wizard-success,
.apply-registered-success {
	display: none;
	text-align: center;
	padding: 30px 10px 10px;
}
.wizard-success .icon-ok,
.apply-registered-success .icon-ok {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: #e0f5d7;
	color: #449626;
	font-size: 28px;
	margin-bottom: 18px;
}
.wizard-success h3,
.apply-registered-success h3 { margin-bottom: 10px; }
.wizard-success p,
.apply-registered-success p { color: #666; max-width: 480px; margin: 0 auto; }

/* FR-217: the optional tax-exemption certificate (views/parts/apply-tax-certificate.ejs) */
.apply-tax-cert .apply-tax-cert-file { padding: 10px; height: auto; line-height: normal; cursor: pointer; }
.apply-tax-cert-fields { display: flex; gap: 14px; margin-top: 12px; }
.apply-tax-cert-fields label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 6px; }
.apply-tax-cert-state { flex: 0 0 140px; }
.apply-tax-cert-state input { text-transform: uppercase; }
.apply-tax-cert-number { flex: 1 1 auto; min-width: 0; }
/* FR-238: the block is in step 3 with the organization's (partly public) data — it says it isn't public */
.wizard-step .form-row .hint.apply-private-note { color: #2e7d32; font-weight: 600; }
/* FR-245: what the certificate changes (sales tax) — read before the file is chosen */
.wizard-step .form-row .hint.apply-tax-note { color: #333; font-weight: 600; }
@media (max-width: 480px) {
	.apply-tax-cert-fields { flex-direction: column; gap: 10px; }
	.apply-tax-cert-state { flex-basis: auto; }
}

/* FR-228: "Already registered?" on the program form (apply-registered.js) */
.apply-registered {
	max-width: 760px;
	margin: 0 auto 24px;
	background-color: #fff;
	border-radius: 10px;
	box-shadow: 0 3px 20px rgba(0,0,0,0.08);
	padding: 28px 40px 24px;
}
@media (max-width: 767px) {
	.apply-registered { padding: 22px 18px 18px; }
}
.apply-registered .wizard-step > .form-row:first-child { margin-bottom: 0; }
.apply-registered-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.apply-registered [hidden] { display: none !important; }
.apply-registered-check { display: flex; gap: 10px; align-items: stretch; }
.apply-registered-check .input-text { flex: 1; min-width: 0; margin: 0; }
/* secondary button of the site (Dan, 2026-10-07): blue outline, blue text */
.apply-registered .apply-registered-check .button.border {
	flex: none;
	margin: 0;
	padding: 0 20px;
	min-height: 42px;
	border: 1px solid #01B9FF;
	border-radius: 6px;
	background-color: #fff;
	color: #01B9FF;
	font-weight: 600;
	line-height: 1.2;
}
.apply-registered .apply-registered-check .button.border:hover { background-color: #f2fbff; color: #01a7e6; border-color: #01a7e6; }
.apply-registered .apply-registered-check .button.border:active { background-color: #e5f7ff; }
.apply-registered-msg { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.apply-registered-msg:empty { display: none; }
.apply-registered-msg.ok { color: #2e7d32; }
.apply-registered-msg.ok:before { content: '\2713'; font-weight: 700; margin-right: 6px; }
.apply-registered-msg.warn { color: #8a5a00; background-color: #fff8e1; border-radius: 6px; padding: 8px 12px; }
.apply-registered-msg.err { color: #c62828; background-color: #fdecea; border-radius: 6px; padding: 8px 12px; }
.apply-registered .wizard-nav { margin-top: 10px; }

/* FR-238: /register-organization is two forms in one (apply-wizard.js) — the parts of the
   one that's off are hidden; on /Free-Microchip-Program a store or a distributor is
   pointed to /wholesale */
.apply-wizard .variant-off { display: none !important; }
.apply-trade-hint { font-size: 14px; line-height: 1.45; color: #555; background-color: #f2fbff; border: 1px solid #b3e8ff; }
.apply-trade-hint a { color: #01B9FF; font-weight: 600; }

/* FR-245: the field checks (apply-checks.js) — the message under the field */
.apply-field-error {
	display: block;
	margin-top: 6px;
	font-style: normal;
	font-size: 13px;
	line-height: 1.4;
	color: #c62828;
}
.apply-field-error:empty { display: none; }
.wizard-step input.input-text.has-error,
.wizard-step select.input-text.has-error,
.wizard-step textarea.input-text.has-error { border-color: #e53935; }
.wizard-step input.input-text.has-error:focus,
.wizard-step select.input-text.has-error:focus { border-color: #c62828; box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.12); }
.apply-wizard [hidden] { display: none !important; }

/* the phone mask: the flag and the code inside the field, the field as wide as the others */
.apply-wizard .iti { display: block; width: 100%; }
.apply-wizard .iti input.input-text { margin-bottom: 0; }

/* the address by its parts (views/parts/apply-address.ejs) */
.apply-address-grid { display: flex; flex-direction: column; gap: 10px; }
.apply-address-field > label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #555;
	margin-bottom: 5px;
}
.apply-address-field .input-text { margin-bottom: 0; }
/* «(optional)» after a field's label (FR-245: Dan 2026-10-12 — the website, the SMS number, the
   public address aren't required, and it should be seen); #767676 — readable (AA) on white */
.apply-optional { font-weight: 400; color: #767676; }
.wizard-step .apply-address-field .hint.apply-address-pick-hint { margin-top: 5px; }
.apply-address-row { display: flex; gap: 10px; }
.apply-address-row .apply-address-city { flex: 1 1 45%; min-width: 0; }
.apply-address-row .apply-address-state { flex: 1 1 30%; min-width: 0; }
.apply-address-row .apply-address-zip { flex: 0 1 25%; min-width: 0; }
@media (max-width: 600px) {
	.apply-address-row { flex-wrap: wrap; }
	.apply-address-row .apply-address-city { flex-basis: 100%; }
	.apply-address-row .apply-address-state,
	.apply-address-row .apply-address-zip { flex: 1 1 calc(50% - 5px); }
}
.apply-address-status { margin: 8px 0 0; font-size: 13px; color: #777; }
.apply-address-status:empty { display: none; }
.apply-address-status[data-status="found"] { color: #2e7d32; }
.apply-address-status[data-status="found"]:before { content: '\2713'; font-weight: 700; margin-right: 6px; }
.apply-address-status[data-status="notfound"] { display: none; }
/* Google's suggestion list over the form and the page's header */
.pac-container { z-index: 10050; }

/* links one per field (views/parts/apply-links.ejs) */
.apply-links-list { display: flex; flex-direction: column; gap: 8px; }
.apply-link-row { display: flex; gap: 8px; align-items: center; }
.apply-link-row .input-text { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.apply-link-remove {
	flex: none;
	width: 38px;
	height: 38px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	background-color: #fff;
	color: #777;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.apply-link-remove:hover { border-color: #999; color: #333; }
.apply-links-list .apply-field-error { margin-top: -2px; }

/* secondary buttons of the site (Dan, 2026-10-07): blue outline, blue text — over the
   site's grey button.button.border (style.css) */
.apply-wizard button.button.border.apply-link-add,
.apply-wizard button.button.border.apply-logo-remove {
	margin: 10px 0 0;
	padding: 8px 16px;
	border: 1px solid #01B9FF;
	border-radius: 6px;
	background-color: #fff;
	color: #01B9FF;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
.apply-wizard button.button.border.apply-link-add:hover,
.apply-wizard button.button.border.apply-logo-remove:hover { background-color: #f2fbff; color: #01a7e6; border-color: #01a7e6; }
.apply-wizard button.button.border.apply-link-add:active,
.apply-wizard button.button.border.apply-logo-remove:active { background-color: #e5f7ff; }

/* the logo (views/parts/apply-logo.ejs) */
.apply-logo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.apply-logo-pick .apply-logo-file { flex: 1 1 260px; min-width: 0; padding: 10px; height: auto; line-height: normal; cursor: pointer; margin-bottom: 0; }
.apply-logo-preview {
	flex: none;
	width: 72px;
	height: 72px;
	object-fit: contain;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background-color: #fafafa;
}
.apply-wizard .apply-logo-pick button.button.border.apply-logo-remove { margin-top: 0; }
