
/**
 * 
 * Code for Styling the Gap Maps.
 * Updated: 11/9/2023
 * Created by Nevin Katz (nkatz@edc.org)
 */

 /*
  New rows are colored in yellow. You can remove the yellow for a given row by removing the "new":"true" property-value pair for in gapmap3_axes.json and gapmap4_axes.json.
 */

body {
    font-family: Calibri, "Arial Narrow";
}
h1 {
    font-size: 1rem;
    text-align: center;
}
body span,
body td {
	vertical-align: middle;
}
h1.entry-title.post-title {
	margin: 24px auto;
	text-align: center;
	font-size: 24px;
	position: relative;
	left: -20px;


}
#gap_map {

  min-width: 900px;
}
#gap_map td,
#gap_map th {
	border: 1px solid darkgrey;

}

table tbody tr:nth-child(2n) {
	background-color: #efefef;
}

table th,table td {
	font-weight: normal;
	font-size: 12px;
	line-height: 15px;
}
table thead tr:nth-child(2) {
  height: 170px;
}
table thead tr th {
  max-width: 20px;
}

table td.y_cat, #gap_map thead tr th, #gap_map tbody tr td {
	vertical-align: middle;
}

table th span {
	display: inline-block;
vertical-align: none;
transform: rotate(270deg);
transform-origin: bottom right;
position: relative;
float: right;
width: 155px;
text-align: left;
bottom: 95px;
height: 55px;
left: 5px;
vertical-align: -moz-middle-with-baseline;
margin: 0px auto;
padding-top: 0px;
margin-bottom: 20px;
}

div#gap_map[data-index="1"] table th.one-line span {
  left: 7px;
}
div#gap_map[data-index="1"] table th.two-lines span {
  left: -1px;
}
div#gap_map[data-index="1"] table th.three-lines span {
  left: -15px;
}
div#gap_map[data-index="4"] table th.three-lines span {
	left: -10px;
}
div#gap_map[data-index="4"] table th:nth-child(7) span {
	left: -60px;
}
div#gap_map[data-index="4"] table th.two-lines span {
  left: -5px;
}
div#gap_map[data-index="2"] table th.one-line span {
  left: 12px;
}
#gap_map td:first-child {
	width: 50px;
}
#gap_map {
	
	padding-top: 25px;
	position: relative;
	/*margin-left: -45px;*/

}
table {
	border-collapse: collapse;
	margin-left: 30px;
	width: 90%;
}

#x_label {
	margin: 5px auto 10px auto;

	width: 100px;
/*  padding-left: 130px;*/
  font-size: 14px;
	text-align: center;
}
#y_label {
	width: 100px;
	height: 20px;
	float: left;
	position: absolute;
	top: 460px;
	left: -40px;
    font-size: 14px;
}
/* corner cell */
#gap_map thead tr th:first-child {
   border-left: 0px;
   border-top: 0px;
}
#gap_map thead tr:nth-child(2) {
  border-top: 0px;
}
#gap_map table {
  border: 0px;
}

#gap_map thead tr th,
#gap_map tbody tr td {
  text-align: center;
  padding-top: 5px;
  padding-left: 0px;
  padding-right: 0px;
}
#gap_map thead tr:nth-child(1) th {
  padding-bottom: 5px;
}

#gap_map tbody tr {
  height: 50px;
}
#gap_map table tbody tr.new {
  background-color: #ffffed;
}
#gap_map table tbody tr.new:nth-child(2n) {
	background-color: #ffffe0;
}
p.new-rows {
	text-align: center;
	margin: 0px;
	padding: 0px;
	font-size: 14px;
}

#gap_map tbody tr td:first-child {
  text-align: left;
  padding-left: 5px;
  padding-right: 5px;
}
#y_label /*, th span*/ {
	transform: rotate(-90deg);
	-webkit-transform: rotate(-90deg);
	-moz-transform: rotate(-90deg);
	-ms-transform: rotate(-90deg);
	-o-transform: rotate(-90deg);

	filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}

.mapcircle {
	width: 20px;
	height: 20px;
	margin: 0px auto;
	background-color: #adcce9;
	border-radius: 10px;
	transition: background-color 0.2s ease;
	cursor: pointer;
}
.mapcircle::before {
	display: none;
}
.mapcircle:hover {
	background-color: #c2113a;
	transition: background-color 0.2s ease;
}
#circle-legend .mapcircle:hover {
  background-color: #adcce9;
}
#circle-legend .mapcircle {
  cursor: default;
}
.popover-link {
	text-align: left;
	max-width: 350px;
	line-height: 22px;
	padding: 8px 0;
	border-bottom: 1px solid #ccc;
	text-decoration: none;
	display: block;
	color: dodgerblue;	
}
.popover-link:last-of-type {
	margin-bottom: 0px;
	border: 0;
}
a.popover-link.inactive {
	color: #666;
}

.rating {
	margin-bottom: 3px;
	display:  none;
}
.rating span,
span.rank span {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background-color: lightgrey;
	display: inline-block;
	margin-left: 4px;
	margin-bottom: 2px; 
}

.circle-container {

  width: 70px;

  text-align: center;
}
.circle-container {
  margin: 8px;
}

.circle-label {
  font-size: 13px;
}

.circle-container:first-child .mapcircle {
	margin-top: 20px;
}
.circle-container:nth-child(2) .mapcircle {
  margin-top: 18px;
}
.circle-container:nth-child(3) .mapcircle {
  margin-top: 15px;
}
.circle-container:nth-child(4) .mapcircle {
  margin-top: 12px;
}
.circle-container:nth-child(5) .mapcircle {
  margin-top: 9px;
}
.circle-container:nth-child(6) .mapcircle {
  margin-top: 6px;
}
.circle-container:nth-child(7) .mapcircle {
  margin-top: 3px;
}
.circle-container:nth-child(8) .mapcircle {
  margin-top: 0px;
}
/*div.circle-container:nth-child(2) {
  margin-left: 18px;
 
}*/
.clear-both {
  clear: both;
}
#circle-legend span.header,
#rating-legend span.header {
	font-size: 14px;
	font-weight: bold;
}
#circle-legend span.header {
  float: left;
  margin-top: 22px;
}
#rating-legend,
#circle-legend {
	margin: 0px auto 20px auto;
	border: 1px solid lightgrey;
	padding: 5px 15px;
	margin-top: 16px;
}
#rating-legend {
  width: 45%;
  margin-top: 10px;
  vertical-align: baseline;
}
#circle-legend {
  width: 65%;
}
#circle-legend h5 {
	text-align: center;
	margin: 8px 0px;
	font-size: 1rem;
}
#inner-legend {
	display: flex;
}
@media screen and (max-width:600px) {
	#inner-legend {
		flex-direction: column;
		align-items: center;
		width: 100%;
		max-width: 300px;
	}
}
#rating-legend span.rank {
	display: inline-block;
	margin-left: 20px;
	margin-bottom: 3px;
	font-size: 14px;
}
#rating-legend span.ranks {
	font-size: 14px;
}	
#instructions-text {
	font-size: 14px;
	text-align: center;
	margin-bottom: 10px;
	line-height: 16px;
}


@media screen and (max-width: 375px) {
	#rating-legend span.rank {
		margin-left: 10px;
	}
}

.rating span.full,
#rating-legend span.full {
	background-color: orange;
}

div.webui-popover.top {
		margin-top: -10px; /* -50*/
}

div.webui-popover.bottom {
		margin-top: 10px; /* -60 */
}
div.webui-popover.left,
div.webui-popover.right {
		margin-top: 0px; /* -32 */
}

@media screen and (min-width:1025px) {
	div#gap_map_background,div#legend {
		margin-left: -10px;
	}
}

/*
@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
  div.webui-popover.top {
		margin-top: -44px;
  }

  div.webui-popover.bottom {
	    margin-top: -20px;
  }
  div.webui-popover.left {
	margin-top: -30px;
  }


}*/
  /* horizontal scrolling for iPad portrait */

  #gap_map.scrollable {
      display: block;
     white-space: nowrap;
          padding-left: 35px;
     /* overflow-y: hidden;
      overflow-x: scroll;
      -webkit-overflow-scrolling: touch;
      z-index: 0;
     /* border: 1px solid lightgrey;*/
 

    /*  -webkit-transform: translateZ(0px);
      -webkit-transform: translate3d(0,0,0);
      -webkit-perspective: 1000;*/
  }
  #gap_map.scrollable table {
      white-space: normal;
  }
  #gap_map.scrollable #y_label {
      top: 470px;
      left: -15px;
  }
 #gap_map.scrollable #x_label {
      margin: -5px auto 10px auto;
  }

 /* #gap_map.scrollable:not(.single-section) td:nth-child(7),
  #gap_map.scrollable:not(.single-section) th:nth-child(7) {
      border-left-width: 3px;
  }*/

  @media screen and (min-width:668px) and (max-width:769px) {
  	#gap_map {
  		display: block;
  		white-space: nowrap;
  		overflow-y: hidden;
  		overflow-x: scroll;
  		-webkit-overflow-scrolling: touch;
  		z-index: 0;
  		border: 1px solid lightgrey;
  		padding-left: 35px;
  		padding-top: 15px;

  		-webkit-transform: translateZ(0px);
  		-webkit-transform: translate3d(0,0,0);
  		-webkit-perspective: 1000;
  	}
  	#y_label {
  		top: 470px;
  		left: -35px;
  	}
  	#gap_map table {
  		white-space: normal;
  	}
  	div#x_label {
  		display: none;
  	}
  	#rating-legend::after {
  		content:'Outcomes';
  		display: block;
  		width: 80px;
  		text-align: center;
  		position: relative;
  		top: 75px;
  		margin: 0px auto -10px auto;
  	}
  }
  /* scale down the chart slightly so it fits on iPad */
  @media screen and (min-width: 668px) and (max-width:1024px) {
  	#gap_map {
  		transform: scale(0.95,0.95);
  		-webkit-transform: scale(0.95,0.95);
  		-moz-transform: scale(0.95,0.95);
  		-ms-transform: rotate(0.95,0.95);
  		-o-transform: rotate(0.95,0.95);
  	}

  }
  /* iPad landscape */

  @media screen and (max-width:1024px) {
  	/* parent div */
  	#gap_map {
  		margin-left: 0px;
  	}
  	/* center background */
  	#gap_map_background {
  		width: 95%;
  		margin: 0px auto;
  	}

  	/* header */
  	h1.entry-title.post-title {
  		left: -5px;
  	}
  	td:first-child {
  		width: 40px;
  	}

  	/* legend */
  	#rating-legend {
  		width: 450px;
  	}
  	#rating-legend span.rank:first-child {
  		margin-left: 0px;
  	}

  	#rating-legend span.header {
  		width: 100%;
  		text-align: center;
  		display: block;
  		margin: 0px auto;
  	}
  	#rating-legend span.ranks {
  		margin: 0px auto;
  		display: block;
  		width: 320px;
  	}

  }
  /* between iPad portrait & landscape */
  @media screen and (min-width: 769px) and (max-width:900px) {
  	#gap_map {
  		margin-left: 0px;
  	}
  	h1.entry-title.post-title {
  		left: 0px;
  	}
  	#y_label {
  		left: -45px;
  	}

  }
  /*  popovers -- slightly higher than iPad portrait */
  @media screen and (max-width:790px) {
  	div.webui-popover.top {
  		margin-top: -60px;
  	}
  	div.webui-popover.bottom {
  		margin-top: -35px;
  	}


  	div.webui-popover.left {
  		margin-top: -45px;
  	}

  }   
  /*
  @media screen and (max-width: 667px) {

  	table th,table td {
  		font-weight: normal;
  		font-size: 16px;
  		line-height: 18px;
  	
  	}
  	#rating-legend {
  		width: 85%;
  	}
  	td:first-child {
  		width: auto;
  	}
  	div#wrapper.clearfix {
  		padding: 0px 20px;
  	}

  	thead, #x_label, #y_label  {
  		display: none;
  	}
  	body {
  		width: 100%;
  		margin: 0px;
  	}
  	h1 {
  		min-width: 0px;
  	}
  	div#gap_map,
  	div#gap_map tbody {
  		width: 100%;
  	}
    #gap_map.scrollable table {
      width: 800px;
    }
  	div#gap_map,
  	div#gap_map table,
  	div#gap_map tbody {
  		min-width: 0px;
  		float: none;
  		margin: 0px auto;
  		padding: 0px;

  	}
  	div#gap_map {
  		-webkit-text-size-adjust: 100%; 
  	}
  	#gap_map table,
  	#gap_map_background {
  		width: 95%;
  		border: 0px;
  		margin: 0px auto;
  	}

  	#gap_map table tr {
  		margin-bottom: 20px;
  		display: block;
  		border-bottom: 1px solid darkgrey;
  	}
  	#gap_map table tr td {
  		display: block;
  		border-bottom-width: 0px;
  		border-color: grey;

  	}
  	table tr td:first-child {
  		background-color: #002a6c;
  		color: white;

  	}
  	table tr td:first-child::before {
  		content: 'Intervention: ';


  	}
  	#gap_map table tr td:first-child {
  		background-color: #3f4a7f;
  		color: white;
  		padding: 10px;
  		min-height: 0px;


  	}
  	table tr td:nth-child(n+2)::before {
  		width: 70%;

  		content: attr(title);

  		display: inline-block;
  		text-align: left;
  		float: left;

  	}
  	table tr:nth-child(2n) {
  		background-color: white;
  	}
  	table tr td {
  		min-height: 40px;
  		text-align: center;
  		padding-right: 0px;
  	}
  	table tr td:nth-child(2n) {
  		background-color: #efefef;
  	}
  	table td .circle_con {

  		width: 28%;
  		display: inline-block;
  		vertical-align: middle;
  		position: relative;
  		top: 50%;
  	}
  	.mapcircle::before {
  		display: block;



  	}
  	.popover_link {
  		max-width: 200px;
  	}




  }*/

#button_container {
  width: 335px;
  margin: 0px auto 20px auto;
  position: relative;
  top: 10px;

}
#button_container button {
      background-color: #c7e6ff;
      border: 1px solid darkgrey;
      outline: none;
      padding: 4px 0px;
      width: 105px;
      font-size: 12px;
      border-radius: 4px;
      cursor: pointer;

}
#button_container button:hover {
  background-color: #c2113a;
  color: white;
}   
#button_container button.active {
  background-color: #adcce9;
  color: black;
  cursor: auto;
}
#button_container button:not(:last-child) {
      margin-right: 10px;
}
#sublabel0,#sublabel1 {
  position: absolute;
  top: 95px;
  font-size: 14px;
  
}
#sublabel0 {
  left: 350px;
}
#sublabel1 {
  left: 750px;
}
#sublabel0.lone {
  left: 450px;
}
#sublabel1.lone {
  left: 465px;
}
button#crosscutting {
  width: 150px;
}
button#btn-help-container,
button#btn-help-container:hover {
  background-color: white;
  width: 20px;
  border-width: 0px;
  color: #5166a8;
  padding-top: 12px;
  font-size: 18px;
  margin-top: 4px;
}
td.y_cat {
  width: 20px;
  background-color: white;
}
span.cat_row_label {
  display: block;
  transform:rotate(270deg);
  -webkit-transform: rotate(270deg);
  -moz-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  -o-transform: rotate(270deg);
  margin-left: -35px;
  margin-right: -35px;
  min-width: 100px;
  text-align: center;

}
#gap_map tbody tr td.vert_axis {
  text-align: left;
  padding-left: 5px;
}
  /* responsive popovers targeting FF, Chrome, Safari */
/*
@media screen and (max-width: 768px) {

	div.webui-popover.left,
	div.webui-popover.top,
	div.webui-popover.bottom {
		margin-top: 0px;
	}
    	div.webui-popover.left {
	      margin-top: -44px;
       }
       div.webui-popover.top {
          margin-top: -44px;
       }
       div.webui-popover.bottom {
          margin-top: -20px;
       }


    }

    }*/
    /* Chrome*/
/*
@media all and (max-width:768px) and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
   div.webui-popover.left {
     	margin-top: -44px;
   }
     div.webui-popover.top {
          margin-top: -44px;
       }
       div.webui-popover.bottom {
          margin-top: -20px;
       }
       }*/
