/* Serpent Setup Sheets – form + library styles.
   Typography and buttons deliberately inherit from the active theme
   (WooCommerce/Storefront .button classes), so everything matches the site.
   --serpent-accent is only used for small decorative touches. */

.serpent-setup-app,
.serpent-library-list,
.serpent-library-search {
	--serpent-accent: #f7941d;
	font: inherit;
	color: inherit;
}

.serpent-setups-notice {
	padding: 1em;
	background: #f6f6f6;
	border-left: 4px solid var(--serpent-accent, #f7941d);
}

.serpent-car-picker {
	margin-bottom: 1.5em;
	max-width: 420px;
}

.serpent-pdf-import {
	margin-bottom: 1.5em;
	padding: 1em 1.25em;
	border: 2px dashed #ccc;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	max-width: 640px;
}

.serpent-import-hint {
	font-size: 0.85em;
	opacity: 0.75;
}

/* Upload-only mode: the form stays hidden; only sections/fields explicitly
   revealed (missing required details) are shown. */
.serpent-upload-only .serpent-section { display: none; }
.serpent-upload-only .serpent-section.serpent-show { display: block; }
.serpent-upload-only .serpent-section.serpent-show .serpent-field { display: none; }
.serpent-upload-only .serpent-section.serpent-show .serpent-field.serpent-show {
	display: flex;
	outline: 2px solid var(--serpent-accent, #f7941d);
	outline-offset: 4px;
	border-radius: 2px;
}

.serpent-section {
	border: 1px solid #ddd;
	border-radius: 6px;
	margin: 0 0 1.5em;
	padding: 1em 1.25em 1.25em;
}

.serpent-section legend {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0 0.5em;
	border-bottom: 3px solid var(--serpent-accent, #f7941d);
}

.serpent-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.8em 1.2em;
}

.serpent-field {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

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

.serpent-field label {
	font-size: 0.85em;
	font-weight: 600;
}

.serpent-field input[type="text"],
.serpent-field select,
.serpent-field textarea {
	width: 100%;
	box-sizing: border-box;
}

.serpent-multi {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 1em;
}

.serpent-multi label {
	font-weight: 400;
	font-size: 0.9em;
}

.serpent-submit-row {
	display: flex;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
}

/* Buttons: site orange. Change --serpent-accent below to adjust the shade. */
.serpent-setup-app .serpent-submit-btn,
.serpent-download-btn.button,
.serpent-library-search button {
	background-color: var(--serpent-accent, #f7941d) !important;
	border-color: var(--serpent-accent, #f7941d) !important;
	color: #fff !important;
	background-image: none !important;
}

.serpent-setup-app .serpent-submit-btn:hover,
.serpent-download-btn.button:hover,
.serpent-library-search button:hover {
	filter: brightness(0.92);
}

/* Flatten the theme's glossy .button styling (inset shine, text shadow,
   bold small text) so download buttons match the flat search button. */
.serpent-download-btn.button,
.serpent-setup-app .serpent-submit-btn {
	box-shadow: none !important;
	text-shadow: none !important;
	border: 0 !important;
	border-radius: 3px !important;
	font-weight: 400 !important;
	font-size: 13px !important;
	line-height: 1.6 !important;
	padding: 0.75em 1.5em !important;
}

.serpent-submit-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

#serpent-setup-status:not(:empty) {
	display: block;
	width: 100%;
	padding: 0.7em 1em;
	border-radius: 4px;
	background: #f6f6f6;
}

.serpent-status-error { color: #b0181e; font-weight: 600; border-left: 4px solid #b0181e; }
.serpent-status-success { color: #1a7a2e; font-weight: 600; border-left: 4px solid #1a7a2e; }
.serpent-status-busy { opacity: 0.85; border-left: 4px solid #999; }

/* Library: search panel */

.serpent-library-search {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1.25em 1.4em;
	margin-bottom: 1.5em;
	border-top: 4px solid var(--serpent-accent, #f7941d);
}

.serpent-search-intro {
	margin: 0 0 1em;
	font-weight: 600;
}

.serpent-search-actions {
	display: flex;
	align-items: center;
	gap: 1.25em;
	margin: 1.25em 0 0;
}

.serpent-search-reset {
	font-size: 0.9em;
}

.serpent-results-count {
	margin: 0 0 1em;
	opacity: 0.75;
}

/* Library: full-width result cards */

.serpent-library-list {
	display: flex;
	flex-direction: column;
	gap: 1.2em;
}

.serpent-library-card {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1.1em 1.3em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1em 2em;
}

.serpent-card-main {
	flex: 1 1 200px;
	display: flex;
	flex-direction: column;
	gap: 0.3em;
}

.serpent-card-chips {
	flex: 2 1 320px;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-content: center;
}

.serpent-chip {
	display: inline-flex;
	flex-direction: column;
	padding: 0.35em 0.7em;
	border: 1px solid #e3e3e3;
	border-radius: 4px;
	background: #fafafa;
	font-size: 0.85em;
	line-height: 1.35;
}

.serpent-chip em {
	font-style: normal;
	font-size: 0.78em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.6;
}

.serpent-card-action {
	flex: 0 0 auto;
	margin-left: auto;
}

.serpent-card-car {
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--serpent-accent, #f7941d);
	letter-spacing: 0.05em;
}

.serpent-library-card h3 { margin: 0; font-size: 1.15em; }
.serpent-card-track { margin: 0; }
.serpent-card-meta { margin: 0; opacity: 0.65; font-size: 0.85em; }

.serpent-download-btn {
	text-align: center;
}

@media (max-width: 600px) {
	.serpent-card-action {
		margin-left: 0;
		width: 100%;
	}
	.serpent-card-action .serpent-download-btn {
		display: block;
	}
}

/* Manuals & diagrams */

.serpent-manuals-card {
	align-items: flex-start;
}

.serpent-manuals-card .serpent-card-main {
	flex: 0 0 160px;
}

.serpent-doc-list {
	flex: 1 1 400px;
	display: flex;
	flex-direction: column;
}

.serpent-doc-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6em 1.2em;
	padding: 0.6em 0;
	border-top: 1px solid #eee;
}

.serpent-doc-row:first-child {
	border-top: 0;
	padding-top: 0;
}

.serpent-doc-label {
	flex: 1 1 200px;
	font-weight: 600;
}

.serpent-doc-row .serpent-download-btn {
	margin-left: auto;
}

@media (max-width: 600px) {
	.serpent-doc-row .serpent-download-btn {
		margin-left: 0;
		width: 100%;
		display: block;
	}
}
