/* The scorecard page */

html {
	--totals: #dee;
}


.scorecard_main {
}

table.options {
    
}

/* The Scorecard itself */

table.scorecard_complete>tr>td {
    padding: 20px;
}

table.scorecard_main {
    font-family: sans-serif;
    border-spacing: 10px;
}

table.scorecard_main>tbody>tr>td {
    background-color: white;
    padding: 10px;
}

/* HEADER */

table.scorecard_main tr.settings td  {
	padding: 2px;
	background-color: #eee;
	font-size: 0.7em;
}

table.scorecard_main tr.settings_gap td  {
	padding: 0;
	background-color: #ddd;
	color: red;
	font-size: 0.8em;
}

table.scorecard_header {
    width: 100%;
    border-collapse: collapse;
}
    
.team_name {
    min-width: 200px;
    padding: 0px 25px 0px;
    font-size: 32px;
    font-weight: bolder;
    text-align: center;
    color: black; /*var(--main_dark);*/
    border-right: none !important;
}

.team_score {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: var(--main_dark);
    border-left: none !important;
}

.vs {
    text-align: center;
	font-size: 20px;
}

.skin_summary {
    width: 150px;
}

.skin_summary td {
}

td.match_details {
	padding: 0
}

table.match_details {
	border-collapse: collapse;
	height: 100%;
	width: 100%;
}

.detail_heading {
    font-size: 12px;
    font-weight: bold;
    padding-right: 10px;
    border: 1px solid gray;
    background-color: #ccc;
    padding: 1px 5px 1px;
}

.detail_data {
    font-size: 12px;
    border: 1px solid gray;
    padding: 2px 5px 1px;
    line-height: 1.3em;
}


/* INNINGS */

table.scorecard_innings {
	border-collapse: collapse;
    border-color: black;
}

table.scorecard_innings:not(.example) {
    width: 100%;
}

table.scorecard_innings tr {
	max-height: 38px;
	vertical-align: middle;
}

table.scorecard_innings td {
    border: 1px solid gray;
	overflow: hidden;
	text-overflow: ellipsis;
}

table.scorecard_innings .batting_team {
    font-size: 20px;
    padding: 6px 10px 6px;
    background-color: var(--main_dark);
    text-align: center;
	font-weight: bold;
	color: white;
}

table.scorecard_innings .player_name {
    /*font-weight: bold;*/
    padding: 0 0.5em 0;
	white-space: nowrap;
}

table.scorecard_innings .player_name.sub {
    color: #8F0F0F;
}

table.scorecard_innings .player_name.batter {
    border-right: none;
}

table.scorecard_innings .player_name.bowler {
    padding-top: 1px;
    padding-bottom: 1px;
    text-align: center;
}

table.scorecard_innings .penalty {
    color: red;
    font-size: 14px;
    padding: 0 2px 0;
    border-left: none;
}

table.scorecard_innings .over_total {
    font-weight: bold;
    text-align: center;
    font-size: 14px;
	padding-left: 6px;
	padding-right: 6px;
}

table.scorecard_innings .over_total_batter {
    text-align: center;
    font-size: 14px;
    padding: 0 3px 0;
    background-color: var(--totals);
}

table.scorecard_innings .batter_total {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    padding-left: 5px;
    padding-right: 5px;
}

table.scorecard_innings .pair_total {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding: 0 5px 0;
}

table.scorecard_innings .team_total {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding: 5px 0 5px;
    color: blue;
}

table.scorecard_innings tr:nth-child(3n+4) {
    background-color: var(--totals);
}

table.scorecard_innings .separator td {
    border: none;
}
	
table.scorecard_innings td.batter_gap {
	border-left: none;
	background-color: white;
}

table.scorecard_innings td.total_gap {
	border-right: none;
	background-color: white;
}

/*---------TEMP WICKET_NUM IS THE OPTIONAL GET RID OF------------*/
.wicket_num {
	display: none;
}

/* THE INDIVIDUAL 8x2 OVER TABLES */

table.scorecard_over {
    border-collapse: collapse;
    font-size: 14px;
    text-align: center;
}

table.scorecard_over:not(.example) {
	/* we want most features of scorecard_over to apply to the legend as well, but not this one */
	width: 100%;
}

table.scorecard_over td {
    min-width: 1em;
    padding: 1px 2px 1px 2px;
	border: 1px solid grey;
}

table.scorecard_over:not(.example) tr:first-child td {
    border-top: none;
}

table.scorecard_over:not(.example) tr:last-child td {
    border-bottom: none;
}

table.scorecard_over:not(.example) td:first-child {
    border-left: none;
}

table.scorecard_over:not(.example) td:last-child {
    border-right: none;
}

table.scorecard_over td.rep_batter {
	background-color: #F0F0AF;
}

table.scorecard_over td.rep_bowler {
	background-color: pink;
}

table.scorecard_over td.rep_batter.rep_bowler {
	background: repeating-linear-gradient(
		  45deg,
		  #F0F0AF,
		  #F0F0AF 5px,
		  pink 5px,
		  pink 10px
		);
}

table.scorecard_over td.extra {
	/*font-style: italic;
	font-size: 0.8em;*/
}

table.scorecard_over td.wicket {
	font-weight: bold;
}

table.scorecard_over:not(.example) td {
	border-left: 0;
}

table.scorecard_over td.rebowled {
	border-right: 1px dashed #ddd;
	padding-right: 0;
}

table.scorecard_over td.rebowled + td {
	padding-left: 0;
}

td.skin_result {
	padding-left: 0.4em;
	padding-right: 0.4em;
}

img.skin_result {
	/*padding-left: 0.4em;
	padding-right: 0.4em;*/
	height: 1.2em;
}

/* The legend */

.legend {
	width: 100%;
	border: 2px solid var(--main_dark);
	background-color: #eee;
	padding: 1em;
}

.legend td {
	vertical-align: top;
}

.legend ul {
	list-style-type: none;
	padding: 0.7em;
}

.legend li span.li_heading {
	display: inline-block;
	width: 2em;
}

.legend .example {
	display: inline-block;
	margin-right: 1em;
}

.not_shown {
	visibility: hidden;
	display: none;
	background-color: blue;
}

/* PLAYER SUMMARY TABLES */
div.scorecard_summary {
    background-color: white;
    font-family: sans-serif;
    font-size: 14px;
    margin: 10px;
}

table.scorecard_summary {
    margin-left: auto;
    margin-right: auto; 
}

table.scorecard_summary td {
	vertical-align: top;	
}

table.team_summary {
    border-collapse: collapse;
    margin: 0 3em 1em 3em;
    text-align: center;
}

table.team_summary td {
    border: 1px solid black;
    padding: 2px 1em 2px 1em;
}

table.team_summary tr.heading {
    background-color: var(--main_dark);
	color: white;
}

table.team_summary tr.heading:first-child {
	font-weight: bold;
}

table.team_summary tr:nth-child(2n+4) {
	background-color: #f0f6ff;
}

table.team_summary td.average {
    display: none;
}

.scorecard_summary .notes {
	text-align: center;
	font-size: 0.8em;
}

/* EDIT BOX FOR AN EDITABLE SCOREARDS */
#edit_box {
    position: absolute;
    top: 0;
    right: 0;
    height: 200px;
    width: 200px;
    background-color: yellow;
    border-style: solid;
}


/* Misc */
.sub_icon {
	font-size: 0.7em;
	vertical-align: 0.2em;
}