/* FMS Marketplace — black-primary theme, scoped under .fms-mp */

.fms-mp {
	--mp-black: #111111;
	--mp-black-hover: #2d2d2d;
	--mp-border: #e2e2e2;
	--mp-bg: #f7f7f7;
	--mp-text: #1f1f1f;
	--mp-muted: #6c757d;
	min-height: 100vh;
	background: var(--mp-bg);
	color: var(--mp-text);
}

/* ---------- buttons ---------- */
.fms-mp .btn-dark,
.fms-mp .fms-mp-btn-primary {
	background: var(--mp-black);
	border-color: var(--mp-black);
	color: #ffffff;
}

.fms-mp .btn-dark:hover,
.fms-mp .btn-dark:focus,
.fms-mp .fms-mp-btn-primary:hover,
.fms-mp .fms-mp-btn-primary:focus {
	background: var(--mp-black-hover);
	border-color: var(--mp-black-hover);
	color: #ffffff;
}

.fms-mp .btn-outline-dark,
.fms-mp .fms-mp-btn-secondary {
	border-color: var(--mp-black);
	color: var(--mp-black);
	background: transparent;
}

.fms-mp .btn-outline-dark:hover,
.fms-mp .fms-mp-btn-secondary:hover {
	background: var(--mp-black);
	color: #ffffff;
}

/* ---------- navbar ---------- */
.fms-mp-navbar {
	background: var(--mp-black);
	color: #ffffff;
	padding: 0.65rem 0;
	position: sticky;
	top: 0;
	z-index: 1020;
}

.fms-mp-brand {
	color: #ffffff;
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.02em;
	text-decoration: none;
}

.fms-mp-brand span {
	font-weight: 300;
}

.fms-mp-brand:hover {
	color: #ffffff;
	text-decoration: none;
	opacity: 0.85;
}

.fms-mp-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.fms-mp-tab {
	background: transparent;
	border: 0;
	color: #c9c9c9;
	padding: 0.4rem 0.85rem;
	border-radius: 4px;
	font-size: 0.9rem;
	cursor: pointer;
}

.fms-mp-tab:hover {
	color: #ffffff;
}

.fms-mp-tab.active {
	background: #ffffff;
	color: var(--mp-black);
	font-weight: 600;
}

.fms-mp-navbar-right {
	gap: 0.75rem;
}

.fms-mp-balance {
	background: #ffffff1a;
	border: 1px solid #ffffff40;
	color: #ffffff;
	border-radius: 999px;
	padding: 0.25rem 0.9rem;
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
}

.fms-mp-user {
	position: relative;
}

.fms-mp-user-btn {
	background: transparent;
	border: 0;
	color: #ffffff;
	cursor: pointer;
	padding: 0.35rem 0.5rem;
	font-size: 0.9rem;
}

.fms-mp-caret {
	font-size: 0.7rem;
}

.fms-mp-user-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	background: #ffffff;
	border: 1px solid var(--mp-border);
	border-radius: 6px;
	min-width: 200px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

.fms-mp-user-menu-header {
	padding: 0.6rem 0.9rem;
	font-size: 0.8rem;
	color: var(--mp-muted);
	border-bottom: 1px solid var(--mp-border);
	word-break: break-all;
}

.fms-mp-user-menu-item {
	display: block;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	padding: 0.55rem 0.9rem;
	color: var(--mp-text);
	font-size: 0.9rem;
	cursor: pointer;
	text-decoration: none;
}

.fms-mp-user-menu-item:hover {
	background: var(--mp-bg);
	color: var(--mp-black);
	text-decoration: none;
}

/* ---------- layout ---------- */
.fms-mp-main {
	padding: 1.5rem 15px 4rem;
}

.fms-mp-section-head {
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.fms-mp-heading {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0;
}

.fms-mp-subheading {
	font-size: 1.1rem;
	font-weight: 600;
}

.fms-mp-muted {
	color: var(--mp-muted);
	font-size: 0.9rem;
}

.fms-mp-search {
	flex: 1 1 260px;
	max-width: 420px;
}

.fms-mp-substatus {
	margin-bottom: 1rem;
}

.fms-mp-substatus .alert {
	margin-bottom: 0;
}

/* ---------- card grid (Amazon-like) ---------- */
.fms-mp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1rem;
}

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

.fms-mp-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.fms-mp-card-img {
	position: relative;
	height: 140px;
	background: linear-gradient(135deg, #111111, #3a3a3a);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff80;
	font-size: 2rem;
	overflow: hidden;
}

.fms-mp-card-unavailable {
	opacity: 0.75;
}

.fms-mp-sold-flag {
	position: absolute;
	top: 10px;
	right: -30px;
	transform: rotate(45deg);
	background: var(--mp-black);
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.2rem 2.2rem;
}

.fms-mp-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	max-width: 100%;
}

/* Bootstrap carousel fills the fixed-height card image slot; object-fit
   keeps varying image sizes from changing the card's footprint. */
.fms-mp-card-img .carousel,
.fms-mp-card-img .carousel-inner,
.fms-mp-card-img .carousel-item {
	height: 100%;
}

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

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

.fms-mp-card-img .carousel-control-prev-icon,
.fms-mp-card-img .carousel-control-next-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.fms-mp-card-body {
	padding: 0.85rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.35rem;
}

.fms-mp-card-title {
	font-weight: 600;
	font-size: 1rem;
	margin: 0;
}

.fms-mp-card-meta {
	color: var(--mp-muted);
	font-size: 0.82rem;
}

.fms-mp-card-desc {
	color: var(--mp-muted);
	font-size: 0.82rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fms-mp-card-price {
	font-weight: 700;
	font-size: 1.05rem;
	margin-top: auto;
}

.fms-mp-card-price small {
	color: var(--mp-muted);
	font-weight: 400;
}

.fms-mp-card .btn {
	width: 100%;
}

/* ---------- blurred sensitive fields (Buy Sites listing) ---------- */
/* Purely a display mask: the real value is still in the DOM (so the search
   box, which filters server-side, is unaffected) — this just keeps an
   unpurchased site's exact name/address from being read off the card. */
.fms-mp-blur {
	filter: blur(5px);
	user-select: none;
}

/* ---------- My Sites: click the image to view details ---------- */
.fms-mp-card-img-clickable {
	cursor: pointer;
	position: relative;
}

.fms-mp-card-img-clickable::after {
	content: "View Details";
	position: absolute;
	inset: auto 0 0 0;
	background: rgba(17, 17, 17, 0.75);
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 600;
	text-align: center;
	padding: 0.35rem 0;
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.fms-mp-card-img-clickable:hover::after,
.fms-mp-card-img-clickable:focus::after {
	opacity: 1;
}

.fms-mp-badge {
	display: inline-block;
	background: var(--mp-bg);
	border: 1px solid var(--mp-border);
	border-radius: 999px;
	padding: 0.1rem 0.6rem;
	font-size: 0.72rem;
	color: var(--mp-muted);
	width: fit-content;
}

/* ---------- table ---------- */
.fms-mp-table {
	background: #ffffff;
	border: 1px solid var(--mp-border);
	font-size: 0.88rem;
}

.fms-mp-table thead th {
	background: var(--mp-black);
	color: #ffffff;
	border: 0;
	white-space: nowrap;
}

.fms-mp-credit {
	color: #1b7f4b;
	font-weight: 600;
}

.fms-mp-debit {
	color: #b02a37;
	font-weight: 600;
}

/* ---------- empty state ---------- */
.fms-mp-empty {
	text-align: center;
	color: var(--mp-muted);
	padding: 3rem 1rem;
	background: #ffffff;
	border: 1px dashed var(--mp-border);
	border-radius: 8px;
}

/* ---------- modal ---------- */
.fms-mp-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1050;
	padding: 1rem;
}

.fms-mp-modal {
	width: 100%;
	max-width: 430px;
	border: 0;
	border-radius: 10px;
}

.fms-mp-modal-title {
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.fms-mp-modal-body {
	color: var(--mp-muted);
	font-size: 0.92rem;
	margin-bottom: 1.25rem;
}

.fms-mp-modal-actions {
	gap: 0.5rem;
}

/* ---------- My Site details popup content ---------- */
.fms-mp-details-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.fms-mp-copy-all {
	white-space: nowrap;
}

.fms-mp-details-section {
	margin-bottom: 1rem;
}

.fms-mp-details-section h4 {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mp-muted);
	margin-bottom: 0.35rem;
}

.fms-mp-detail-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--mp-border);
	font-size: 0.9rem;
}

.fms-mp-detail-row:last-child {
	border-bottom: 0;
}

.fms-mp-detail-label {
	flex: 0 0 90px;
	color: var(--mp-muted);
	font-weight: 600;
}

.fms-mp-detail-value {
	flex: 1;
	color: var(--mp-text);
	word-break: break-word;
}

.fms-mp-copy-inline {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 0.85rem;
	padding: 0.1rem 0.35rem;
	line-height: 1;
	color: var(--mp-muted);
	vertical-align: middle;
}

.fms-mp-copy-inline:hover {
	color: var(--mp-black);
}

/* ---------- pagination ---------- */
.fms-mp-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 1.5rem 0 0.5rem;
}

.fms-mp-page-btn {
	background: #ffffff;
	border: 1px solid var(--mp-border);
	border-radius: 6px;
	color: var(--mp-text);
	font-size: 0.85rem;
	padding: 0.35rem 0.75rem;
	cursor: pointer;
	min-width: 2.3rem;
}

.fms-mp-page-btn:hover:not(:disabled) {
	border-color: var(--mp-black);
	color: var(--mp-black);
}

.fms-mp-page-btn.active {
	background: var(--mp-black);
	border-color: var(--mp-black);
	color: #ffffff;
	font-weight: 600;
}

.fms-mp-page-btn:disabled:not(.active) {
	opacity: 0.45;
	cursor: default;
}

.fms-mp-page-ellipsis {
	color: var(--mp-muted);
	padding: 0 0.2rem;
}

/* ---------- toasts ---------- */
.fms-mp-toasts {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	z-index: 1060;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: 340px;
}

.fms-mp-toast {
	background: var(--mp-black);
	color: #ffffff;
	border-radius: 6px;
	padding: 0.7rem 1rem;
	font-size: 0.88rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	animation: fms-mp-toast-in 0.2s ease;
}

.fms-mp-toast.error {
	background: #b02a37;
}

@keyframes fms-mp-toast-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- login page ---------- */
.fms-mp-login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.fms-mp-login-card {
	width: 100%;
	max-width: 400px;
	border: 1px solid var(--mp-border);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.fms-mp-login-card .fms-mp-brand {
	color: var(--mp-black);
	font-size: 1.35rem;
}

.fms-mp-login-hint {
	font-size: 0.8rem;
}

/* ---------- responsive ---------- */
@media (max-width: 767px) {
	.fms-mp-navbar .container {
		gap: 0.5rem;
	}

	.fms-mp-tabs {
		order: 3;
		width: 100%;
		justify-content: space-between;
	}

	.fms-mp-tab {
		flex: 1;
		text-align: center;
		padding: 0.4rem 0.3rem;
	}

	.fms-mp-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}

	.fms-mp-search {
		max-width: 100%;
	}
}
