/*
 * LattiSpec Directory, styled to the LattiSpec design system.
 * Poppins: titles, company names, stat numbers. DM Sans: body, buttons, forms.
 * Raleway: uppercase labels. Fonts are expected to be loaded by the site (Elementor globals).
 */
.lsd {
	--lsd-blue: #00AEEF;          /* fills, buttons (overridable in Settings) */
	--lsd-blue-hover: #0090C8;
	--lsd-link: #007FB5;          /* blue text on white */
	--lsd-link-hover: #006A97;
	--lsd-tint: #E6F6FC;
	--lsd-indigo: #150958;
	--lsd-navy: #0A1628;
	--lsd-body: #4A5872;
	--lsd-muted: #6B7891;
	--lsd-line: #E3E8F0;
	--lsd-surface: #F5F9FC;
	--lsd-field: #D5DDE8;
	--lsd-ring: rgba(0, 174, 239, .18);

	--lsd-f-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--lsd-f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--lsd-f-label: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;

	font-family: var(--lsd-f-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--lsd-body);
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}
.lsd *, .lsd *::before, .lsd *::after { box-sizing: border-box; }
.lsd [hidden] { display: none !important; }
.lsd .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Uppercase label style (Raleway 700, .16em, lining numbers) */
.lsd .lsd-label,
.lsd .lsd-table th {
	font-family: var(--lsd-f-label);
	font-weight: 700;
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: .16em;
	text-transform: uppercase;
	font-variant-numeric: lining-nums;
}

/* ---------- Toolbar ---------- */
.lsd-toolbar { margin-bottom: 24px; }
.lsd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* Small pill buttons (13px, 10×18) */
.lsd .lsd-tab,
.lsd .lsd-pager button {
	appearance: none;
	font-family: var(--lsd-f-body);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--lsd-line);
	background: #fff;
	color: var(--lsd-navy);
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}
.lsd .lsd-tab span { color: var(--lsd-muted); margin-left: 6px; font-weight: 500; }
.lsd .lsd-tab:hover { border-color: var(--lsd-blue); background: var(--lsd-tint); color: var(--lsd-navy); }
.lsd .lsd-tab.is-active,
.lsd .lsd-tab.is-active:hover { background: var(--lsd-blue); border-color: var(--lsd-blue); color: #fff; }
.lsd .lsd-tab.is-active span { color: rgba(255, 255, 255, .85); }

.lsd-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lsd-search { flex: 1 1 320px; position: relative; }
.lsd-country { flex: 0 1 240px; }

/* Form fields: 52px, 10px radius, #D5DDE8 border, DM Sans 16 */
.lsd .lsd-search input,
.lsd .lsd-country select {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 16px;
	font-family: var(--lsd-f-body);
	font-size: 16px;
	color: var(--lsd-navy);
	background-color: #fff;
	border: 1px solid var(--lsd-field);
	border-radius: 10px;
	box-shadow: none;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.lsd .lsd-search input { padding-left: 46px; }
.lsd .lsd-search::before {
	content: "";
	position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
	background: var(--lsd-muted);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 0 1 5.96 12.05l4.25 4.24-1.42 1.42-4.24-4.25A7.5 7.5 0 1 1 10.5 3Zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 0 1 5.96 12.05l4.25 4.24-1.42 1.42-4.24-4.25A7.5 7.5 0 1 1 10.5 3Zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z'/%3E%3C/svg%3E") center / contain no-repeat;
	pointer-events: none;
}
.lsd .lsd-search input::placeholder { color: var(--lsd-muted); opacity: 1; }
.lsd .lsd-country select {
	-webkit-appearance: none; appearance: none;
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7891'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 22px;
	cursor: pointer;
}
.lsd .lsd-search input:focus,
.lsd .lsd-country select:focus {
	border-color: var(--lsd-blue);
	box-shadow: 0 0 0 4px var(--lsd-ring);
}
.lsd .lsd-tab:focus-visible,
.lsd .lsd-pager button:focus-visible,
.lsd a:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--lsd-ring); }

.lsd-count { font-size: 14px; color: var(--lsd-muted); margin-left: auto; white-space: nowrap; }

/* ---------- Table card ---------- */
.lsd-table-wrap {
	background: #fff;
	border: 1px solid var(--lsd-line);
	border-radius: 16px;
	overflow: hidden;
}
.lsd .lsd-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 16px; background: transparent; }
.lsd .lsd-table th {
	text-align: left;
	color: var(--lsd-muted);
	background: var(--lsd-surface);
	padding: 16px 24px;
	border: 0;
	border-bottom: 1px solid var(--lsd-line);
}
.lsd .lsd-table td {
	padding: 18px 24px;
	border: 0;
	border-bottom: 1px solid var(--lsd-line);
	vertical-align: middle;
	background: transparent;
	color: var(--lsd-body);
}
.lsd .lsd-table tbody tr:last-child td { border-bottom: 0; }
.lsd .lsd-table tbody tr { transition: background-color .15s; }
.lsd .lsd-table tbody tr:hover td { background: var(--lsd-surface); }
.lsd .lsd-table .lsd-name {
	font-family: var(--lsd-f-head);
	font-weight: 600;
	font-size: 16px;
	color: var(--lsd-navy);
	width: 42%;
}
.lsd .lsd-web a {
	color: var(--lsd-link);
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
	transition: color .15s;
}
.lsd .lsd-web a::after { content: " \2197"; font-size: .85em; opacity: .7; }
.lsd .lsd-web a:hover { color: var(--lsd-link-hover); text-decoration: underline; }
.lsd-muted { color: var(--lsd-muted); }

.lsd-noresults,
.lsd-empty {
	margin: 0;
	padding: 32px 24px;
	text-align: center;
	color: var(--lsd-body);
	background: var(--lsd-tint);
	border-radius: 16px;
}

/* Success message (blue-tint panel) */
.lsd .lsd-success {
	margin: 0 0 24px;
	padding: 16px 20px;
	background: var(--lsd-tint);
	border: 1px solid rgba(0, 174, 239, .35);
	border-radius: 10px;
	color: var(--lsd-navy);
	font-size: 16px;
}
.lsd .lsd-success a { color: var(--lsd-link); font-weight: 600; }

/* ---------- Pager ---------- */
.lsd-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.lsd-pager:empty { display: none; }
.lsd .lsd-pager button { min-width: 42px; padding: 10px 14px; }
.lsd .lsd-pager button:hover:not(:disabled) { border-color: var(--lsd-blue); background: var(--lsd-tint); }
.lsd .lsd-pager button[aria-current="page"] { background: var(--lsd-blue); border-color: var(--lsd-blue); color: #fff; }
.lsd .lsd-pager button:disabled { opacity: .4; cursor: default; }
.lsd-pager .lsd-gap { align-self: center; color: var(--lsd-muted); padding: 0 2px; }

/* ---------- Non-member view ---------- */
.lsd-summary {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 16px 32px; margin-bottom: 24px;
}
.lsd-stats { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.lsd-stat { display: flex; flex-direction: column; gap: 2px; }
.lsd .lsd-stat b {
	font-family: var(--lsd-f-head);
	font-weight: 600;
	font-size: 40px;
	line-height: 1.1;
	color: var(--lsd-navy);
}
.lsd .lsd-stat .lsd-label { color: var(--lsd-muted); }
.lsd-note { font-size: 14px; color: var(--lsd-muted); }

.lsd-locked { position: relative; margin-top: 16px; min-height: 420px; }
.lsd-ghost {
	background: #fff;
	border: 1px solid var(--lsd-line);
	border-radius: 16px;
	overflow: hidden;
	filter: blur(3px);
	opacity: .8;
}
.lsd-ghost-row { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 32px; padding: 22px 24px; border-bottom: 1px solid var(--lsd-line); }
.lsd-ghost-row:last-child { border-bottom: 0; }
.lsd-ghost-row span { height: 12px; border-radius: 6px; background: #DCE3EC; }
.lsd-ghost-row span:nth-child(2) { background: #CDEBF7; }
.lsd-ghost-row:nth-child(2n) span:first-child { width: 70%; }
.lsd-ghost-row:nth-child(3n) span:nth-child(2) { width: 55%; }

/* Without the blurred placeholder the panel sits in the flow */
.lsd-locked--plain { min-height: 0; }
.lsd-locked--plain .lsd-cta { position: static; transform: none; width: 100%; max-width: none; margin: 0 auto; }
.lsd-locked--first { margin-top: 0; }

/* Unlock panel: hero gradient, on-dark buttons */
.lsd-cta {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: min(92%, 560px);
	padding: 40px 36px;
	text-align: center;
	color: rgba(255, 255, 255, .82);
	background: linear-gradient(135deg, var(--lsd-navy) 0%, var(--lsd-indigo) 100%);
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(10, 22, 40, .28);
}
.lsd .lsd-cta .lsd-label {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--lsd-blue);
	margin: 0 0 16px;
}
.lsd-cta .lsd-lock { flex: none; }
.lsd .lsd-cta .lsd-cta-title {
	font-family: var(--lsd-f-head);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.3;
	color: #fff;
	margin: 0 0 12px;
	letter-spacing: 0;
	text-transform: none;
}
.lsd .lsd-cta .lsd-cta-text { margin: 0 0 28px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.lsd .lsd-cta .lsd-cta-text:last-child { margin-bottom: 0; }

/* Primary pill button (15px, 16×26) */
.lsd .lsd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--lsd-f-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	padding: 16px 26px;
	border-radius: 999px;
	background: var(--lsd-blue);
	color: #fff;
	text-decoration: none;
	border: 0;
	transition: background-color .15s;
}
.lsd .lsd-btn::after { content: "\2192"; }
.lsd .lsd-btn:hover,
.lsd .lsd-btn:focus { background: var(--lsd-blue-hover); color: #fff; }
.lsd .lsd-cta .lsd-login { margin: 20px 0 0; font-size: 14px; color: rgba(255, 255, 255, .7); }
.lsd .lsd-cta .lsd-login a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lsd .lsd-cta .lsd-login a:hover { color: var(--lsd-blue); }

/* Elementor widget switches */
.elementor-widget-lattispec_directory:not(.lsd-arrow-yes) .lsd .lsd-web a::after,
.elementor-widget-lattispec_directory:not(.lsd-btn-arrow-yes) .lsd .lsd-btn::after { content: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.lsd .lsd-stat b { font-size: 34px; }
	.lsd .lsd-cta .lsd-cta-title { font-size: 22px; }
	.lsd .lsd-table th, .lsd .lsd-table td { padding-left: 20px; padding-right: 20px; }
}

/* ---------- Phone: rows become cards ---------- */
@media (max-width: 767px) {
	.lsd { font-size: 16px; }
	.lsd-search, .lsd-country { flex: 1 1 100%; }
	.lsd-count { margin-left: 0; }
	.lsd-tabs { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.lsd-tabs::-webkit-scrollbar { display: none; }
	.lsd .lsd-tab { flex: none; }

	.lsd .lsd-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
	.lsd .lsd-table tr { display: block; padding: 16px; border-bottom: 1px solid var(--lsd-line); }
	.lsd .lsd-table tbody tr:last-child { border-bottom: 0; }
	.lsd .lsd-table td { display: block; padding: 0 !important; border: 0; width: auto; }
	.lsd .lsd-table .lsd-name { font-size: 17px; margin-bottom: 4px; width: auto; }
	.lsd .lsd-table .lsd-web, .lsd .lsd-table .lsd-country-cell { display: block; font-size: 15px; }
	.lsd .lsd-web a { white-space: normal; overflow-wrap: anywhere; }
	.lsd .lsd-table .lsd-country-cell { color: var(--lsd-muted); margin-top: 2px; }
	.lsd .lsd-table tbody tr:hover td { background: transparent; }

	.lsd-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 16px 24px; }
	.lsd .lsd-stat b { font-size: 28px; }
	.lsd .lsd-stat .lsd-label { letter-spacing: .1em; font-size: 11px; }
	.lsd-ghost-row { grid-template-columns: 1fr; gap: 10px; }
	.lsd-locked { min-height: 520px; }
	.lsd-cta { padding: 32px 20px; }
	.lsd .lsd-cta .lsd-cta-title { font-size: 21px; }
	.lsd .lsd-cta .lsd-cta-text { font-size: 16px; }
	.lsd .lsd-btn { display: flex; width: 100%; padding: 16px 20px; }
}
