/**
 * Lestin Business Addon — Frontend Styles v4
 * Prefix: lba-sf- (search form) | lba- (listing widgets)
 *
 * Form design: white card, inline fields with pipe separators, orange CTA button.
 */

/* ════════════════════════════════════════════════════════════════════════════
   Listing Search Form Widget
   ════════════════════════════════════════════════════════════════════════════ */

.lba-sf-wrap {
	width: 100%;
	box-sizing: border-box;
}

.lba-sf-form {
	width: 100%;
	margin: 0;
	padding: 0;
}

/* ── Inner container ─────────────────────────────────────────────────────── */
.lba-sf-inner {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
	box-sizing: border-box;
	gap: 0;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
}

/* ── Grid layout ─────────────────────────────────────────────────────────── */
.lba-sf-layout-grid {
	display: grid;
	grid-template-columns: repeat( var(--lba-cols, 3), 1fr );
	align-items: end;
	gap: 12px;
	background: transparent;
	border-radius: 0;
	overflow: visible;
}
.lba-sf-layout-grid .lba-sf-field {
	background: #ffffff;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

/* ── Stacked layout ──────────────────────────────────────────────────────── */
.lba-sf-layout-stack {
	flex-direction: column;
	flex-wrap: wrap;
	background: transparent;
	border-radius: 0;
	overflow: visible;
	gap: 10px;
}
.lba-sf-layout-stack .lba-sf-field {
	width: 100%;
	flex: 0 0 auto;
	background: #ffffff;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

/* ── Inline layout (matches the design screenshot) ───────────────────────── */
.lba-sf-layout-inline {
	flex-wrap: nowrap;
	align-items: stretch;
}
.lba-sf-layout-inline .lba-sf-field {
	flex: 1 1 0;
	min-width: 80px;
	border-right: 1px solid #e2e8f0;
}
.lba-sf-layout-inline .lba-sf-f-price {
	flex: 1.8 1 0;
}
.lba-sf-layout-inline .lba-sf-btn-wrap {
	flex: 0 0 auto;
	border-right: none;
}

/* ── Field wrapper ───────────────────────────────────────────────────────── */
.lba-sf-field {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	box-sizing: border-box;
	position: relative;
}

/* ── Label ───────────────────────────────────────────────────────────────── */
.lba-sf-label {
	display: block;
	font-size: .8125rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 4px;
	padding: 0 16px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Input / Select base — no border (border on parent) ─────────────────── */
.lba-sf-input,
.lba-sf-select {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 16px;
	font-size: .9375rem;
	color: #111827;
	background: transparent;
	border: none;
	border-radius: 0;
	box-sizing: border-box;
	outline: none;
	transition: background .15s;
	line-height: normal;
	-webkit-appearance: none;
	appearance: none;
}
.lba-sf-input::placeholder { color: #9ca3af; }
.lba-sf-input:focus,
.lba-sf-select:focus { background: #f8fafc; }

/* ── Select custom chevron ───────────────────────────────────────────────── */
.lba-sf-select {
	padding-right: 36px;
	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 fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}
.lba-sf-select::-ms-expand { display: none; }

/* ── Price field ─────────────────────────────────────────────────────────── */
.lba-sf-price-row {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 0 12px;
	height: 48px;
	box-sizing: border-box;
}
.lba-sf-price-half {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
}
.lba-sf-sym {
	position: absolute;
	left: 9px;
	top: 50%;
	transform: translateY(-50%);
	font-size: .875rem;
	font-weight: 700;
	color: #6b7280;
	pointer-events: none;
	z-index: 1;
}
.lba-sf-price-in {
	display: block;
	width: 100%;
	height: 34px;
	padding: 0 8px 0 22px !important;
	font-size: .875rem;
	color: #111827;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	box-sizing: border-box;
	outline: none;
}
.lba-sf-price-in::placeholder { color: #9ca3af; }
.lba-sf-price-in:focus { border-color: #3b82f6; background: #fff; }
.lba-sf-price-in::-webkit-inner-spin-button,
.lba-sf-price-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lba-sf-price-in[type=number] { -moz-appearance: textfield; }
.lba-sf-dash { color: #9ca3af; font-size: .875rem; font-weight: 600; flex-shrink: 0; }

/* ── Button ──────────────────────────────────────────────────────────────── */
.lba-sf-btn-wrap {
	display: flex;
	align-items: stretch;
}
.lba-sf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 100%;
	min-height: 48px;
	padding: 0 28px;
	font-size: .9375rem;
	font-weight: 700;
	color: #ffffff;
	background: #f07c27;
	border: none;
	border-radius: 0;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, box-shadow .15s;
	line-height: 1;
}
/* Inline: round right corners to match container */
.lba-sf-layout-inline .lba-sf-btn { border-radius: 0 8px 8px 0; }
/* Grid/stack: full rounded button */
.lba-sf-layout-grid .lba-sf-btn,
.lba-sf-layout-stack .lba-sf-btn { border-radius: 6px; width: 100%; }

.lba-sf-btn:hover {
	background: #d96c1c;
	box-shadow: 0 4px 14px rgba(217,108,28,.4);
}
.lba-sf-btn:active { box-shadow: none; }
.lba-sf-btn-icon { font-size: 1em; flex-shrink: 0; }
.lba-sf-btn-icon svg { width: 1em; height: 1em; fill: currentColor; display: block; }
.lba-sf-btn-text { line-height: 1; }

/* ── Responsive — Tablet ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.lba-sf-layout-inline { flex-wrap: wrap; }
	.lba-sf-layout-inline .lba-sf-field {
		flex: 1 1 calc(50% - 1px);
		min-width: calc(50% - 1px);
		border-bottom: 1px solid #e2e8f0;
	}
	.lba-sf-layout-inline .lba-sf-f-price { flex: 1 1 100%; }
	.lba-sf-layout-inline .lba-sf-btn-wrap {
		flex: 1 1 100%;
		border-top: 1px solid #e2e8f0;
	}
	.lba-sf-layout-inline .lba-sf-btn { border-radius: 0 0 8px 8px; width: 100%; }
	.lba-sf-layout-grid { --lba-cols: 2; }
}

/* ── Responsive — Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.lba-sf-layout-inline .lba-sf-field,
	.lba-sf-layout-grid   .lba-sf-field {
		flex: 1 1 100%;
		min-width: 0;
		border-right: none;
		border-bottom: 1px solid #e2e8f0;
	}
	.lba-sf-layout-grid { grid-template-columns: 1fr; }
	.lba-sf-price-row { gap: 6px; padding: 0 10px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Listing Detail Widgets
   ════════════════════════════════════════════════════════════════════════════ */

.lba-widget-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.lba-field-label { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; display: block; width: 100%; }
.lba-icon { display: inline-flex; align-items: center; color: #2271b1; margin-right: 4px; }
.lba-icon svg { width: 1em; height: 1em; fill: currentColor; }
.lba-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .8125rem; font-weight: 500; background: #f0f4ff; color: #2271b1; }
.lba-pill-link { text-decoration: none; transition: background .15s; }
.lba-pill-link:hover { background: #dce7ff; }
.lba-list { margin: 0; padding: 0; list-style: none; }
.lba-list li { padding: 2px 0; }
.lba-empty { color: #9ca3af; font-style: italic; }
.lba-price-widget .lba-price-amount { font-weight: 700; font-size: 1.125rem; color: #2271b1; }
.lba-meta-grid { display: grid; grid-template-columns: repeat( var(--lba-cols, 2), 1fr ); gap: 16px; }
.lba-meta-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: #f8fafc; border-radius: 8px; }
.lba-meta-icon { font-size: 1.1rem; color: #2271b1; flex-shrink: 0; margin-top: 2px; }
.lba-meta-icon svg { width: 1em; height: 1em; fill: currentColor; }
.lba-meta-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lba-meta-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.lba-meta-value { font-size: .9375rem; font-weight: 600; color: #1e293b; word-break: break-word; }
.lba-widget-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; border: 2px dashed #cbd5e1; border-radius: 8px; color: #94a3b8; text-align: center; min-height: 80px; }
@media (max-width: 480px) { .lba-meta-grid { grid-template-columns: 1fr; } }
