/* This is shared between primary and mobile layout. */

/* BASICS */

html {
    overflow-y: scroll;
}

body {
    margin: 0;
    color: black;
    padding: 0;
}

img {
    border: none;
}

p, form {
    margin: 0;
    padding: 0;
}

p, div {
    font-family: Arial, Verdana, Helvetica, sans-serif;
    font-weight: normal;
    color: black;
    line-height: 1.2em;
}

p b, div b {
    font-weight: bold;
}

h1 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.8em;
    font-weight: normal;
    color: #ac0002;
    margin: 0 0 10px 0;
}

h1 span {
    background-color: #fed256;
    padding-right: 5px;
}

h1 em {
    color: #000;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2em;
}

small {
    font-size: 0.8em;
}

input, select {
  vertical-align: text-top;
}

del {
  background: #ff8888;
  text-decoration: line-through;
}

ins {
  background: #99ff99;
  text-decoration: none;
}

.important {
    color: red;
    font-weight: bold;
}

.clear {
    clear: both;
}

.right {
    text-align: right;
}

.center {
    text-align: center;
}

.top {
    vertical-align: top;
}

.small {
    font-size: 0.8em;
}

.thin {
    font-weight: normal;
}

.monospace {
    font-family: Courier New, Lucida Console, monospace;
}

.separated {
  margin-top: 10px;
  margin-bottom: 10px;
}

.nowrap {
    white-space: nowrap;
}

#main b {
    font-weight: bold;
}

#main p {
    padding-bottom: 5px;
    line-height: 1.2em;
}

#main a, #main a:visited {
    color: #a93008;
    text-decoration: none;
}

#main a:hover, #main a:active {
    color: navy;
    text-decoration: underline;
}


/* Tables */
table {
    border-collapse: collapse;
    border: 0;
}

tr {
    margin: 0px;
    padding: 0px;
}

thead, tbody {
    margin: 0px;
    padding: 0px;
}

table th {
    font-weight: bold;
    text-decoration: underline;
}

th, td {
    text-align: left;
    margin: 0;
    padding: 0;
    border: 0;
}

th img, td img {
    margin: 0;
    padding: 0;
    border: 0;
}

table.bordered {
    border: solid 1px black;
    margin: 5px;
}

table.bordered th, table.bordered td {
    border: solid 1px black;
    padding: 2px 4px;
}

table.noborder, table.noborder th, table.noborder td {
    border: 0px;
}

table.list td, table.list th {
    padding: 1px 10px;
}

table.site td, table.site th {
    padding: 2px 5px;
}

/* This is mainly for name icons */
table.list img {
    vertical-align: middle;
    padding-right: 3px;
}

#gamelist img {
    vertical-align: middle;
    padding-right: 3px;
}

#gamelist > div {
    line-height: 1.4em;
}


/* Format the game board, displaying as table is needed for centering to work. */
#board {
    display: table;
    margin: 5px auto 0px auto;
    padding: 0;
    border-collapse: separate;
    border-spacing: 0;
    vertical-align: top;
    text-align: center;
    clear: both;
}

/* This should center the game board */
#board:first-child {
    margin: auto;
}


/* MORE SPECIFIC THINGS SHARED BETWEEN LAYOUTS */

.wikis {
    padding: 3px 5px;
}

table.wikitable {
  margin: 3px 0px;
}

table.wikitable, table.wikitable td {
  border: 4px inset #a0a0a0;
}

table.wikitable td {
  padding: 2px 4px;
}

div.wikitext img {
  vertical-align: bottom;
}

span.wikitext img {
  vertical-align: bottom;
}

#main a.wikinew, #main a.wikinew:visited {
    color: navy;
}

#main a.wikiseen, #main a.wikiseen:visited {
    color: #681c04;
}

/* Score */
#score {
    text-align: center;
}

#score table {
    margin: auto;
}

#short_instr_text > *, #short_instr_text img {
    vertical-align: middle;
}

/* Game Options */
#gameopts, #adminopts {
    font-family: Arial, Verdana, Helvetica, sans-serif;
    text-align: center;
    clear: both;
}

/* Game Messages */

#gamemessages {
    color: #000;
    background: #fff;
    margin: 0 25px 5px 25px;
    padding: 5px;
    max-height: 200px;
    /* IE hack to make for the lack of max-height */
    height: expression(document.getElementById("gamemessages").offsetHeight >= 200 ? "200px" : "auto");
    overflow: auto;
}

#gamemessages .name {
    font-weight: bold;
}

#gamemsged {
    margin: auto;
    clear: both;
    float: none;
}

#gamemsgedinput {
    width: 50%;
    padding: 5px;
    margin-right: 10px;
    float: left;
}

#gamemessageeditor {
    width: 100%;
}

#gamemsgedtext {
    width: 25%;
    vertical-align: top;
    text-align: right;
    float: left;
    padding-top: 10px;
}

#gamemsgedsubmit {
    vertical-align: top;
    padding-top: 10px;
}

#oldermsgs, #openmsgs {
    text-align: center;
    margin: 5px;
}

/* Game Notes */

#gamenote {
    color: #000;
    background: #ff8;
    margin: 5px 25px 5px 25px;
    padding: 2px 5px 2px 5px;
    clear: both;
}

#gamenote .notetitle {
    text-align: center;
    font-weight: bold;
}

#gamenotesed {
    margin: auto;
    clear: both;
    float: none;
}

#gamenotesedinput {
    width: 65%;
    padding: 5px;
    float: left;
    margin-right: 10px;
}

#gamenotesedtext {
    width: 20%;
    vertical-align: top;
    text-align: right;
    float: left;
    padding-top: 10px;
}

#gamenoteeditor {
    width: 100%;
    background-color: yellow;
}

#gamenotesedsubmit {
    vertical-align: top;
    padding-top: 10px;
}

/* Verify Move */
#verify {
    margin: 0 auto 10px auto;
    clear: both;
    text-align: center;
}

#verify input {
    margin: 5px 10px 5px 10px;
}

#long {
    clear: both;
}

.submit_button {
    padding: 0.3em;
    font-size: 1.1em;
    margin: 10px 2em;
}


/* Last Move */
#lastmove {
    text-align: center;
}

#vcr {
    text-align: center;
}

#vcr img {
  vertical-align: middle;
}

/* Past Moves */
#pastmoves {
    margin: auto;
    clear: both;
    text-align: center;
}

#pastmoves table {
    margin: auto;
}

#pastmoves td {
    font-size: 0.8em;
}

.banner {
    border: 0px;
    margin: 5px;
}

#bannerT {
    text-align: center;
    height: 92px;
    margin: 0px;
    padding: 5px 1px 1px 1px;
}

#bannerR {
    text-align: center;
}

#bannerC {
    text-align: center;
}


/** Jquery-UI required */
.ui-draggable-handle {
    -ms-touch-action: none;
    touch-action: none;
}

img.external_screenshot {
    width: 256px;
    height: 128px;
    border: 1px #2f2f2f solid;
    margin: 0;
    padding: 0;
}


