/**
 * Sell-to-OSA (We Buy Guns) form.
 *
 * Mirrors the osa-arsenal theme's form vocabulary (osa-base.css): IBM Plex
 * Mono fields, 1px ink borders, border-radius 0, mono-caps labels, invert-on-
 * hover buttons. All colors/fonts go through the theme's --osa-* custom
 * properties with literal fallbacks, so the Parchment style variation
 * recolors this form for free. Rules the theme already defines (.osa-btn,
 * .osa-form-grid, .osa-filter-checkbox, .osa-mono-caps) are restated here
 * scoped under .osa-sell-wrap so the form survives a theme change.
 */

.osa-sell-wrap {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

/* ---- Section fieldsets ------------------------------------------------ */

.osa-sell-form fieldset.osa-sell-section {
	border: 0;
	margin: 0 0 8px;
	padding: 0 0 24px;
	min-width: 0;
}

.osa-sell-form .osa-sell-section legend {
	display: block;
	width: 100%;
	padding: 16px 0 18px;
	border-top: 1px solid var(--osa-ink, #0A0A0A);
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--osa-ink, #0A0A0A);
}

/* ---- Field grid (theme's .osa-form-grid, restated + textarea) --------- */

.osa-sell-form .osa-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 18px;
}

.osa-sell-form .osa-form-grid label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.osa-sell-form .osa-mono-caps {
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--osa-steel-1, #5A5A5A);
}

.osa-sell-form input[type="text"],
.osa-sell-form input[type="email"],
.osa-sell-form input[type="tel"],
.osa-sell-form select,
.osa-sell-form textarea {
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 14px;
	border: 1px solid var(--osa-ink, #0A0A0A);
	padding: 9px 11px;
	border-radius: 0;
	background: var(--osa-paper, #FFFFFF);
	color: var(--osa-ink, #0A0A0A);
	width: 100%;
}

.osa-sell-form textarea {
	min-height: 96px;
	resize: vertical;
	line-height: 1.5;
}

/* Brutalist select: strip the native chrome, draw a flat caret.
 * (Data-URI can't reference CSS vars; the near-black caret still reads
 * correctly on the Parchment variation's warm paper.) */
.osa-sell-form select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%230A0A0A'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	padding-right: 32px;
}

.osa-sell-form input:focus,
.osa-sell-form select:focus,
.osa-sell-form textarea:focus {
	outline: 2px solid var(--osa-ink, #0A0A0A);
	outline-offset: 0;
}

.osa-sell-form .osa-sell-span2 {
	grid-column: 1 / -1;
}

.osa-sell-help {
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 11px;
	line-height: 1.6;
	letter-spacing: 0.04em;
	color: var(--osa-steel-1, #5A5A5A);
	margin: 0 0 14px;
}

p.osa-sell-help {
	margin-top: 0;
}

/* ---- Buttons (theme's .osa-btn, restated scoped) ----------------------- */

.osa-sell-wrap .osa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 20px;
	border: 1.5px solid var(--osa-ink, #0A0A0A);
	background: var(--osa-ink, #0A0A0A);
	color: var(--osa-paper, #FFFFFF);
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.osa-sell-wrap .osa-btn:hover {
	background: var(--osa-paper, #FFFFFF);
	color: var(--osa-ink, #0A0A0A);
}

.osa-sell-wrap .osa-btn--outline {
	background: var(--osa-paper, #FFFFFF);
	color: var(--osa-ink, #0A0A0A);
}

.osa-sell-wrap .osa-btn--outline:hover {
	background: var(--osa-ink, #0A0A0A);
	color: var(--osa-paper, #FFFFFF);
}

.osa-sell-submit {
	width: 100%;
	margin-top: 18px;
}

.osa-sell-submit[disabled] {
	opacity: 0.55;
	cursor: wait;
}

/* ---- Photos ------------------------------------------------------------ */

.osa-sell-photos-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 4px 0 14px;
}

.osa-sell-count {
	font-size: 11px;
	color: var(--osa-ink, #0A0A0A);
}

.osa-sell-thumbs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 10px;
}

.osa-sell-thumbs li {
	position: relative;
	border: 1px solid var(--osa-ink, #0A0A0A);
	margin: 0;
}

.osa-sell-thumbs img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.osa-sell-thumbs button {
	position: absolute;
	top: 0;
	right: 0;
	width: 24px;
	height: 24px;
	border: 0;
	border-left: 1px solid var(--osa-paper, #FFFFFF);
	border-bottom: 1px solid var(--osa-paper, #FFFFFF);
	background: var(--osa-ink, #0A0A0A);
	color: var(--osa-paper, #FFFFFF);
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

/* ---- Acknowledgement checkbox (theme's .osa-filter-checkbox, restated) - */

.osa-sell-form .osa-sell-ack {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 12px;
	line-height: 1.6;
	cursor: pointer;
	margin: 0 0 4px;
}

.osa-sell-form .osa-sell-ack input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.osa-sell-form .osa-sell-ack .osa-filter-checkbox__box {
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	margin-top: 3px;
	border: 1.5px solid var(--osa-ink, #0A0A0A);
	background: transparent;
}

.osa-sell-form .osa-sell-ack input:checked + .osa-filter-checkbox__box {
	background: var(--osa-ink, #0A0A0A);
}

.osa-sell-form .osa-sell-ack.is-invalid .osa-filter-checkbox__box {
	border-width: 2.5px;
}

/* ---- Errors, progress, success ----------------------------------------- */

.osa-sell-wrap .osa-form-error,
.osa-sell-wrap .osa-form-msg {
	background: var(--osa-paper-tint, #EFEFEF);
	border-left: 3px solid var(--osa-ink, #0A0A0A);
	padding: 10px 14px;
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 12px;
	line-height: 1.6;
	margin: 0 0 20px;
}

.osa-field-error {
	font-family: var(--osa-f-mono, 'IBM Plex Mono', ui-monospace, 'Menlo', monospace);
	font-size: 11px;
	line-height: 1.5;
	color: var(--osa-ink, #0A0A0A);
	border-left: 3px solid var(--osa-ink, #0A0A0A);
	padding-left: 8px;
}

.osa-sell-form .is-invalid {
	border-width: 2px;
}

.osa-sell-progress {
	height: 4px;
	background: var(--osa-paper-tint, #EFEFEF);
	margin: 16px 0 0;
}

.osa-sell-progress__bar {
	height: 100%;
	width: 0;
	background: var(--osa-ink, #0A0A0A);
	transition: width 0.2s ease;
}

.osa-sell-success h3 {
	font-family: var(--osa-f-display, 'Archivo Black', 'Helvetica Neue', sans-serif);
	font-size: 22px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 10px;
}

.osa-sell-success {
	padding: 20px 22px;
}

/* ---- Honeypot: off-screen, NOT display:none (bots check for that) ------ */

.osa-sell-hp {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
	white-space: nowrap;
}

/* ---- Mobile ------------------------------------------------------------ */

@media (max-width: 640px) {
	.osa-sell-form .osa-form-grid {
		grid-template-columns: 1fr;
	}

	/* 16px stops iOS Safari from zooming into focused fields. */
	.osa-sell-form input[type="text"],
	.osa-sell-form input[type="email"],
	.osa-sell-form input[type="tel"],
	.osa-sell-form select,
	.osa-sell-form textarea {
		font-size: 16px;
	}

	.osa-sell-thumbs {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	}

	.osa-sell-photos-bar {
		flex-wrap: wrap;
	}
}
