/*
 * iCamBody Screw Finder - front-end styles.
 *
 * Ported verbatim (design-wise) from icambody-screw-finder-simplified.html.
 * Every selector is prefixed with `.isf-` so the plugin does not collide
 * with theme styles (generic names like `.container`, `.hero`, `.card`,
 * `.section`, `.field`, `.set` would otherwise inherit theme rules).
 * Site chrome (utility bar, masthead, footer) lives in the host theme and
 * is intentionally NOT shipped by the plugin.
 */

.isf-root,
.isf-hero,
.isf-section {
	--isf-navy: #0f3c66;
	--isf-navy-ink: #102a43;
	--isf-blue-logo: #1c4f7c;
	--isf-red: #c8102e;
	--isf-red-dark: #a50d24;
	--isf-steel: #7fa0bd;
	--isf-ink: #3a3f45;
	--isf-ink-soft: #6b7480;
	--isf-band: #f2f4f6;
	--isf-line: #e2e6ea;
	--isf-paper: #ffffff;
	--isf-shadow: 0 1px 2px rgba(16, 42, 67, .05), 0 10px 30px rgba(16, 42, 67, .07);
	font-family: "Poppins", system-ui, sans-serif;
	color: var(--isf-ink);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.isf-hero *,
.isf-section *,
.isf-section *::before,
.isf-section *::after {
	box-sizing: border-box;
}

/* ---- hero strip ---- */
.isf-hero {
	background: linear-gradient(180deg, var(--isf-navy-ink), var(--isf-navy));
	color: #fff;
	padding: clamp(40px, 7vw, 72px) clamp(16px, 4vw, 48px);
	text-align: center;
}
.isf-hero h1 {
	font-weight: 700;
	font-size: clamp(24px, 3.4vw, 36px);
	line-height: 1.15;
	margin: 0 auto;
	letter-spacing: .01em;
	max-width: 30ch;
	color: #fff;
}

/* ---- finder section ---- */
.isf-section {
	background: var(--isf-band);
	padding: clamp(34px, 5vw, 60px) clamp(16px, 4vw, 48px);
}
.isf-container {
	max-width: 1040px;
	margin: 0 auto;
}

.isf-panel {
	background: var(--isf-paper);
	border: 1px solid var(--isf-line);
	border-radius: 8px;
	box-shadow: var(--isf-shadow);
	overflow: hidden;
}
.isf-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 18px 24px;
	background: var(--isf-navy);
	color: #fff;
}
.isf-panel-head h2 {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .02em;
	margin: 0;
	color: #fff;
}
.isf-progress {
	display: flex;
	gap: 6px;
	align-items: center;
}
.isf-progress .isf-seg {
	width: 32px;
	height: 5px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .22);
	transition: background .3s;
}
.isf-progress .isf-seg.is-on {
	background: var(--isf-red);
}
.isf-progress .isf-count {
	font-size: 12px;
	color: #cdd9e6;
	margin-left: 8px;
	font-weight: 500;
}

.isf-selectors {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}
.isf-field {
	padding: 20px 22px;
	border-right: 1px solid var(--isf-line);
}
.isf-field:last-child {
	border-right: none;
}
.isf-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--isf-navy-ink);
	margin: 6px 0 10px;
}
.isf-selwrap {
	position: relative;
}
.isf-selwrap select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--isf-navy-ink);
	background: var(--isf-paper);
	border: 1.5px solid var(--isf-line);
	border-radius: 4px;
	padding: 11px 36px 11px 13px;
	cursor: pointer;
	transition: border-color .18s, box-shadow .18s, background .18s;
}
.isf-selwrap select:hover:not(:disabled) {
	border-color: var(--isf-navy);
}
.isf-selwrap select:focus-visible {
	outline: none;
	border-color: var(--isf-navy);
	box-shadow: 0 0 0 3px rgba(15, 60, 102, .18);
}
.isf-selwrap select:disabled {
	background: #f6f7f9;
	color: #a7b0ba;
	cursor: not-allowed;
	border-style: dashed;
}
.isf-selwrap::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--isf-navy);
	border-bottom: 2px solid var(--isf-navy);
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}
.isf-field.is-set select {
	border-color: var(--isf-navy);
	background: #f4f8fc;
}

.isf-result {
	padding: 26px 24px;
	border-top: 1px solid var(--isf-line);
}
.isf-placeholder {
	text-align: center;
	color: var(--isf-ink-soft);
	font-size: 15px;
	padding: 14px 0;
}
.isf-placeholder strong {
	color: var(--isf-navy-ink);
	font-weight: 600;
}

/* locked spec plate */
.isf-plate {
	border: 1px solid var(--isf-line);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(16, 42, 67, .1);
}
.isf-plate-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 13px 20px;
	background: var(--isf-navy);
	color: #fff;
	border-bottom: 3px solid var(--isf-red);
}
.isf-plate-top .isf-ttl {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #fff;
}
.isf-plate-top .isf-right {
	font-size: 13px;
	color: #cdd9e6;
	display: flex;
	align-items: center;
	gap: 10px;
}
.isf-chip {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--isf-red);
	color: #fff;
}
.isf-chip.isf-chip-icam {
	background: var(--isf-steel);
	color: var(--isf-navy-ink);
}
.isf-plate-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding: 24px 20px;
	background: var(--isf-paper);
}
.isf-partno {
	font-family: "IBM Plex Mono", monospace;
	font-weight: 600;
	font-size: clamp(25px, 5vw, 40px);
	letter-spacing: .03em;
	color: var(--isf-navy-ink);
	line-height: 1;
}
.isf-partno .isf-pre {
	color: var(--isf-navy);
}
.isf-copybtn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--isf-red);
	border: none;
	border-radius: 4px;
	padding: 12px 18px;
	cursor: pointer;
	transition: background .15s, transform .12s;
}
.isf-copybtn:hover {
	background: var(--isf-red-dark);
}
.isf-copybtn:active {
	transform: scale(.97);
}
.isf-copybtn.is-copied {
	background: var(--isf-navy);
}
.isf-plate-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.isf-btn-purchase {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--isf-navy);
	border: none;
	border-radius: 4px;
	padding: 12px 18px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	transition: filter .15s, transform .12s;
}
.isf-btn-purchase:hover {
	filter: brightness(1.12);
	color: #fff;
	text-decoration: none;
}
.isf-btn-purchase:active {
	transform: scale(.97);
}
.isf-plate-foot {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1px;
	background: var(--isf-line);
	border-top: 1px solid var(--isf-line);
}
.isf-spec {
	background: var(--isf-paper);
	padding: 13px 18px;
}
.isf-spec .isf-k {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--isf-ink-soft);
}
.isf-spec .isf-v {
	font-size: 14px;
	font-weight: 500;
	color: var(--isf-navy-ink);
	margin-top: 3px;
}

/* candidate cards */
.isf-narrowing .isf-hd {
	font-size: 14px;
	color: var(--isf-ink-soft);
	margin: 0 0 16px;
}
.isf-narrowing .isf-hd b {
	color: var(--isf-navy-ink);
	font-weight: 600;
}
.isf-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 12px;
}
.isf-card {
	text-align: left;
	width: 100%;
	cursor: pointer;
	border: 1.5px solid var(--isf-line);
	border-radius: 8px;
	background: var(--isf-paper);
	padding: 15px;
	transition: border-color .15s, box-shadow .15s, transform .12s;
	font-family: inherit;
	color: inherit;
}
.isf-card:hover {
	border-color: var(--isf-navy);
	box-shadow: 0 6px 18px rgba(16, 42, 67, .08);
	background: var(--isf-paper);
}
.isf-card:active {
	transform: translateY(1px);
}
.isf-card:focus-visible {
	outline: none;
	border-color: var(--isf-navy);
	box-shadow: 0 0 0 3px rgba(15, 60, 102, .18);
}
.isf-card .isf-cp {
	font-family: "IBM Plex Mono", monospace;
	font-weight: 600;
	font-size: 15px;
	color: var(--isf-navy-ink);
}
.isf-card .isf-cmeta {
	font-size: 12.5px;
	color: var(--isf-ink-soft);
	margin-top: 7px;
	line-height: 1.5;
}
.isf-card .isf-cbody {
	display: inline-block;
	margin-top: 9px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--isf-navy);
}

.isf-reset {
	margin-top: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--isf-navy);
	background: var(--isf-paper);
	border: 1.5px solid var(--isf-navy);
	border-radius: 4px;
	padding: 10px 18px;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.isf-reset:hover {
	background: var(--isf-navy);
	color: #fff;
}
.isf-reset[hidden] {
	display: none;
}

.isf-spacer {
	height: 48px;
}

/*
 * Theme-override block.
 *
 * Goal: make our buttons immune to host-theme button styling without
 * accidentally beating our own class rules above. We boost specificity by
 * scoping to the parent containers (.isf-plate-actions, .isf-cards) so the
 * effective selector is two classes deep, which wins against any single-
 * class theme rule AND against tag-selector resets (e.g. `.entry-content
 * button { ... }`). Color values are explicit (not `revert`) so we don't
 * inherit user-agent defaults.
 */
.isf-plate-actions .isf-copybtn,
.isf-plate-actions .isf-copybtn:hover,
.isf-plate-actions .isf-copybtn:focus,
.isf-plate-actions .isf-copybtn:active {
	background: var(--isf-red);
	color: #fff;
	border: none;
}
.isf-plate-actions .isf-copybtn:hover,
.isf-plate-actions .isf-copybtn:focus {
	background: var(--isf-red-dark);
	color: #fff;
}
.isf-plate-actions .isf-copybtn.is-copied,
.isf-plate-actions .isf-copybtn.is-copied:hover,
.isf-plate-actions .isf-copybtn.is-copied:focus {
	background: var(--isf-navy);
	color: #fff;
}
.isf-plate-actions .isf-btn-purchase,
.isf-plate-actions .isf-btn-purchase:hover,
.isf-plate-actions .isf-btn-purchase:focus,
.isf-plate-actions .isf-btn-purchase:active {
	background: var(--isf-navy);
	color: #fff;
	border: none;
	text-decoration: none;
}
.isf-cards .isf-card,
.isf-cards .isf-card:hover,
.isf-cards .isf-card:focus {
	color: inherit;
	background: var(--isf-paper);
}
.isf-container .isf-reset,
.isf-container .isf-reset:focus {
	background: var(--isf-paper);
	color: var(--isf-navy);
	border: 1.5px solid var(--isf-navy);
}
.isf-container .isf-reset:hover {
	background: var(--isf-navy);
	color: #fff;
}

@media (max-width: 760px) {
	.isf-selectors {
		grid-template-columns: 1fr;
	}
	.isf-field {
		border-right: none;
		border-bottom: 1px solid var(--isf-line);
	}
	.isf-field:last-child {
		border-bottom: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.isf-hero *,
	.isf-section * {
		transition: none !important;
		animation: none !important;
	}
}

.isf-fade-in {
	animation: isf-fade .35s ease;
}
@keyframes isf-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}
