/*
 * Matrix font from http://www.fontspace.com/gyusan/matrix
 */
@import "fonts/matrix/stylesheet.css";

* {
  box-sizing: border-box;
}

body, form {
  font-family: "Arial", sans-serif;
  padding: 0;
  margin: 0 !important;
}

header {
  margin: 0;
  background: black;
  color: white;
  position: relative;
  padding: 0 5px;
}

h1 {
  margin: 0;
  font-weight: normal;
  font-family: 'hinted-MATRIX', serif;
  font-size: 20px;
  text-transform: uppercase;
  text-shadow: 5px 0 15px #16fb16, -5px 0 15px #16fb16;
  display: inline-block;
  margin-right: 20px;
}

dialog h1 {
  font-size: 40px;
  text-align: center;
  margin: 0 auto;
  display: block;
}

header a, header label, header div, header input {
  position: relative;
  color: #16fb16;
  display: inline-block;
  margin-right: 20px;
  font-size: 0.8em;
  background: none;
  border: none;
  line-height: 30px;
  top: -2px;
  outline: none;
  cursor: pointer;
}

label {
  display: block;
  cursor: pointer;
}

label input[type="checkbox"] {
  margin-right: 0;
}

form {
  margin: 1em 1em 1em 1em;
  position: relative;
}

fieldset {
  margin: 10px;
}



#answerFieldset {
  margin-bottom: 0.3em;
  right: 0;
  overflow: hidden;
  padding-right: 0;
}

#answerFieldset pre {
  overflow: scroll;
  height: 93%;
  margin: 0;
}

#diagram {
  position: relative;
}

#o1 {
  text-decoration: none;
}

#input, #answerFieldset {

}

#answerFieldset {
  height: 9em;
}

output {
  display: inline-block;
}

.dataTable input, output {

  width: 3em;
}

.dataTable textarea {
  width: 50vw;
  height: 10em;
}

#content-dialog input {
  margin-right: 10px;
}

label, a {
  text-decoration: none;
}

a[data-dialog-id="content-dialog"] {
  display: block;
  margin-top: 1em;
}

a[data-dialog-id="content-dialog"].close {
  display: inline-block;
  margin-top: 0;
}

table {
  border: solid 1px black;
  border-collapse: collapse;
}

#input table {
  float: left;
  margin-right: 10px;
}

#input .form-elements {
  float: left;
  width: 400px;
  margin-right: 20px;
}

#input label {
  margin-bottom: 1em;
}

#input input[type="checkbox"] {
  margin-right: 0.5em;
  margin-bottom: 0.2em;
  float: left;
  position: relative;
  top: -2px;
}

#input .form-elements a,
#input .form-elements label,
#input .form-elements input[type="submit"],
#input .form-elements input[type="reset"],
#input p {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 12px;
  line-height: 1.3;
}

#input .information {
  margin-left: 420px;
}

#input p {
  margin: 0 0 1em 0;
}
dialog table {
  margin-bottom: 10px;
}

table th, table td {
  padding: 0.3em;
}

table th, table td, table input {
  font-size: 0.7em;
}

table th {
  background: #cccccc;
  color: white;
}

table tbody th {
  text-align: right;
  padding-right: 10px;
}

table tbody td {
  border: solid 1px black;
  text-align: center;
}

#grid {
  position: relative !important;
 
}

#grid-facade {
  width: 100%;
  height: 100%;
  border: solid 1px red;
  position: absolute;
  top: 0;
  left: 0;
   z-index: 3;
}

/* Draggable object should be above the facade ... */
[draggable="true"] {
  z-index: 4;
}

/* 
 * Except when an object is dragging and it's not
 * itself.  It *must* override every other rule.
 */
[draggable="true"].notCurrentlyDragging {
  z-index: 0 ;
  pointer-events: none;
}

.point.notCurrentlyDragging {
  z-index: 1;
}

/* o2 should always be above o1 ... */
#o2 {
  z-index: 5;
}

/* ... except when an object is dragging */
body.hasChildDragging #o2 {
  z-index: 0;
  pointer-events: none;
}

/* .points should be above all objects except the resizer */
.point {
  z-index: 6;
}

/* o1Resizer should alway be above o2 and points*/
#o1Resizer {
  z-index: 7;
}


/* Style for when something is not currently dragging, but still on top of facade */
[draggable="true"].on-top-of-facade {
  z-index: 1;
}


/* Points, though, should still be above other non-dragging objects */
.point.notCurrentlyDragging {
  z-index: 2;
}


.ie11 [draggable="true"].currentlyDragging {
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
}

#o1.currentlyDragging {
  transform: none;
}


.resize {
  position: absolute;
  top: 90px;
  left: 90px;
  cursor: se-resize !important;
}

.block .resize img {
  border: 0;
  z-index: 3;
}

.block {

  background: #ffcccc;
  color: black;
  position: absolute;
  overflow: hidden;
}

.top {
  z-index: 2;
}

.hidden #o2 {
  display: none;
}

#o2 {
  pointer-events: none;
}

.block p {
  margin: 0;
  padding: 10px;
}

#points {
  height: 800px;
  position: relative;
}

.point {

  background-image: url(../images/crosshair.png);
  width: 35px;
  height: 35px;
  margin-left: -17px;
  margin-top: -17px;
  position: absolute;
  display: block;
}

body.ie6 #matrixForm, body.ie7 #matrixForm, body.ie8 #matrixForm
html.no-draganddrop #matrixForm {
  display: none;
}

#unSupportedMessage {
  display: none;
}

body.ie6 #unSupportedMessage, body.ie7 #unSupportedMessage, body.ie8 #unSupportedMessage
html.no-draganddrop #unSupportedMessage {
  display: block;
  margin: 1em;
}

.no-pointer-events {
  pointer-events: none;
  
}

html.no-csstransforms3d [for=do3D] {
  display: none;
}

.no-3D {
  display: none;
}
html.no-csstransforms3d .no-3D {
  display: block;
}

dialog[open] {
  width: 75%;
  position: fixed;
  top: 20px !important;
  border: solid 1px #666;
  box-shadow: 10px 10px 10px rgba(0,0,0,0.6);
  overflow: visible;
  max-height: 80vh;
  padding: 0;
}

dialog .content {
  overflow-y: scroll;
  max-height: -webkit-calc(80vh - 3px);
  max-height: calc(80vh - 3px);
  
  padding: 1em;
}

dialog .close-button {
  display: block;
  width: 22px;
  height: 22px;
  top: -11px;
  right: -11px;
  background-image: url('../images/close-button.png');
  position: absolute;
}

dialog#info-dialog input.close {
  margin: 1em auto 1em auto;
  display: block;
}

#content-dialog {
  text-align: center;
}

#content-dialog p {
  margin: 0 auto 20px auto;
  max-width: 580px;
}

dialog .dataTable {
  margin: 0 auto 10px auto;
}


/* Show hide */
.showhide {
  height: 100%;
  max-height: 1000px;
  transition: height 500ms ease-in-out, opacity 500ms ease-in-out;
  overflow: hidden;
  opacity: 1;
}

.showhide.show {
  max-height: 1000px;
}

.showhide.hide {
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  max-height: 0;
}

.showhide.hide legend {
  display: none;
}

.showhide-link span {
  display: none;
}

.showhide-link.show .hide-label, .showhide-link.hide .show-label {
  display: inline;
}
