/* =============================================================
   IMER USA Dealer Application Form Styles
   Primary accent: #00ae9e
   Required asterisk: #e24b4a
   ============================================================= */

/* ----------------------------------------------------------------
   Wrapper & alerts
   ---------------------------------------------------------------- */
.imer-dealer-form-wrapper {
	max-width: 980px;
	margin: 0 auto;
	padding: 0 0 40px;
	font-family: inherit;
}

.imer-alert {
	padding: 14px 18px;
	border-radius: 4px;
	margin-bottom: 24px;
	font-size: 14px;
	line-height: 1.5;
}

.imer-alert-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	border-left: 4px solid #e24b4a;
}

/* ----------------------------------------------------------------
   Section cards
   ---------------------------------------------------------------- */
.imer-section {
	background: #fff;
	border: 0.5px solid #e2e8f0;
	border-left: 4px solid #00ae9e;
	border-radius: 4px;
	margin-bottom: 24px;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
	overflow: hidden;
}

.imer-section-header {
	padding: 0;
}

.imer-section-header h3 {
	margin: 0;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	background: #f8fafb;
	border-bottom: 1px solid #e2e8f0;
	letter-spacing: 0.01em;
}

.imer-section-body {
	padding: 20px 20px 16px;
}

/* ----------------------------------------------------------------
   Field groups & layout
   ---------------------------------------------------------------- */
.imer-field-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

.imer-field-row:last-child { margin-bottom: 0; }

.imer-cols-2 { grid-template-columns: repeat(2, 1fr); }
.imer-cols-3 { grid-template-columns: repeat(3, 1fr); }
.imer-span-full { grid-column: 1 / -1; }
.imer-span-half { max-width: 50%; }

.imer-field-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.imer-field-group label:not(.imer-check-label):not(.imer-radio-label) {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}

.imer-field-group input[type="text"],
.imer-field-group input[type="tel"],
.imer-field-group input[type="email"],
.imer-field-group input[type="url"],
.imer-field-group input[type="date"],
.imer-field-group select {
	padding: 8px 11px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	color: #111827;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	width: 100%;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.imer-field-group select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 30px;
}

.imer-field-group input:focus,
.imer-field-group select:focus {
	outline: none;
	border-color: #00ae9e;
	box-shadow: 0 0 0 3px rgba(0, 174, 158, 0.15);
}

/* Required asterisk */
.req { color: #e24b4a; margin-left: 2px; }

/* Validation errors */
.imer-has-error input,
.imer-has-error select,
.imer-upload-zone.imer-has-error {
	border-color: #e24b4a !important;
}

.imer-error-msg {
	font-size: 12px;
	color: #e24b4a;
	margin-top: 2px;
	display: block;
}

/* ----------------------------------------------------------------
   Radio & checkbox groups
   ---------------------------------------------------------------- */
.imer-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	padding: 6px 0;
}

.imer-radio-label,
.imer-check-label {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
	font-weight: 400;
}

.imer-radio-label input[type="radio"],
.imer-check-label input[type="checkbox"] {
	accent-color: #00ae9e;
	width: 15px;
	height: 15px;
	cursor: pointer;
	flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Fieldsets (products / business type)
   ---------------------------------------------------------------- */
.imer-fieldset {
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 14px 16px;
	margin-bottom: 16px;
}

.imer-fieldset legend {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	padding: 0 6px;
}

.imer-fieldset legend em {
	font-weight: 400;
	color: #6b7280;
}

.imer-check-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px 16px;
	margin-top: 10px;
}

/* ----------------------------------------------------------------
   Multi-column layouts (owners, banks, references)
   ---------------------------------------------------------------- */
.imer-owner-cols,
.imer-bank-cols,
.imer-ref-cols {
	display: grid;
	gap: 24px;
}

.imer-owner-cols { grid-template-columns: repeat(2, 1fr); }
.imer-bank-cols  { grid-template-columns: repeat(3, 1fr); }
.imer-ref-cols   { grid-template-columns: repeat(3, 1fr); }

.imer-owner-col h4,
.imer-bank-col h4,
.imer-ref-col h4 {
	font-size: 13px;
	font-weight: 700;
	color: #00ae9e;
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid #e2e8f0;
}

.imer-owner-col .imer-field-group,
.imer-bank-col .imer-field-group,
.imer-ref-col .imer-field-group {
	margin-bottom: 10px;
}

/* ----------------------------------------------------------------
   Contacts section
   ---------------------------------------------------------------- */
.imer-contact-block { padding: 4px 0; }
.imer-contact-block h4 {
	font-size: 13px;
	font-weight: 700;
	color: #00ae9e;
	margin: 0 0 12px;
}

.imer-section-divider {
	border: none;
	border-top: 1px solid #e2e8f0;
	margin: 20px 0;
}

/* ----------------------------------------------------------------
   Conditional fields
   ---------------------------------------------------------------- */
.imer-conditional { transition: opacity .2s; }

/* ----------------------------------------------------------------
   Upload zones
   ---------------------------------------------------------------- */
.imer-upload-label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	display: block;
	margin-bottom: 5px;
}

.imer-upload-info {
	font-size: 13px;
	color: #4b5563;
	margin: 4px 0 10px;
	line-height: 1.6;
}

.imer-upload-info a {
	color: #00ae9e;
	text-decoration: none;
	font-weight: 600;
}

.imer-upload-info a:hover { text-decoration: underline; }

.imer-upload-zone {
	position: relative;
	border: 2px dashed #cbd5e1;
	border-radius: 6px;
	background: #f8fafc;
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.imer-upload-zone:hover,
.imer-upload-zone.drag-over {
	border-color: #00ae9e;
	background: #f0fdfb;
}

.imer-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
	z-index: 2;
}

.imer-upload-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	pointer-events: none;
}

.imer-upload-icon {
	color: #00ae9e;
	width: 38px;
	height: 38px;
	margin-bottom: 4px;
}

.imer-upload-text {
	font-size: 14px;
	color: #374151;
}

.imer-upload-browse {
	color: #00ae9e;
	font-weight: 600;
	text-decoration: underline;
}

.imer-upload-hint {
	font-size: 12px;
	color: #9ca3af;
}

.imer-upload-filename {
	margin-top: 6px;
	font-size: 13px;
	color: #059669;
	font-weight: 600;
}

.imer-upload-gap { margin-top: 20px; }

.imer-exempt-group { margin-top: 16px; }

.imer-exempt-note {
	margin-top: 8px;
	font-size: 13px;
	color: #00ae9e;
	font-weight: 600;
	padding: 8px 12px;
	background: #f0fdfb;
	border-radius: 4px;
	border: 1px solid #99f6e4;
}

/* ----------------------------------------------------------------
   Certification text box
   ---------------------------------------------------------------- */
.imer-cert-text {
	font-size: 13px;
	color: #374151;
	line-height: 1.7;
	padding: 16px 18px;
	background: #f8fafb;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	margin-bottom: 20px;
}

/* ----------------------------------------------------------------
   Signature pad
   ---------------------------------------------------------------- */
.imer-sig-wrapper {
	position: relative;
	display: inline-block;
	width: 100%;
	max-width: 520px;
}

.imer-sig-canvas {
	display: block;
	width: 100%;
	height: 160px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fdfdfd;
	cursor: crosshair;
	touch-action: none;
}

.imer-sig-clear {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 12px;
	color: #6b7280;
	cursor: pointer;
	transition: border-color .15s, color .15s;
}

.imer-sig-clear:hover {
	border-color: #e24b4a;
	color: #e24b4a;
}

/* ----------------------------------------------------------------
   Submit button & footer
   ---------------------------------------------------------------- */
.imer-form-footer {
	padding-top: 8px;
}

.imer-submit-btn {
	display: inline-block;
	padding: 13px 36px;
	background: #00ae9e;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background .15s, transform .1s;
	letter-spacing: 0.01em;
}

.imer-submit-btn:hover { background: #009b8c; }
.imer-submit-btn:active { transform: scale(0.98); }
.imer-submit-btn:disabled { background: #9ca3af; cursor: not-allowed; }

.imer-disclaimer {
	margin-top: 12px;
	font-size: 12px;
	color: #6b7280;
	line-height: 1.6;
}

/* ----------------------------------------------------------------
   Success message
   ---------------------------------------------------------------- */
.imer-form-success {
	max-width: 600px;
	margin: 40px auto;
	padding: 36px 32px;
	background: #f0fdfb;
	border: 1px solid #99f6e4;
	border-radius: 8px;
	text-align: center;
}

.imer-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background: #00ae9e;
	color: #fff;
	border-radius: 50%;
	font-size: 26px;
	margin-bottom: 16px;
}

.imer-form-success h3 {
	color: #065f46;
	font-size: 20px;
	margin: 0 0 12px;
}

.imer-form-success p {
	color: #374151;
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
}

/* ----------------------------------------------------------------
   Responsive — mobile
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
	.imer-section-body { padding: 16px; }

	.imer-cols-2,
	.imer-cols-3,
	.imer-owner-cols,
	.imer-bank-cols,
	.imer-ref-cols,
	.imer-check-grid {
		grid-template-columns: 1fr;
	}

	.imer-span-half { max-width: 100%; }

	.imer-submit-btn { width: 100%; text-align: center; }

	.imer-sig-wrapper { max-width: 100%; }
}

@media (max-width: 480px) {
	.imer-radio-group { flex-direction: column; gap: 10px; }
	.imer-upload-zone { padding: 20px 12px; }
}
