/* ═══ Lithops Freight Form — Design System ═══ */

:root {
	--lff-card-bg: rgba(255,255,255,0.97);
	--lff-text: #18263b;
	--lff-muted: #6d7789;
	--lff-line: #dbe3ee;
	--lff-line-strong: #cfd8e7;
	--lff-blue: #2f66d8;
	--lff-blue-soft: rgba(47,102,216,0.10);
	--lff-danger: #c7342a;
	--lff-success: #1f7a47;
	--lff-success-bg: #edf8f1;
	--lff-shadow: 0 18px 42px rgba(7,20,44,0.24);
	--lff-cta: #f2b45b;
	--lff-cta-hover: #e9aa4d;
	--lff-note-bg: rgba(245,248,253,0.98);
	--lff-radius: 7px;
	--lff-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ─── Reset (prevent theme overrides) ─── */
.lff-wrap,
.lff-wrap * {
	box-sizing: border-box;
}
.lff-wrap input[type="text"],
.lff-wrap input[type="email"],
.lff-wrap input[type="number"],
.lff-wrap input[type="checkbox"],
.lff-wrap input[type="radio"],
.lff-wrap select,
.lff-wrap button {
	font-family: var(--lff-font);
	line-height: normal;
}
.lff-wrap h2,
.lff-wrap h3,
.lff-wrap p,
.lff-wrap label {
	margin: 0;
	padding: 0;
}

/* ─── Wrapper ─── */
.lff-wrap {
	font-family: var(--lff-font);
	color: var(--lff-text);
	max-width: 420px;
	margin: 0 auto;
	padding: 16px;
	line-height: 1.5;
	font-size: 15px;
}

/* ─── Progress ─── */
.lff-progress {
	height: 3px;
	background: var(--lff-line);
	border-radius: 2px;
	margin-bottom: 20px;
	overflow: hidden;
}
.lff-progress-bar {
	height: 100%;
	background: var(--lff-blue);
	border-radius: 2px;
	transition: width .3s ease;
}

/* ─── Card ─── */
.lff-card {
	background: var(--lff-card-bg);
	border-radius: var(--lff-radius);
	box-shadow: var(--lff-shadow);
	padding: 28px 24px;
	backdrop-filter: blur(8px);
}

/* ─── Steps ─── */
.lff-wrap .lff-step { display: none !important; }
.lff-wrap .lff-step.lff-step--active { display: block !important; }

/* ─── Typography ─── */
.lff-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.3;
}
.lff-subtitle {
	font-size: 14px;
	color: var(--lff-muted);
	margin: 0 0 20px;
}

/* ─── Fields ─── */
.lff-field {
	margin-bottom: 16px;
}
.lff-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--lff-text);
}
.lff-input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	font-size: 15px;
	font-family: var(--lff-font);
	border: 1px solid var(--lff-line-strong);
	border-radius: 5px;
	outline: none;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
.lff-input:focus {
	border-color: var(--lff-blue);
	box-shadow: 0 0 0 3px var(--lff-blue-soft);
}
.lff-input.is-error {
	border-color: var(--lff-danger);
}

/* ─── Rows ─── */
.lff-row {
	display: flex;
	gap: 10px;
}
.lff-field--half { flex: 1; }
.lff-field--third { flex: 1; }

/* ─── Combobox / Dropdown ─── */
.lff-combobox { position: relative; }
.lff-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--lff-line-strong);
	border-radius: 5px;
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	max-height: 220px;
	overflow-y: auto;
	z-index: 100;
}
.lff-dropdown.is-open { display: block; }
.lff-dropdown-item {
	padding: 10px 14px;
	font-size: 14px;
	cursor: pointer;
	border-bottom: 1px solid var(--lff-line);
}
.lff-dropdown-item:last-child { border-bottom: 0; }
.lff-dropdown-item:hover,
.lff-dropdown-item.is-highlight {
	background: var(--lff-blue-soft);
}
.lff-dropdown-item .lff-city-country {
	font-size: 12px;
	color: var(--lff-muted);
}

/* ─── Tabs ─── */
.lff-tabs {
	display: flex;
	gap: 0;
	border: 1px solid var(--lff-line-strong);
	border-radius: 5px;
	overflow: hidden;
}
.lff-tab {
	flex: 1;
	height: 40px;
	border: none;
	background: #fff;
	font-size: 14px;
	font-family: var(--lff-font);
	font-weight: 500;
	color: var(--lff-muted);
	cursor: pointer;
	transition: background .15s, color .15s;
}
.lff-tab + .lff-tab { border-left: 1px solid var(--lff-line-strong); }
.lff-tab--active {
	background: var(--lff-blue);
	color: #fff;
}

/* ─── Option Cards (radio) ─── */
.lff-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}
.lff-option-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px;
	border: 1px solid var(--lff-line);
	border-radius: 5px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
	font-size: 14px;
	line-height: 1.4;
}
.lff-option-card:hover { border-color: var(--lff-blue); background: var(--lff-blue-soft); }
.lff-option-card input[type="radio"] { margin-top: 2px; }
.lff-option-card:has(input:checked) {
	border-color: var(--lff-blue);
	background: var(--lff-blue-soft);
}

/* ─── Checkbox group ─── */
.lff-check-group {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.lff-check {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: 1px solid var(--lff-line);
	border-radius: 5px;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.lff-check:has(input:checked) {
	border-color: var(--lff-blue);
	background: var(--lff-blue-soft);
}

/* ─── Buttons ─── */
.lff-cta {
	display: block;
	width: 100%;
	height: 44px;
	margin-top: 16px;
	border: none;
	border-radius: 6px;
	background: var(--lff-cta);
	color: var(--lff-text);
	font-size: 15px;
	font-weight: 700;
	font-family: var(--lff-font);
	cursor: pointer;
	transition: background .15s, transform .1s;
}
.lff-cta:hover { background: var(--lff-cta-hover); }
.lff-cta:active { transform: scale(.98); }
.lff-cta:disabled { opacity: .5; cursor: not-allowed; }

.lff-back {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 10px;
	border: none;
	background: transparent;
	font-size: 14px;
	font-family: var(--lff-font);
	color: var(--lff-muted);
	cursor: pointer;
	text-align: center;
}
.lff-back:hover { color: var(--lff-blue); }

.lff-ghost {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 16px;
	border: 1px solid var(--lff-line-strong);
	border-radius: 5px;
	background: transparent;
	font-size: 13px;
	font-family: var(--lff-font);
	color: var(--lff-muted);
	cursor: pointer;
}
.lff-ghost:hover { border-color: var(--lff-blue); color: var(--lff-blue); }

/* ─── Errors ─── */
.lff-error {
	font-size: 13px;
	color: var(--lff-danger);
	margin-top: 4px;
	min-height: 0;
}
.lff-error:empty { display: none; }

/* ─── Notes ─── */
.lff-note {
	background: var(--lff-note-bg);
	border: 1px solid var(--lff-line);
	border-radius: 5px;
	padding: 12px 14px;
	font-size: 13px;
	color: var(--lff-muted);
	margin: 12px 0;
	line-height: 1.5;
}
.lff-note--warn { background: #fcf9e8; border-color: #e8dca0; color: #7a6200; }

/* ─── Rate list ─── */
.lff-rate-list { margin: 16px 0; }
.lff-rate-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--lff-line);
	font-size: 14px;
}
.lff-rate-row:last-child { border-bottom: 0; }
.lff-rate-label { color: var(--lff-text); }
.lff-rate-value { font-weight: 700; color: var(--lff-blue); }

/* ─── Route summary ─── */
.lff-route-summary {
	font-size: 14px;
	color: var(--lff-muted);
	margin-bottom: 12px;
	padding: 8px 12px;
	background: var(--lff-note-bg);
	border-radius: 5px;
}
.lff-route-summary:empty { display: none; }

/* ─── Consent ─── */
.lff-consent {
	margin: 16px 0;
	font-size: 13px;
	line-height: 1.8;
}
.lff-consent label { display: block; cursor: pointer; }

/* ─── Loading ─── */
.lff-loading {
	text-align: center;
	padding: 24px;
	color: var(--lff-muted);
	font-size: 14px;
}

/* ─── Summary table ─── */
.lff-summary-table { margin: 16px 0; }
.lff-summary-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--lff-line);
	font-size: 14px;
}
.lff-summary-row:last-child { border-bottom: 0; }
.lff-summary-key { color: var(--lff-muted); }
.lff-summary-val { font-weight: 600; text-align: right; }

/* ─── Success message ─── */
.lff-success-message {
	text-align: center;
	padding: 24px 0;
}
.lff-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: var(--lff-success-bg);
	color: var(--lff-success);
	font-size: 28px;
	line-height: 56px;
	font-weight: 700;
}
.lff-success-text {
	color: var(--lff-success);
	font-weight: 600;
}

/* ─── Alt link ─── */
.lff-alt-link {
	text-align: center;
	font-size: 13px;
	color: var(--lff-muted);
	margin-top: 14px;
}
.lff-alt-link a { color: var(--lff-blue); text-decoration: none; }
.lff-alt-link a:hover { text-decoration: underline; }

/* ─── Logged in ─── */
.lff-logged-in {
	text-align: center;
	padding: 12px 0;
}

/* ─── Load builder ─── */
.lff-load-card {
	background: var(--lff-note-bg);
	border: 1px solid var(--lff-line);
	border-radius: 5px;
	padding: 14px;
	margin-bottom: 10px;
}
