/* Site Staging Area — manager-only feature, kept in its own stylesheet.
   Reuses the color tokens (--mp-black, --mp-border, --mp-bg, --mp-text,
   --mp-muted) defined on .fms-mp in fms_marketplace.css so it stays visually
   consistent with the rest of the marketplace without duplicating them. */

.fms-stage-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	background: #ffffff;
	border: 1px solid var(--mp-border);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.fms-stage-filter {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	flex: 1 1 200px;
	min-width: 180px;
}

.fms-stage-filter label {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--mp-muted);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.fms-stage-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.fms-stage-card {
	background: #ffffff;
	border: 1px solid var(--mp-border);
	border-radius: 10px;
	padding: 1.1rem 1.25rem;
}

.fms-stage-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.9rem;
}

.fms-stage-card-head-left {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.fms-stage-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0;
}

.fms-stage-cp {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fms-stage-cp-pill {
	display: inline-flex;
	align-items: center;
	background: var(--mp-bg);
	border: 1px solid var(--mp-border);
	border-radius: 6px;
	overflow: hidden;
}

.fms-stage-cp-label {
	padding: 0.3rem 0.55rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--mp-text);
	border-right: 1px solid var(--mp-border);
}

.fms-stage-cp-step {
	width: 26px;
	height: 26px;
	border: none;
	background: transparent;
	color: var(--mp-text);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	padding: 0;
	cursor: pointer;
}

.fms-stage-cp-step:hover:not(:disabled) {
	background: rgba(0, 0, 0, 0.06);
}

.fms-stage-cp-step:disabled {
	color: var(--mp-muted);
	cursor: default;
}

.fms-stage-cp-value {
	min-width: 1.6rem;
	padding: 0 0.15rem;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--mp-text);
}

.fms-stage-cp-badge {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--mp-muted);
	white-space: nowrap;
}

.fms-stage-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	border-radius: 999px;
	padding: 0.25rem 0.8rem;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
}

.fms-stage-badge.is-published {
	background: #e6f6ec;
	color: #1b7f4b;
}

.fms-stage-badge.is-unpublished {
	background: #fdecea;
	color: #b02a37;
}

.fms-stage-card-body {
	display: grid;
	grid-template-columns: 220px 1fr 260px;
	gap: 1.25rem;
	align-items: start;
}

.fms-stage-card-image {
	position: relative;
	height: 160px;
	border-radius: 8px;
	overflow: hidden;
	background: linear-gradient(135deg, #111111, #3a3a3a);
}

.fms-stage-card-image .carousel,
.fms-stage-card-image .carousel-inner,
.fms-stage-card-image .carousel-item {
	height: 100%;
}

.fms-stage-card-image .carousel-item img {
	height: 100%;
	width: 100%;
	object-fit: cover;
}

.fms-stage-card-image .carousel-control-prev,
.fms-stage-card-image .carousel-control-next {
	width: 15%;
	opacity: 0.85;
}

.fms-stage-card-image-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	background: #fafafa;
	border: 1px dashed var(--mp-border);
	color: var(--mp-muted);
	font-size: 0.82rem;
	text-align: center;
}

.fms-stage-noimg-icon {
	font-size: 1.6rem;
	opacity: 0.55;
}

.fms-stage-card-details {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 0.75rem;
	row-gap: 0.55rem;
	margin: 0;
	font-size: 0.88rem;
}

.fms-stage-card-details dt {
	color: var(--mp-muted);
	font-weight: 500;
}

.fms-stage-card-details dd {
	margin: 0;
	font-weight: 600;
	color: var(--mp-text);
}

.fms-stage-availability {
	background: var(--mp-bg);
	border: 1px solid var(--mp-border);
	border-radius: 8px;
	padding: 0.85rem 1rem;
	height: 100%;
}

.fms-stage-availability h3 {
	font-size: 0.82rem;
	font-weight: 700;
	margin: 0 0 0.6rem;
}

.fms-stage-availability ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	font-size: 0.85rem;
}

.fms-stage-availability li {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.fms-stage-avail-icon {
	font-weight: 700;
}

.fms-stage-avail-yes .fms-stage-avail-icon {
	color: #1b7f4b;
}

.fms-stage-avail-no .fms-stage-avail-icon {
	color: #b02a37;
}

.fms-stage-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1rem;
}

.fms-stage-card-actions .btn {
	width: auto;
}

/* Destructive-leaning action; not built into the base theme's button set
   since only Staging Area needs a "red" affordance. */
.fms-stage-btn-danger {
	background: #b02a37;
	border: 1px solid #b02a37;
	color: #ffffff;
}

.fms-stage-btn-danger:hover:not(:disabled) {
	background: #8f222c;
	border-color: #8f222c;
	color: #ffffff;
}

.fms-stage-btn-danger:disabled,
.fms-stage-card-actions .btn:disabled {
	opacity: 0.5;
	cursor: default;
}

/* ---------- View Details modal ---------- */
.fms-mp-modal.fms-mp-modal-lg {
	max-width: 660px;
}

.fms-stage-details-images {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.1rem;
}

.fms-stage-details-images img {
	width: 110px;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--mp-border);
}

.fms-stage-details-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.1rem;
}

.fms-stage-details-section h4 {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--mp-muted);
	margin: 0 0 0.5rem;
}

.fms-stage-details-row {
	/* .fms-stage-card-details is a 2-column grid elsewhere on the page; here
	   each row is a single div wrapping its own dt/dd, so it must span both
	   grid tracks itself instead of being auto-placed into just one. */
	grid-column: 1 / -1;
	display: flex;
	gap: 0.35rem;
	font-size: 0.85rem;
}

.fms-stage-details-row dt {
	color: var(--mp-muted);
	min-width: 65px;
}

.fms-stage-details-row dd {
	margin: 0;
	font-weight: 600;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.fms-stage-card-body {
		grid-template-columns: 1fr;
	}

	.fms-stage-card-image {
		height: 200px;
	}

	.fms-stage-details-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.fms-stage-card-actions .btn {
		flex: 1 1 auto;
	}
}
