/* FormListingFE — scoped frontend styles. All rules live under .flfe-wrap. */

.flfe-wrap {
	--flfe-radius: 12px;
	--flfe-border: rgba(0, 0, 0, 0.14);
	--flfe-accent: currentColor;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 1rem;
	line-height: 1.5;
}

.flfe-wrap *,
.flfe-wrap *::before,
.flfe-wrap *::after {
	box-sizing: border-box;
}

.flfe-form {
	display: block;
	width: 100%;
	margin: 0;
	padding: clamp(16px, 3vw, 32px);
	border: 1px solid var(--flfe-border);
	border-radius: var(--flfe-radius);
	background: rgba(127, 127, 127, 0.04);
}

.flfe-form__header {
	margin-bottom: 24px;
}

.flfe-form__title {
	margin: 0 0 6px;
	font-size: clamp(1.4rem, 2.5vw, 2rem);
	line-height: 1.2;
}

.flfe-form__subtitle {
	margin: 0;
	opacity: 0.75;
	font-size: 0.95rem;
}

.flfe-section {
	margin: 0 0 26px;
	padding: 18px;
	border: 1px solid var(--flfe-border);
	border-radius: var(--flfe-radius);
	background: rgba(255, 255, 255, 0.35);
}

.flfe-section__title {
	padding: 0 8px;
	margin: 0;
	font-weight: 600;
	font-size: 1.02rem;
	letter-spacing: 0.01em;
}

.flfe-grid {
	display: grid;
	gap: 16px;
	margin-top: 14px;
}

.flfe-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flfe-field--full {
	grid-column: 1 / -1;
}

.flfe-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.9rem;
}

.flfe-req {
	color: #d43f3f;
}

.flfe-field input[type="text"],
.flfe-field input[type="email"],
.flfe-field input[type="tel"],
.flfe-field input[type="url"],
.flfe-field select,
.flfe-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--flfe-border);
	border-radius: 10px;
	background: #fff;
	color: #1d1d1d;
	font: inherit;
	font-size: 1rem; /* prevents iOS zoom */
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flfe-field textarea {
	resize: vertical;
	min-height: 140px;
}

.flfe-field input:focus,
.flfe-field select:focus,
.flfe-field textarea:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.45);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

.flfe-field.flfe-has-error input,
.flfe-field.flfe-has-error select,
.flfe-field.flfe-has-error textarea {
	border-color: #d43f3f;
}

.flfe-error-msg {
	display: block;
	margin-top: 5px;
	color: #d43f3f;
	font-size: 0.85rem;
}

.flfe-help {
	margin: 8px 0 0;
	font-size: 0.85rem;
	opacity: 0.75;
}

/* Honeypot */
.flfe-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Dropzone */
.flfe-dropzone {
	position: relative;
	margin-top: 14px;
	padding: 26px 16px;
	border: 2px dashed var(--flfe-border);
	border-radius: var(--flfe-radius);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.flfe-dropzone.flfe-dragover {
	border-color: #3a3a3a;
	background: rgba(0, 0, 0, 0.03);
}

.flfe-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.flfe-dropzone__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	pointer-events: none;
}

.flfe-dropzone__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--flfe-border);
	font-size: 1.3rem;
	line-height: 1;
}

.flfe-dropzone__count {
	font-size: 0.85rem;
	opacity: 0.7;
}

.flfe-previews {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
	margin-top: 14px;
}

.flfe-preview {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--flfe-border);
	background: #fff;
}

.flfe-preview img {
	display: block;
	width: 100%;
	height: 110px;
	object-fit: cover;
}

.flfe-preview__badge {
	position: absolute;
	left: 6px;
	top: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 0.7rem;
	letter-spacing: 0.03em;
}

.flfe-preview__remove {
	position: absolute;
	right: 6px;
	top: 6px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.flfe-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.flfe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 34px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.12s ease, opacity 0.15s ease;
}

.flfe-btn:hover {
	transform: translateY(-1px);
	opacity: 0.92;
}

.flfe-btn--primary {
	background: #16181d;
	color: #fff;
}

.flfe-btn--paypal {
	background: #0070ba;
	color: #fff;
}

.flfe-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Alerts */
.flfe-alert {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: var(--flfe-radius);
	border-left: 4px solid;
	font-size: 0.95rem;
}

.flfe-alert ul {
	margin: 8px 0 0;
	padding-left: 20px;
}

.flfe-alert--error {
	border-color: #d43f3f;
	background: rgba(212, 63, 63, 0.08);
}

.flfe-alert--success {
	border-color: #2f9e5f;
	background: rgba(47, 158, 95, 0.09);
}

.flfe-alert--info {
	border-color: #2f7fbe;
	background: rgba(47, 127, 190, 0.09);
}

/* Payment card */
.flfe-card {
	padding: clamp(18px, 3vw, 30px);
	border: 1px solid var(--flfe-border);
	border-radius: var(--flfe-radius);
	background: rgba(127, 127, 127, 0.04);
}

.flfe-payment__title {
	margin: 0 0 8px;
}

.flfe-payment__summary {
	list-style: none;
	margin: 18px 0;
	padding: 0;
}

.flfe-payment__summary li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--flfe-border);
}

.flfe-payment__note {
	margin: 14px 0 0;
	font-size: 0.85rem;
	opacity: 0.75;
}

@media (max-width: 782px) {
	.flfe-grid--2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.flfe-actions {
		justify-content: stretch;
	}

	.flfe-btn {
		width: 100%;
	}
}
