.fbc-catalogue,
.fbc-scanner-wrap {
	font-family: Montserrat, Arial, sans-serif;
	--fbc-accent: #7A63FF;
	--fbc-bg: #1E1E1E;
	--fbc-border: #6a6a6a;
	max-width: 1000px;
	margin: 0 auto;
	font-family: inherit;
}

.fbc-login-notice,
.fbc-notice {
	background: #fff8e5;
	border: 1px solid #e0c987;
	padding: 12px 16px;
	border-radius: 6px;
}

/* Filters */
.fbc-filters {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
}

.fbc-filters-left {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	flex-shrink: 0;
	margin-right: 14px;
}

.fbc-filters-right {
	flex: 0 0 auto;
	display: flex;
	justify-content: flex-end;
	min-width: 0;
}

.fbc-select,
.fbc-search-input {
	background-color: var(--fbc-bg);
	color: #f2f2f2;
	border: 1px solid var(--fbc-border);
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 13px;
	line-height: 1.3;
}

.fbc-select {
	min-width: 90px;
	max-width: 150px;
	cursor: pointer;
	flex-shrink: 0;
}

.fbc-search-input {
	-webkit-appearance: none !important;
	appearance: none !important;
	background-color: var(--fbc-bg) !important;
	color: #f2f2f2 !important;
	border: 1px solid var(--fbc-border) !important;
	box-shadow: none !important;
	width: 150px;
	min-width: 0;
}

.fbc-search-input::placeholder {
	color: #9a9a9a;
	opacity: 1;
}

.fbc-select:focus,
.fbc-search-input:focus {
	outline: none;
	border-color: var(--fbc-accent) !important;
}

/* Some browsers inherit the select's own dark text/background into its
   dropdown list too - force a clean, readable native-style list instead. */
.fbc-select option {
	background-color: #ffffff;
	color: #1a1a1a;
}

@media ( max-width: 520px ) {
	.fbc-filters {
		flex-wrap: wrap;
	}

	.fbc-filters-right {
		flex-basis: 100%;
	}
}

/* Grid */
.fbc-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
	gap: 20px !important;
}

.fbc-grid p {
	margin: 0;
	display: contents;
}

.fbc-card {
	background: var(--fbc-bg);
	border: 1px solid var(--fbc-border);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.fbc-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.fbc-card-link {
	color: inherit;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.fbc-card-link:hover .fbc-card-title {
	text-decoration: underline;
}

.fbc-card-cover img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
}

.fbc-card-cover {
	position: relative;
}

.fbc-series-count {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: var(--fbc-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 10px;
}

.fbc-card-cover-placeholder {
	width: 100%;
	height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	background: #555555;
}

.fbc-card-body {
	padding: 10px 12px;
	flex: 1;
	color: #f2f2f2;
}

.fbc-card-title {
	font-size: 15px;
	margin: 0 0 4px;
	line-height: 1.3;
	color: #ffffff;
}

.fbc-card-author,
.fbc-card-publisher {
	font-size: 13px;
	color: #cfcfcf;
	margin: 0 0 6px;
}

.fbc-card-owners {
	margin: 0 0 6px;
}

.fbc-badge {
	display: inline-block;
	background: var(--fbc-accent);
	color: #fff;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 12px;
	margin-right: 4px;
	margin-bottom: 4px;
}

/* Scanner form */
.fbc-scan-controls {
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

#fbc-video-wrap {
	margin-bottom: 16px;
}

#fbc-video {
	width: 100%;
	max-width: 480px;
	border-radius: 8px;
	border: 1px solid var(--fbc-border);
	display: block;
	margin-bottom: 8px;
}

.fbc-form p {
	margin-bottom: 12px;
}

.fbc-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.fbc-form input[type="text"],
.fbc-form input[type="number"],
.fbc-form select,
.fbc-form textarea {
	width: 100%;
	max-width: 480px;
	padding: 8px 10px;
	border: 1px solid var(--fbc-border);
	border-radius: 6px;
	box-sizing: border-box;
}

.fbc-checkbox-label {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	font-weight: 400 !important;
	margin-right: 14px;
	margin-bottom: 4px;
}

.fbc-checkbox-label input[type="checkbox"] {
	width: auto;
}

/* Lookup preview (shared by admin box and front-end form) */
.fbc-preview {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--fbc-bg);
	border: 1px solid var(--fbc-border);
	border-radius: 6px;
	padding: 10px;
	margin-bottom: 10px;
	max-width: 480px;
}

.fbc-preview img {
	width: 50px;
	height: auto;
	border-radius: 4px;
	flex-shrink: 0;
}

#fbc-save-status,
#fbc-scan-status,
#fbc-admin-apply-status {
	font-size: 13px;
	color: #2f7a3d;
}

#fbc-admin-lookup #fbc-admin-preview {
	margin: 10px 0;
}

/* Compact table view */
.fbc-table-wrap {
	overflow-x: auto;
	margin-top: 10px;
}

.fbc-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--fbc-bg);
	color: #f2f2f2;
}

/* OceanWP (and some other themes) apply default borders to any plain
   <table> used in post/page content - override that explicitly rather
   than relying on selector specificity alone. */
.fbc-table,
.fbc-table tr,
.fbc-table th,
.fbc-table td {
	border: none !important;
}

.fbc-table th {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--fbc-border) !important;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.fbc-table td {
	padding: 8px 14px;
	vertical-align: middle;
	font-size: 14px;
}

.fbc-table td a {
	color: inherit;
	text-decoration: none;
}

.fbc-table td a:hover {
	text-decoration: underline;
}

.fbc-table-row {
	cursor: pointer;
	transition: background 0.12s ease;
}

.fbc-table-row:hover {
	background: rgba(122, 99, 255, 0.12);
}

.fbc-table-cover {
	width: 42px;
	padding: 6px 8px !important;
}

.fbc-table-cover img {
	/* Matches the 325:500 cover aspect ratio at a compact size. */
	width: 42px !important;
	height: 64.6px !important;
	max-width: 42px !important;
	max-height: 64.6px !important;
	object-fit: cover !important;
	border-radius: 3px;
	display: block !important;
}

.fbc-table-cover-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 64.6px;
	background: #2a2a2a;
	border-radius: 3px;
	font-size: 16px;
}

/* Sortable column headers */
.fbc-sort-link {
	display: inline-block;
	margin-left: 4px;
	text-decoration: none;
	font-size: 11px;
}

.fbc-sort-inactive {
	color: #6a6a6a;
}

.fbc-sort-active {
	color: var(--fbc-accent);
}

/* Pagination */
.fbc-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	color: #cfcfcf;
	font-size: 14px;
}

.fbc-pagination-perpage {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fbc-pagination-perpage .fbc-select {
	min-width: 70px;
	padding: 6px 10px;
}

.fbc-pagination-info {
	white-space: nowrap;
}

.fbc-pagination-pages {
	display: flex;
	gap: 4px;
}

.fbc-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border-radius: 6px;
	color: #f2f2f2;
	text-decoration: none;
	font-size: 14px;
}

.fbc-page-btn:hover {
	background: rgba(122, 99, 255, 0.15);
}

.fbc-page-current {
	background: var(--fbc-accent);
	color: #fff;
	font-weight: 600;
}

.fbc-page-current:hover {
	background: var(--fbc-accent);
}

.fbc-page-disabled {
	opacity: 0.35;
	pointer-events: none;
}

.fbc-view-switcher {
	display: flex;
	gap: 6px;
	margin-bottom: 20px;
}

.fbc-view-btn {
	padding: 6px 14px;
	border: 1px solid var(--fbc-border);
	border-radius: 6px;
	color: #f2f2f2;
	text-decoration: none;
	font-size: 13px;
}

.fbc-view-btn:hover {
	border-color: var(--fbc-accent);
}

.fbc-view-active {
	background: var(--fbc-accent);
	border-color: var(--fbc-accent);
	color: #fff;
	font-weight: 600;
}


/* ── Global Montserrat font for all FBC elements ── */
.fbc-catalogue,
.fbc-catalogue * {
	font-family: Montserrat, Arial, sans-serif;
}
.fbc-select,
.fbc-search-input,
.fbc-view-btn,
.fbc-clear-btn,
.fbc-page-btn,
.fbc-sort-link,
.fbc-table th,
.fbc-table td,
.fbc-card-title,
.fbc-card-author,
.fbc-card-meta,
.fbc-results-summary,
.fbc-filter-summary {
	font-family: Montserrat, Arial, sans-serif;
}
.fbc-select,
.fbc-search-input { font-size: 13px; }
.fbc-view-btn,
.fbc-clear-btn    { font-size: 13px; font-weight: 600; }
.fbc-table th     { font-size: 13px; font-weight: 700; }
.fbc-table td     { font-size: 14px; }
.fbc-card-title   { font-size: 15px; font-weight: 700; }
.fbc-page-btn     { font-size: 13px; }
/* Hide standalone view switcher outside toolbar (duplicate prevention) */
.fbc-catalogue > .fbc-view-switcher,
.fbc-catalogue > .fbc-toolbar > .fbc-view-switcher {
	display: none !important;
}

/* ── Toolbar wrapper (v3.2.0 — matches MVA/BC pattern) ── */
.fbc-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

/* Move filters inside toolbar — remove its own bottom margin */
.fbc-toolbar .fbc-filters {
	margin-bottom: 0;
	flex: 1;
}

/* View switcher inside toolbar */
.fbc-toolbar .fbc-view-switcher {
	margin-bottom: 0;
}

/* Icon buttons matching MVA/BC */
.fbc-view-btn {
	transition: border-color 0.15s ease, color 0.15s ease;
}
.fbc-view-btn:hover {
	color: var(--fbc-accent);
}

/* ── Toolbar row layout (v3.3.0 — filters flex left, actions anchored right) ── */
.fbc-toolbar-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.fbc-toolbar .fbc-filters {
	flex: 1 1 auto;
	min-width: 0;
	margin-bottom: 0;
}
.fbc-toolbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	margin-left: auto;
}
.fbc-toolbar .fbc-view-switcher {
	margin-bottom: 0;
}
@media ( max-width: 700px ) {
	.fbc-toolbar-actions {
		margin-left: 0;
		width: 100%;
		justify-content: flex-start;
	}
}
