/* BB Custom Modules — Room Systems (simple tabs) frontend */

.rsc-wrapper {
	/* CSS variable defaults — overridden inline from saved config. */
	--rsc-accent: #003366;
	--rsc-accent-text: #ffffff;
	--rsc-bg: #ffffff;
	--rsc-text: #1f2937;
	--rsc-tab-bar-bg: #e5e7eb;
	--rsc-muted: #6b7280;
	--rsc-link-hover: #0052a3;
	--rsc-badge: #b2fe33;
	--rsc-heading: #1f2937;
	--rsc-badge-text: #000000;
	--rsc-outline: #1f2937;
	--rsc-list-text: #1f2937;

	color: var(--rsc-text);
	background-color: var(--rsc-bg);
	font-family: inherit;
	line-height: 1.5;
	width: 100%;
}

.rsc-wrapper *,
.rsc-wrapper *::before,
.rsc-wrapper *::after {
	box-sizing: border-box;
}

/* ============================================
   TAB BAR — matches Tabbed Accordion brand styling.
   Horizontally scrollable on narrow viewports.
   ============================================ */

.rsc-tabbar {
	margin-bottom: 1.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.rsc-tablist {
	list-style: none;
	margin: 0;
	padding: 4px;
	display: inline-flex;
	gap: 4px;
	background-color: var(--rsc-tab-bar-bg);
	border-radius: 4px;
	white-space: nowrap;
}

.rsc-tablist li {
	margin: 0;
	padding: 0;
}

.rsc-tab {
	display: inline-block;
	background-color: transparent;
	color: var(--rsc-muted);
	border: 0;
	padding: 8px 16px;
	font-size: 0.9375rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	border-radius: 3px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rsc-tab:hover:not(.is-active) {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--rsc-text);
}

.rsc-tab.is-active {
	background-color: var(--rsc-accent);
	color: var(--rsc-accent-text);
}

.rsc-tab:focus-visible {
	outline: 2px solid var(--rsc-accent);
	outline-offset: 2px;
}

/* ============================================
   PANEL LAYOUT
   Mobile  : image on top, content below
   Desktop : image left (50%), content right (50%)
   ============================================ */

.rsc-panel[hidden] { display: none; }

.rsc-panel-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	align-items: start;
}

@media (min-width: 768px) {
	.rsc-panel-layout {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}
}

.rsc-image-col {
	width: 100%;
}

.rsc-room-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	border-radius: 4px;
}

.rsc-content-col {
	min-width: 0;
}

/* ============================================
   ROOM NAME
   ============================================ */

.rsc-room-name {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 1rem;
	color: var(--rsc-heading);
}

@media (min-width: 768px) {
	.rsc-room-name {
		font-size: 1.75rem;
	}
}

/* ============================================
   EQUIPMENT LIST
   ============================================ */

.rsc-equipment-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 1.5rem;
}

.rsc-equipment-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rsc-badge {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.rsc-badge-green {
	background-color: var(--rsc-badge);
	color: var(--rsc-badge-text);
}

.rsc-badge-outline {
	background-color: transparent;
	border: 1px solid var(--rsc-outline);
	color: var(--rsc-outline);
}

.rsc-wrapper .rsc-item-name,
.rsc-wrapper span.rsc-item-name {
	color: var(--rsc-list-text);
	text-decoration: none;
	font-size: 0.9375rem;
}

.rsc-wrapper a.rsc-item-link,
.rsc-wrapper a.rsc-item-link:link,
.rsc-wrapper a.rsc-item-link:visited {
	color: var(--rsc-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

.rsc-wrapper a.rsc-item-link:hover,
.rsc-wrapper a.rsc-item-link:focus {
	color: var(--rsc-link-hover);
	text-decoration: underline;
	opacity: 1;
}

/* ============================================
   CONNECTIVITY LEGEND
   ============================================ */

.rsc-connectivity-legend {
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	padding-top: 1rem;
	margin-top: 0.5rem;
}

.rsc-wrapper .rsc-connectivity-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--rsc-list-text);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 10px;
}

.rsc-connectivity-items {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rsc-connectivity-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.rsc-connector {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	font-weight: 700;
	font-size: 28px;
	line-height: 1;
}

.rsc-connector-dash { padding-bottom: 6px; }
.rsc-connector-dots { padding-bottom: 4px; }

.rsc-wrapper .rsc-connection-name,
.rsc-wrapper span.rsc-connection-name {
	color: var(--rsc-list-text);
}

/* ============================================
   ACCESSIBILITY / MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
	.rsc-tab,
	.rsc-wrapper a.rsc-item-link {
		transition: none;
	}
}
