body
{
	font: 16px arial;
	margin: 0px;
	padding: 0px;
	border-style: none;
	background-color: #000000;
	color: #FFCC00;
	background-image: url('rts_background.jpg');
	background-repeat:no-repeat;
	background-position:top center;
}


.goalpenalty
{
	color: #ccCC00;

}

.sbTable
{

}

.ppStatusDesc
{
	white-space: nowrap;
	font-weight: bold;
}

.ppTimeRemaining
{
	color: #FF0000;
	font-weight: bold;
}

.awayTeamName
{
	color: #FFFFFF;
	font: 15px arial;
	font-weight: bold;
}

.homeTeamName
{
	color: #FFFFFF;
	font: 15px arial;
	font-weight: bold;
}

/* Fixed box for team names: the top scoreboard is a fixed-geometry overlay on
   rts_background.jpg, so a long name must never grow the header row (which would
   push the logos/score/clock down out of alignment). The box caps width/height
   and clips; live.js:fitTeamName() shrinks the font so the full name stays
   readable within these bounds. */
/* Cap the name to the cell's designed 115px width so a long single-line name
   can't stretch the cell and widen the whole (centered) scoreboard table past
   the background plate's width. max-height + overflow clips a runaway wrap;
   the enclosing <td valign="bottom"> still bottom-aligns the name as before. */
.teamNameBox
{
	width: 115px;
	max-height: 48px;
	overflow: hidden;
	line-height: 1.05;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.teamNameBox-right
{
	text-align: right;
}

.largeScore
{
	font: 38px arial;
	font-weight: bold;
	text-align: center;
}

.timePeriod
{
	font: 16px arial;
	text-align: center;
	font-weight: bold;
}

.awaySOG
{
	font: 24px arial;
	font-weight: bold;
}

.homeSOG
{
	font: 24px arial;
	font-weight: bold;
}

.gridTeamName
{
	color: #FFFFFF;
	font: 15px arial;
	font-weight: bold;
}

.gridHeader
{
	color: #FFFFFF;
	font: 15px arial;
	font-weight: bold;
}

.otSOGridHeader
{
	color: #FFFFFF;
	font: 15px arial;
	font-weight: bold;
}

.gridValue
{
	font: 15px arial;
	font-weight: bold;
}

.lastEvent
{
	font: 12px arial;
	font-weight: bold;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * CSS-positioned single-game scoreboard (.rtsb)
 * Overlays rts_background.jpg (430x230) box-for-box. The background is
 * on the container itself, so the live elements can never drift out of
 * alignment with the plate the way the old fixed-width table could.
 * Coordinates were measured directly from rts_background.jpg.
 * ------------------------------------------------------------------ */
body.rtsb-single
{
	background-image: none;
	background-color: #000000;
}

.rtsb
{
	position: relative;
	width: 430px;
	height: 230px;
	margin: 0 auto;
	background: url('rts_background.jpg') no-repeat top left;
	font-family: arial, sans-serif;
	color: #FFCC00;
}

.rtsb > *
{
	position: absolute;
	box-sizing: border-box;
}

/* Team names: flank the title pill in the top corners, bottom-aligned,
   clipped to their box so a long name can never shove anything else. */
.rtsb-name
{
	top: 4px;
	width: 100px;
	height: 40px;
	color: #FFFFFF;
	font-weight: bold;
	font-size: 14px;
	line-height: 1.02;
	overflow: hidden;
	overflow-wrap: anywhere;
	display: flex;
	align-items: flex-end;
}
.rtsb-away { left: 2px;   justify-content: flex-start; text-align: left; }
.rtsb-home { left: 328px; justify-content: flex-end;   text-align: right; }

/* Title pill */
.rtsb-title
{
	left: 116px;
	top: 9px;
	width: 196px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: bold;
	font-size: 13px;
	line-height: 1.0;
	overflow: hidden;
}
.rtsb-title-time
{
	left: 116px;
	top: 9px;
	width: 196px;
	height: 32px;
	padding-right: 6px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	font-weight: bold;
	color: #FF0000;
}

/* Logos sit at the outer edges of the plate (their own white art shows
   over the grey); scores sit in the recessed square boxes inboard. */
.rtsb-logo { top: 51px; width: 74px; height: 74px; object-fit: contain; }
.rtsb-alogo { left: 5px; }
.rtsb-hlogo { left: 351px; }

.rtsb-score
{
	top: 58px;
	width: 66px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	font-weight: bold;
}
.rtsb-ascore { left: 82px; }
.rtsb-hscore { left: 282px; }

/* Clock + period: the two stacked centre boxes */
.rtsb-clock
{
	left: 150px;
	top: 62px;
	width: 128px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: bold;
}
.rtsb-period
{
	left: 150px;
	top: 103px;
	width: 128px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: bold;
}

/* Penalties: the wide centre box, two rows of player# + time per side */
.rtsb-pen
{
	left: 72px;
	top: 142px;
	width: 282px;
	height: 62px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	font-size: 13px;
	font-weight: bold;
}
.rtsb-pen-row
{
	display: grid;
	grid-template-columns: 46px 95px 95px 46px;
	align-items: center;
	height: 50%;
}
.rtsb-c1 { text-align: left;  padding-left: 4px; }
.rtsb-c2 { text-align: left; }
.rtsb-c3 { text-align: right; }
.rtsb-c4 { text-align: right; padding-right: 4px; }

/* Shots: the small side boxes */
.rtsb-sog
{
	top: 163px;
	width: 56px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: bold;
}
.rtsb-asog { left: 4px; }
.rtsb-hsog { left: 370px; }

/* Last-event ticker along the bottom of the plate */
.rtsb-event
{
	left: 0;
	top: 208px;
	width: 430px;
	height: 20px;
	text-align: center;
	font-size: 12px;
	font-weight: bold;
	white-space: nowrap;
	overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Roster + play-by-play tables (below the single-game scoreboard).
 * Dark scoreboard theme: capped width, zebra rows, clean headers.
 * ------------------------------------------------------------------ */
.rtsb-tables
{
	width: 96%;
	max-width: 1500px;
	margin: 16px auto 0;
	border-collapse: separate;
	border-spacing: 16px 0;   /* gap between the three columns */
}
.rtsb-tables > tbody > tr > td { vertical-align: top; }
/* roster | play-by-play | roster  ->  1 : 2 : 1 (pbp twice a roster column) */
.rtsb-tables > tbody > tr > td:nth-child(1),
.rtsb-tables > tbody > tr > td:nth-child(3) { width: 25%; }
.rtsb-tables > tbody > tr > td:nth-child(2) { width: 50%; }

.rtsb-grid
{
	width: 100%;
	border-collapse: collapse;
	font: 13px arial, sans-serif;
	color: #FFCC00;
	background: #0c0c0c;
	border: 1px solid #3a2f00;
}
.rtsb-grid th
{
	background: #1b1600;
	color: #FFD84D;
	font-weight: bold;
	text-align: center;
	padding: 6px 6px;
	border-bottom: 2px solid #4d3f00;
}
.rtsb-grid td
{
	padding: 3px 7px;
	border-bottom: 1px solid #1d1d1d;
	line-height: 1.25;
}
.rtsb-grid tr:nth-child(even) td
{
	background: #141414;
}
.rtsb-grid tr:hover td
{
	background: #241c00;
}

/* Roster number columns read better centered + tabular */
#awayroster td, #homeroster td { font-variant-numeric: tabular-nums; }

/* Play-by-play: narrow dim period/time columns, roomy description */
.rtsb-grid-title { font-size: 15px; letter-spacing: .03em; }
.rtsb-pbp-filters
{
	font-weight: normal;
	font-size: 12px;
	color: #FFCC00;
	background: #121000;
}
.rtsb-pbp-filters label { margin: 0 6px; white-space: nowrap; cursor: pointer; }
.rtsb-pbp-filters input { vertical-align: middle; margin-left: 2px; }
.rtsb-pbp td:first-child,
.rtsb-pbp td:nth-child(2)
{
	text-align: center;
	color: #a2914c;
	width: 1%;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
