/* Django Leads — contact forms. Same look as the existing Django contact form:
   white box, hairline dividers, split rows, "Send →" bar. Scoped under .djl. */

.djl {
	--djl-ink: #0a0908;
	--djl-muted: #8a857c;
	--djl-line: rgba(0, 0, 0, 0.1);
	--djl-accent: #ff5a1f;
	--djl-tint: rgba(255, 90, 31, 0.04);
	--djl-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	box-sizing: border-box;
	font-family: var(--djl-font);
	color: var(--djl-ink);
}
.djl *,
.djl *::before,
.djl *::after {
	box-sizing: border-box;
}

/* ---------- Tabs ---------- */
.djl-tabs {
	display: none; /* shown only once JS is running */
}
.djl--js .djl-tabs {
	display: flex;
	border: 1px solid var(--djl-line);
	border-bottom: 0;
	background: rgba(255, 255, 255, 0.5);
}
.djl-tab {
	flex: 1 1 50%;
	position: relative;
	margin: 0;
	padding: 20px 24px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--djl-line);
	border-radius: 0;
	font-family: var(--djl-font);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	color: var(--djl-muted);
	cursor: pointer;
	transition: color 0.25s ease, background 0.25s ease;
}
.djl-tab + .djl-tab {
	border-left: 1px solid var(--djl-line);
}
.djl-tab:hover {
	color: var(--djl-ink);
}
.djl-tab.is-active {
	background: #fff;
	color: var(--djl-ink);
	border-bottom-color: #fff;
}
.djl-tab.is-active::before {
	content: '';
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	height: 2px;
	background: var(--djl-ink);
}
.djl-tab:focus-visible {
	outline: 2px solid var(--djl-ink);
	outline-offset: -4px;
}

/* ---------- Panels ---------- */
.djl--js .djl-panel:not(.is-active) {
	display: none;
}
.djl-panel + .djl-panel {
	margin-top: 32px; /* only matters without JS (both forms stacked) */
}
.djl--js .djl-panel + .djl-panel {
	margin-top: 0;
}
.djl-nojs-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 500;
}
.djl--js .djl-nojs-title,
.djl:not(.djl--tabs) .djl-nojs-title {
	display: none;
}

/* ---------- Notices ---------- */
.djl-notice {
	font-size: 14.5px;
	line-height: 1.5;
	padding: 14px 18px;
	margin: 0 0 20px;
	border-radius: 2px;
}
.djl-notice[hidden] {
	display: none;
}
.djl--js.djl--tabs .djl-notice {
	margin: 0;
	border-left: 1px solid var(--djl-line);
	border-right: 1px solid var(--djl-line);
	border-radius: 0;
}
.djl-notice--success {
	background: #eef6ee;
	color: #2c6b2f;
	border: 1px solid rgba(63, 145, 66, 0.3);
}
.djl-notice--error {
	background: #fcefed;
	color: #a83224;
	border: 1px solid rgba(224, 68, 48, 0.3);
}

/* ---------- Form box ---------- */
.djl-form {
	margin: 0;
	background: #fff;
	border: 1px solid var(--djl-line);
}
.djl--js.djl--tabs .djl-form {
	border-top: 0;
}

.djl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.djl-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.djl-row {
	border-bottom: 1px solid var(--djl-line);
}
.djl-row--split {
	display: flex;
}
.djl-cell {
	flex: 1 1 50%;
	min-width: 0;
}
.djl-cell + .djl-cell {
	border-left: 1px solid var(--djl-line);
}

/* ---------- Inputs ---------- */
.djl input[type="text"],
.djl input[type="email"],
.djl input[type="tel"],
.djl input[type="url"],
.djl textarea,
.djl select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 22px 24px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--djl-font);
	font-size: 15px;
	line-height: 1.4;
	color: var(--djl-ink);
	-webkit-appearance: none;
	appearance: none;
}
.djl textarea {
	min-height: 116px;
	resize: vertical;
}
.djl input::placeholder,
.djl textarea::placeholder {
	color: var(--djl-muted);
	opacity: 1;
}
.djl input:focus,
.djl textarea:focus,
.djl select:focus {
	outline: none;
	background-color: var(--djl-tint);
}

/* Select: custom chevron + muted colour while on placeholder */
.djl-select {
	position: relative;
}
.djl select {
	padding-right: 52px;
	cursor: pointer;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.djl-select::after {
	content: '';
	position: absolute;
	right: 26px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 1.5px solid var(--djl-ink);
	border-bottom: 1.5px solid var(--djl-ink);
	transform: rotate(45deg);
	pointer-events: none;
}
.djl select.is-placeholder {
	color: var(--djl-muted);
}
.djl select option {
	color: var(--djl-ink);
}

/* File upload row */
.djl-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 22px 24px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--djl-muted);
	cursor: pointer;
	transition: background 0.25s ease;
}
.djl-file:hover,
.djl-file:focus-within {
	background: var(--djl-tint);
}
.djl-file input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}
.djl-file__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.djl-file.has-file .djl-file__text {
	color: var(--djl-ink);
}
.djl-file__btn {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--djl-ink);
	border-bottom: 1px solid currentColor;
}

/* Invalid field highlight (set by JS from server response) */
.djl .is-invalid,
.djl .is-invalid input,
.djl .is-invalid select,
.djl .is-invalid textarea,
.djl .is-invalid .djl-file {
	background-color: #fdf3f1;
}

/* ---------- Submit bar ---------- */
.djl-submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 22px 24px;
	background: #fff;
	border: 0;
	border-radius: 0;
	font-family: var(--djl-font);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--djl-ink);
	cursor: pointer;
	transition: color 0.3s ease, background 0.3s ease;
}
.djl-submit:hover,
.djl-submit:focus-visible {
	color: var(--djl-accent);
	background: var(--djl-tint);
	outline: none;
}
.djl-submit svg {
	width: 18px;
	height: 18px;
	transition: transform 0.3s ease;
}
.djl-submit:hover svg {
	transform: translateX(3px);
}
.djl-submit[disabled] {
	cursor: wait;
	opacity: 0.6;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.djl-row--split {
		flex-direction: column;
	}
	.djl-cell + .djl-cell {
		border-left: 0;
		border-top: 1px solid var(--djl-line);
	}
	.djl input[type="text"],
	.djl input[type="email"],
	.djl input[type="tel"],
	.djl input[type="url"],
	.djl textarea,
	.djl select,
	.djl-file,
	.djl-submit,
	.djl-tab {
		padding: 18px;
	}
	.djl select {
		padding-right: 44px;
	}
	.djl-select::after {
		right: 20px;
	}
	.djl input[type="text"],
	.djl input[type="email"],
	.djl input[type="tel"],
	.djl input[type="url"],
	.djl textarea,
	.djl select {
		font-size: 16px; /* stops iOS zoom on focus */
	}
}
