/**
 * BoxOfficeHero Marketplace Price Comparison & Live Seat Inventory Hub
 * Container-aware responsive layout with zero right-edge button overlap.
 */

.boh-mkt-hub {
	container: mkt-hub / inline-size;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
	margin: 24px 0;
	overflow: hidden;
	color: #0f172a;
	box-sizing: border-box;
}

.boh-mkt-hub *,
.boh-mkt-hub *::before,
.boh-mkt-hub *::after {
	box-sizing: border-box;
}

/* Header Bar */
.boh-mkt-header {
	background: linear-gradient(135deg, #141923 0%, #1e2533 100%);
	color: #ffffff;
	padding: 16px 20px;
	border-bottom: 2px solid #f39c12;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
}

.boh-mkt-header-main {
	min-width: 0;
	flex: 1 1 260px;
}

.boh-mkt-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fbbf24;
	margin-bottom: 4px;
}

.boh-mkt-title {
	font-size: 1.12rem;
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 2px 0;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.boh-mkt-subtitle {
	font-size: 0.82rem;
	color: #cbd5e1;
	margin: 0;
	line-height: 1.4;
}

.boh-mkt-location-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #f8fafc;
	font-size: 0.76rem;
	font-weight: 600;
	padding: 5px 11px;
	border-radius: 999px;
	max-width: 100%;
	white-space: normal;
}

/* Summary Strip: Low / Median + Available Seat / High */
.boh-mkt-summary {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 16px 20px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.boh-mkt-stat {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 14px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.boh-mkt-stat--featured {
	background: #f0fdf4;
	border: 1.5px solid #16a34a;
}

.boh-mkt-stat-label {
	font-size: 0.71rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #475569;
	margin-bottom: 4px;
}

.boh-mkt-stat--featured .boh-mkt-stat-label {
	color: #15803d;
}

.boh-mkt-stat-value-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	min-width: 0;
}

.boh-mkt-stat-value {
	font-size: 1.32rem;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.15;
}

.boh-mkt-stat--featured .boh-mkt-stat-value {
	color: #14532d;
}

.boh-mkt-stat-unit {
	font-size: 0.76rem;
	font-weight: 600;
	color: #64748b;
}

.boh-mkt-stat-meta {
	font-size: 0.79rem;
	color: #334155;
	margin-top: 5px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.boh-mkt-live-seat-link {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin-top: 6px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #15803d;
	text-decoration: none;
}

.boh-mkt-live-seat-link:hover {
	color: #166534;
	text-decoration: underline;
}

/* Column Header Strip (Wide Viewports Only) */
.boh-mkt-col-headers {
	display: none;
	padding: 9px 20px;
	background: #f1f5f9;
	border-bottom: 1px solid #e2e8f0;
	font-size: 0.71rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #475569;
}

.boh-mkt-col-headers > div:last-child {
	text-align: right;
}

/* Vendor Comparison List */
.boh-mkt-list {
	display: flex;
	flex-direction: column;
}

.boh-mkt-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	padding: 14px 20px;
	border-bottom: 1px solid #e2e8f0;
	background: #ffffff;
	min-width: 0;
	transition: background-color 0.15s ease;
}

.boh-mkt-row:last-child {
	border-bottom: none;
}

.boh-mkt-row:hover {
	background: #f8fafc;
}

.boh-mkt-row--official {
	background: #f8faff;
}

.boh-mkt-row--lowest {
	background: #fcfffd;
}

.boh-mkt-row--unpriced {
	background: #fcfcfd;
}

/* Cells */
.boh-mkt-cell-vendor,
.boh-mkt-cell-range,
.boh-mkt-cell-median,
.boh-mkt-cell-action {
	min-width: 0;
}

.boh-mkt-vendor-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}

.boh-mkt-vendor-name {
	font-size: 0.98rem;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.25;
}

.boh-mkt-role-sub {
	font-size: 0.75rem;
	color: #64748b;
	margin-top: 2px;
}

/* Badges */
.boh-mkt-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.67rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1.4;
	max-width: 100%;
	white-space: normal;
}

.boh-mkt-badge--official {
	background: #dbeafe;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.boh-mkt-badge--lowest {
	background: #dcfce7;
	color: #15803d;
	border: 1px solid #86efac;
}

.boh-mkt-badge--direct {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #cbd5e1;
}

/* Range & Median Cells */
.boh-mkt-mobile-label {
	display: inline;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	margin-right: 5px;
}

.boh-mkt-range-val {
	font-size: 0.96rem;
	font-weight: 800;
	color: #0f172a;
}

.boh-mkt-row--unpriced .boh-mkt-range-val {
	font-size: 0.86rem;
	font-weight: 600;
	color: #475569;
}

.boh-mkt-pair-sub {
	font-size: 0.75rem;
	color: #475569;
	margin-top: 2px;
}

.boh-mkt-median-line {
	font-size: 0.88rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.boh-mkt-seat-pill {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
	font-size: 0.77rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 5px;
	margin-top: 3px;
	max-width: 100%;
}

.boh-mkt-status-note {
	font-size: 0.78rem;
	color: #64748b;
	line-height: 1.35;
}

/* Action Button */
.boh-mkt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 9px 14px;
	border-radius: 7px;
	font-size: 0.84rem;
	font-weight: 700;
	text-decoration: none !important;
	text-align: center;
	line-height: 1.2;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.boh-mkt-btn--primary {
	background: #c0392b;
	border-color: #a93226;
	color: #ffffff !important;
}

.boh-mkt-btn--primary:hover {
	background: #961d15;
	color: #ffffff !important;
}

.boh-mkt-btn--lowest {
	background: #15803d;
	border-color: #166534;
	color: #ffffff !important;
}

.boh-mkt-btn--lowest:hover {
	background: #166534;
	color: #ffffff !important;
}

.boh-mkt-btn--official {
	background: #1d4ed8;
	border-color: #1e40af;
	color: #ffffff !important;
}

.boh-mkt-btn--official:hover {
	background: #1e40af;
	color: #ffffff !important;
}

.boh-mkt-btn--secondary {
	background: #ffffff;
	border-color: #94a3b8;
	color: #1e293b !important;
}

.boh-mkt-btn--secondary:hover {
	background: #f1f5f9;
	border-color: #475569;
	color: #0f172a !important;
}

/* Footer Note */
.boh-mkt-footer {
	padding: 10px 20px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	font-size: 0.74rem;
	color: #64748b;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 12px;
}

/* Container Queries for Size-Aware Layout */
@container mkt-hub (min-width: 520px) {
	.boh-mkt-summary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@container mkt-hub (min-width: 500px) and (max-width: 719px) {
	.boh-mkt-row {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"vendor action"
			"range median";
		gap: 8px 14px;
		align-items: center;
	}
	.boh-mkt-cell-vendor { grid-area: vendor; }
	.boh-mkt-cell-action { grid-area: action; justify-self: end; }
	.boh-mkt-cell-range { grid-area: range; }
	.boh-mkt-cell-median { grid-area: median; }
	.boh-mkt-btn {
		width: auto;
		min-width: 132px;
	}
}

@container mkt-hub (min-width: 720px) {
	.boh-mkt-col-headers {
		display: grid;
		grid-template-columns: minmax(165px, 1.25fr) minmax(130px, 1fr) minmax(210px, 1.65fr) 142px;
		gap: 12px 16px;
		align-items: center;
	}
	.boh-mkt-row {
		display: grid;
		grid-template-columns: minmax(165px, 1.25fr) minmax(130px, 1fr) minmax(210px, 1.65fr) 142px;
		gap: 12px 16px;
		align-items: center;
	}
	.boh-mkt-mobile-label {
		display: none;
	}
	.boh-mkt-cell-action {
		justify-self: stretch;
	}
	.boh-mkt-btn {
		width: 100%;
	}
}

/* Fallback for older browsers without @container */
@supports not (container-type: inline-size) {
	@media (min-width: 768px) {
		.boh-mkt-summary {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
	}
	@media (min-width: 992px) {
		.boh-mkt-col-headers,
		.boh-mkt-row {
			display: grid;
			grid-template-columns: minmax(165px, 1.25fr) minmax(130px, 1fr) minmax(210px, 1.65fr) 142px;
			gap: 12px 16px;
			align-items: center;
		}
		.boh-mkt-mobile-label {
			display: none;
		}
	}
}

/* Single Post-FAQ Ad Container */
.boh-post-faq-ad {
	margin: 28px auto 16px auto;
	padding-top: 12px;
	border-top: 1px solid #e2e8f0;
	max-width: 100%;
	overflow: hidden;
}

.boh-post-faq-ad-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #94a3b8;
	text-align: center;
	margin-bottom: 6px;
}
