/**
 * Shared styles for the logistics toolbox (calculators, checkers, SEO content).
 *
 * @package Logistics3DContainerLoadingPlanner
 */

.l3clp-tbx,
.l3clp-tbx * {
	box-sizing: border-box;
}

.l3clp-tbx {
	--tbx-bg: #f6f8fb;
	--tbx-panel: #ffffff;
	--tbx-text: #141a22;
	--tbx-muted: #536170;
	--tbx-line: #cbd5e1;
	--tbx-line-soft: #e2e8f0;
	--tbx-accent: #166534;
	--tbx-accent-2: #2563eb;
	--tbx-warn-bg: #fff7ed;
	--tbx-warn-line: #f59e0b;
	--tbx-danger-bg: #fff1f2;
	--tbx-danger-line: #e11d48;
	--tbx-ok-bg: #ecfdf5;
	--tbx-ok-line: #10b981;
	color: var(--tbx-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 26px 0 0;
}

/* ---------- Section shell ---------- */

.l3clp-tbx-section {
	margin: 0 0 22px;
}

.l3clp-tbx-section-head {
	border-bottom: 2px solid var(--tbx-line-soft);
	margin: 0 0 14px;
	padding: 0 0 10px;
}

.l3clp-tbx-section-head h2 {
	color: #0f172a;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin: 0 0 5px;
}

.l3clp-tbx-section-head p {
	color: var(--tbx-muted);
	font-size: 14px;
	line-height: 1.55;
	margin: 0;
	max-width: 900px;
}

/* ---------- Card grid ---------- */

.l3clp-tbx-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.l3clp-tbx-grid-wide {
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.l3clp-tbx-card {
	background: var(--tbx-panel);
	border: 1px solid var(--tbx-line);
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 15px 15px;
}

.l3clp-tbx-card > h3 {
	align-items: center;
	color: #0f172a;
	display: flex;
	font-size: 15px;
	font-weight: 750;
	gap: 8px;
	justify-content: space-between;
	line-height: 1.3;
	margin: 0;
}

.l3clp-tbx-card > h3 .l3clp-tbx-tag {
	background: #eef2ff;
	border-radius: 999px;
	color: #3730a3;
	flex: none;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	text-transform: uppercase;
}

.l3clp-tbx-card > p.l3clp-tbx-hint {
	color: var(--tbx-muted);
	font-size: 12.5px;
	line-height: 1.5;
	margin: -4px 0 0;
}

/* ---------- Inputs ---------- */

.l3clp-tbx-fields {
	display: grid;
	gap: 9px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.l3clp-tbx-fields-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.l3clp-tbx-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.l3clp-tbx-field-wide {
	grid-column: 1 / -1;
}

.l3clp-tbx-field > span {
	color: var(--tbx-muted);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.l3clp-tbx-field input,
.l3clp-tbx-field select {
	background: #fff;
	border: 1px solid var(--tbx-line);
	border-radius: 8px;
	color: var(--tbx-text);
	font: inherit;
	font-size: 13.5px;
	min-height: 36px;
	padding: 6px 9px;
	width: 100%;
}

.l3clp-tbx-field input:focus,
.l3clp-tbx-field select:focus {
	border-color: var(--tbx-accent-2);
	outline: 2px solid rgba(37, 99, 235, 0.18);
	outline-offset: 0;
}

.l3clp-tbx-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.l3clp-tbx-btn {
	background: #fff;
	border: 1px solid var(--tbx-line);
	border-radius: 8px;
	color: #1f2937;
	cursor: pointer;
	font: inherit;
	font-size: 12.5px;
	font-weight: 650;
	min-height: 34px;
	padding: 6px 11px;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.l3clp-tbx-btn:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

.l3clp-tbx-btn-primary {
	background: var(--tbx-accent);
	border-color: var(--tbx-accent);
	color: #fff;
}

.l3clp-tbx-btn-primary:hover {
	background: #14532d;
	border-color: #14532d;
}

.l3clp-tbx-btn[disabled] {
	cursor: not-allowed;
	opacity: 0.55;
}

/* ---------- Output rows ---------- */

.l3clp-tbx-out {
	background: #f8fafc;
	border: 1px solid var(--tbx-line-soft);
	border-radius: 9px;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 2px 0 0;
	overflow: hidden;
}

.l3clp-tbx-out > div {
	align-items: baseline;
	border-top: 1px solid var(--tbx-line-soft);
	display: flex;
	gap: 10px;
	justify-content: space-between;
	padding: 7px 11px;
}

.l3clp-tbx-out > div:first-child {
	border-top: 0;
}

.l3clp-tbx-out dt,
.l3clp-tbx-out > div > span {
	color: var(--tbx-muted);
	font-size: 12.5px;
	margin: 0;
}

.l3clp-tbx-out dd,
.l3clp-tbx-out > div > strong {
	color: #0f172a;
	font-size: 13.5px;
	font-weight: 750;
	margin: 0;
	text-align: right;
	white-space: nowrap;
}

.l3clp-tbx-out > div.is-highlight {
	background: var(--tbx-ok-bg);
}

.l3clp-tbx-out > div.is-highlight strong {
	color: #065f46;
}

/* ---------- Meters ---------- */

.l3clp-tbx-meter {
	background: #e2e8f0;
	border-radius: 999px;
	display: block;
	height: 6px;
	margin: 5px 0 0;
	overflow: hidden;
	width: 100%;
}

.l3clp-tbx-meter > b {
	background: var(--tbx-accent);
	border-radius: 999px;
	display: block;
	height: 100%;
	transition: width 0.25s ease;
	width: 0;
}

.l3clp-tbx-meter-row {
	display: block;
	padding: 8px 11px;
}

.l3clp-tbx-meter-row .l3clp-tbx-meter-top {
	align-items: baseline;
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

/* ---------- Status pills ---------- */

.l3clp-tbx-checks {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.l3clp-tbx-check {
	align-items: flex-start;
	border: 1px solid var(--tbx-line-soft);
	border-left-width: 4px;
	border-radius: 8px;
	display: flex;
	gap: 9px;
	padding: 8px 10px;
}

.l3clp-tbx-check strong {
	flex: none;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.05em;
	min-width: 52px;
	padding-top: 1px;
	text-transform: uppercase;
}

.l3clp-tbx-check span {
	color: #334155;
	font-size: 12.5px;
	line-height: 1.5;
}

.l3clp-tbx-check-pass {
	background: var(--tbx-ok-bg);
	border-left-color: var(--tbx-ok-line);
}

.l3clp-tbx-check-pass strong {
	color: #047857;
}

.l3clp-tbx-check-warn {
	background: var(--tbx-warn-bg);
	border-left-color: var(--tbx-warn-line);
}

.l3clp-tbx-check-warn strong {
	color: #b45309;
}

.l3clp-tbx-check-fail {
	background: var(--tbx-danger-bg);
	border-left-color: var(--tbx-danger-line);
}

.l3clp-tbx-check-fail strong {
	color: #be123c;
}

.l3clp-tbx-check-info {
	background: #f8fafc;
	border-left-color: #94a3b8;
}

.l3clp-tbx-check-info strong {
	color: #475569;
}

/* ---------- Sync banner ---------- */

.l3clp-tbx-sync {
	align-items: center;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 9px;
	color: #1e3a8a;
	display: flex;
	flex-wrap: wrap;
	font-size: 12.5px;
	gap: 9px;
	justify-content: space-between;
	line-height: 1.5;
	margin: 0 0 14px;
	padding: 9px 12px;
}

.l3clp-tbx-sync p {
	margin: 0;
}

/* ---------- Converter table ---------- */

.l3clp-tbx-conv {
	display: grid;
	gap: 9px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.l3clp-tbx-conv-pair {
	align-items: end;
	display: grid;
	gap: 6px;
	grid-template-columns: 1fr auto 1fr;
}

.l3clp-tbx-conv-pair .l3clp-tbx-swap {
	background: #fff;
	border: 1px solid var(--tbx-line);
	border-radius: 7px;
	color: #475569;
	cursor: pointer;
	font-size: 13px;
	height: 36px;
	line-height: 1;
	width: 32px;
}

.l3clp-tbx-conv-pair .l3clp-tbx-swap:hover {
	background: #f1f5f9;
}

/* ---------- SEO / GEO content ---------- */

.l3clp-tbx-prose {
	background: var(--tbx-panel);
	border: 1px solid var(--tbx-line);
	border-radius: 12px;
	padding: 16px 18px 18px;
}

.l3clp-tbx-prose h3 {
	color: #0f172a;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.35;
	margin: 18px 0 7px;
}

.l3clp-tbx-prose h3:first-child {
	margin-top: 0;
}

.l3clp-tbx-prose p,
.l3clp-tbx-prose li {
	color: #334155;
	font-size: 14px;
	line-height: 1.65;
}

.l3clp-tbx-prose p {
	margin: 0 0 9px;
}

.l3clp-tbx-prose ul,
.l3clp-tbx-prose ol {
	margin: 0 0 9px;
	padding-left: 20px;
}

.l3clp-tbx-prose li {
	margin: 0 0 4px;
}

.l3clp-tbx-formula {
	background: #0f172a;
	border-radius: 8px;
	color: #e2e8f0;
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	line-height: 1.6;
	margin: 0 0 12px;
	overflow-x: auto;
	padding: 10px 13px;
	white-space: pre;
}

.l3clp-tbx-table-wrap {
	overflow-x: auto;
}

.l3clp-tbx-table {
	border-collapse: collapse;
	font-size: 13px;
	margin: 0 0 12px;
	min-width: 520px;
	width: 100%;
}

.l3clp-tbx-table th,
.l3clp-tbx-table td {
	border: 1px solid var(--tbx-line-soft);
	padding: 7px 10px;
	text-align: left;
	vertical-align: top;
}

.l3clp-tbx-table th {
	background: #f1f5f9;
	color: #0f172a;
	font-weight: 700;
	white-space: nowrap;
}

.l3clp-tbx-table td {
	color: #334155;
}

/* ---------- FAQ ---------- */

.l3clp-tbx-faq {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.l3clp-tbx-faq details {
	background: var(--tbx-panel);
	border: 1px solid var(--tbx-line);
	border-radius: 10px;
	padding: 0;
}

.l3clp-tbx-faq summary {
	color: #0f172a;
	cursor: pointer;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.45;
	list-style: none;
	padding: 12px 40px 12px 14px;
	position: relative;
}

.l3clp-tbx-faq summary::-webkit-details-marker {
	display: none;
}

.l3clp-tbx-faq summary::after {
	color: #64748b;
	content: "+";
	font-size: 18px;
	font-weight: 700;
	position: absolute;
	right: 15px;
	top: 10px;
}

.l3clp-tbx-faq details[open] summary::after {
	content: "\2212";
}

.l3clp-tbx-faq details > div {
	border-top: 1px solid var(--tbx-line-soft);
	padding: 11px 14px 13px;
}

.l3clp-tbx-faq details > div p {
	color: #334155;
	font-size: 13.5px;
	line-height: 1.65;
	margin: 0 0 8px;
}

.l3clp-tbx-faq details > div p:last-child {
	margin-bottom: 0;
}

/* ---------- Related links ---------- */

.l3clp-tbx-links {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.l3clp-tbx-links li {
	margin: 0;
}

.l3clp-tbx-links a {
	background: var(--tbx-panel);
	border: 1px solid var(--tbx-line);
	border-radius: 10px;
	color: #0f172a;
	display: block;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	padding: 12px 14px;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.l3clp-tbx-links a:hover {
	border-color: var(--tbx-accent-2);
	transform: translateY(-1px);
}

.l3clp-tbx-links a span {
	color: var(--tbx-muted);
	display: block;
	font-size: 12.5px;
	font-weight: 500;
	margin: 3px 0 0;
}

/* ---------- Disclaimer ---------- */

.l3clp-tbx-note {
	color: var(--tbx-muted);
	font-size: 12.5px;
	line-height: 1.6;
	margin: 12px 0 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
	.l3clp-tbx-fields,
	.l3clp-tbx-fields-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.l3clp-tbx-section-head h2 {
		font-size: 19px;
	}

	.l3clp-tbx-conv-pair {
		grid-template-columns: 1fr auto 1fr;
	}
}

@media (max-width: 460px) {
	.l3clp-tbx-fields,
	.l3clp-tbx-fields-3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.l3clp-tbx-field-wide {
		grid-column: auto;
	}
}
