/* Book-listing wizard: additive styles only.
   Nothing here overrides existing .wcfm* / Metabook-style classes -
   it only styles the handful of elements added for wiring (progress
   bar, error text, chosen-category pill, rotated-photo placeholder). */

.wcfm-book-progress {
	display: flex;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	gap: 4px;
}

.wcfm-book-progress li {
	flex: 1;
	text-align: center;
	font-size: 12px;
	color: #9a9a9a;
	position: relative;
	padding-top: 28px;
}

.wcfm-book-progress li span {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 20px;
	line-height: 20px;
	border-radius: 50%;
	background: #e5e5e5;
	color: #777;
	font-weight: 600;
}

.wcfm-book-progress li.active {
	color: #e91e63;
	font-weight: 600;
}

.wcfm-book-progress li.active span,
.wcfm-book-progress li.done span {
	background: #e91e63;
	color: #fff;
}

.wcfm-step-error {
	color: #d0021b;
	font-size: 13px;
	margin: 4px 0 0;
}

.wcfm-field-note {
	font-size: 12px;
	color: #888;
	margin-top: 4px;
}

/* ------------------------------------------------------------------
 * Step 4 "Choose a category" modal.
 * The markup only toggles a bare ".active" class - it had NO positioning
 * of its own before, so it just rendered in normal document flow whatever
 * the surrounding layout happened to be (hence showing up off to one side
 * instead of centered). This makes it a proper centered overlay modal,
 * matching the reference MetaBook popup.
 * ------------------------------------------------------------------ */

body.hiddenbg {
	overflow: hidden;
}

.customodal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .5);
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.customodal.active {
	display: flex;
}

.customodal .modalcontentbox {
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 480px;
	max-height: 85vh;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	overflow: hidden;
}

.customodal .mainform-body {
	display: flex;
	flex-direction: column;
	max-height: 85vh;
}

.customodal .modalheader {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid #eee;
	flex: 0 0 auto;
}

.customodal .modalheader h4 {
	margin: 0;
	font-size: 18px;
}

.customodal .closemempopup {
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 13px;
	cursor: pointer;
}

.customodal .dropcatmenu {
	display: none;
	padding: 14px 20px 0;
	flex: 0 0 auto;
}

.customodal .dropcatmenu.active {
	display: block;
}

.customodal .backnav {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: #111;
	font-weight: 600;
}

.customodal .searhcategory_row {
	padding: 14px 20px 20px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.customodal .searchbox .form-control {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	margin-bottom: 10px;
	box-sizing: border-box;
}

.customodal .categorynavrow ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* .customodal .categorynavrow li {
	border-bottom: 1px solid #f0f0f0;
} */

.customodal .categorynavrow li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 4px;
	text-decoration: none;
	color: #222;
	font-size: 14px;
}

.customodal .categorynavrow li a:hover {
	color: #e91e63;
}

.customodal .categorynavrow li a .cat-chevron {
	flex: 0 0 auto;
	opacity: .45;
}

.customodal .dropcatlist,
.customodal .dropcatsublist {
	display: none;
}

/* ------------------------------------------------------------------
 * Step 4 "Categories" list: several categories can now be chosen (like
 * the reference MetaBook UI), each shown as its own full-breadcrumb row
 * with a "- Removal" link. Replaces the old single chosen-cat-pill.
 * ------------------------------------------------------------------ */

#wcfm_chosen_categories {
	margin: 8px 0 12px;
}

#wcfm_chosen_categories .wcfm-cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 10px;
	font-size: 14px;
}

#wcfm_chosen_categories .wcfm-cat-row-path {
	color: #333;
}

#wcfm_chosen_categories .cat-remove {
	color: #e91e63;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

#wcfm_chosen_categories .cat-remove:hover {
	text-decoration: underline;
}

.imgfileup.wcfm-rotated-90 {
	transform: rotate(90deg);
}

.wcfm-barcode-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #fff;
	flex-direction: column;
}

.wcfm-barcode-modal.active {
	display: flex;
}

.wcfm-barcode-modal-header {
	padding: 14px 20px;
	flex: 0 0 auto;
}

.wcfm-barcode-close {
	background: none;
	border: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	color: #111;
}

.wcfm-barcode-video-wrap {
	position: relative;
	flex: 1 1 auto;
	margin: 0 20px 20px;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
	background: #000;
}

#wcfm_barcode_video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wcfm-barcode-status-pill {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translate(-50%, 50%);
	background: #fff;
	border-radius: 4px;
	padding: 8px 20px;
	font-size: 13px;
	font-weight: 600;
	color: #111;
	box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
	white-space: nowrap;
}
.wcfm-emoji {
	display: inline-block;
	font-style: normal;
	margin-right: 2px;
}

/* Market Info box (requirement 3): sits under the selected-book card in the
   step 4 sidebar, filled in by JS once a book is picked. */
.wcfm-market-info {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #eee;
}

.wcfm-market-info h5 {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #888;
}

.wcfm-market-info ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcfm-market-info li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px 0;
	font-size: 13px;
}

.wcfm-market-info li span {
	color: #666;
}

.wcfm-market-info li strong {
	color: #111;
}

/* Success popup (requirement 6) */
.wcfm-success-popup {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100001;
	background: rgba(0, 0, 0, .5);
	align-items: center;
	justify-content: center;
}

.wcfm-success-popup.active {
	display: flex;
}

.wcfm-success-popup-box {
	position: relative;
	background: #fff;
	border-radius: 8px;
	max-width: 420px;
	width: calc(100% - 40px);
	padding: 32px 28px 28px;
	text-align: center;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}

.wcfm-success-popup-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #999;
}

.wcfm-success-popup-close:hover {
	color: #111;
}

.wcfm-success-popup-icon {
	font-size: 40px;
	margin-bottom: 8px;
}

.wcfm-success-popup-box h3 {
	margin: 0 0 20px;
	font-size: 18px;
}

.wcfm-success-popup-share {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}

.wcfm-success-popup-share input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	color: #444;
	background: #fafafa;
}

.wcfm-success-popup-share button {
	flex: 0 0 auto;
	padding: 8px 14px;
	border: 0;
	border-radius: 4px;
	background: #e91e63;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.wcfm-success-popup-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}

.wcfm-success-popup-actions .wcfm-btn-secondary,
.wcfm-success-popup-actions .wcfm-btn-primary {
	padding: 9px 18px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.wcfm-success-popup-actions .wcfm-btn-secondary {
	background: #f2f2f2;
	border: 1px solid #ddd;
	color: #444;
}

.wcfm-success-popup-actions .wcfm-btn-primary {
	background: #e91e63;
	border: 1px solid #e91e63;
	color: #fff;
}
