/* Battleships styles */

.battleships {
    background-color: white;
    max-width: 780px;
    padding-top: 25px;
    padding-bottom: 25px;
    padding-left: 40px;
    padding-right: 40px;
}

.battleships select,
.battleships textarea {
    box-sizing: border-box;
    padding: 6px 12px;
    line-height: 143%;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

.battleships {
    text-align: center; 
}

.battleships p {
    line-height: 135%;
}

.battleships p > input[type=button] {
    margin-bottom: 3px;
}

.battleships h2 {
    margin-top: 1.0em;
    margin-bottom: 0.6em;
    line-height: 125%;
    font-size: 27px;
}

.page-intro {
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 60px;
    max-width: 410px;
}

@media screen and (min-width: 550px) {
    .page-intro {
        margin-top: 40px
    }
}

@media screen and (min-width: 650px) {
    .page-intro {
        max-width: 500px;
    }
}

@media screen and (min-width: 900px) {
    .page-intro {
        max-width: 540px;
        margin-top:  60px;
    }
}

.page-divider {
    width: 70%;
    border-bottom: 1px solid #b8b8b8;
    margin-top: 2em;
    margin-bottom: 2em;
    margin-left: auto;
    margin-right: auto;
}

.size-buttons .current-size {
    background-color: #efefef;
}

.battleships table.puzzle {
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    left: -11px;
}

.battleships table.puzzle td {
    width: 30px;
    height: 30px;
    border: 1px solid #aaa;
    padding: 0;
}

.battleships table.puzzle td.error > i {
    background-color: red;
}

.battleships table.puzzle th {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    font-weight: normal;
}

.battleships table.puzzle tr:first-child th {
    border-bottom: 3px solid black;
}

.battleships table.puzzle tr:first-child th:first-child {
    border-bottom: none;
}

.battleships table.puzzle tr th {
    border-right: 3px solid black;
}

.battleships th.complete {
    text-decoration: line-through;
    color: #cacaca;
}

.battleships th.wrong {
    color: #ff0000;
    font-weight: bold;
}

.battleships table.puzzle tr:first-child th {
    border-right: none;
}

.battleships table.puzzle tr:last-child td {
    border-bottom: 3px solid black;
}

.battleships table.puzzle tr td:last-child {
    border-right: 3px solid black;
}

.battleships i {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.battleships .ship-list {
    margin-top: 10px;
    margin-bottom: 10px;
    word-spacing: 5px;
    line-height: 173%;
}

.battleships .ship-list i {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: white;
}

i.blank {
}

i.water,
i.sub,
i.middle,
i.unknown,
i.cap-left,
i.cap-top,
i.cap-right,
i.cap-bottom {
    background-color: rgb(179, 212, 224);
    position: relative;
}

i.water.revealed,
i.sub.revealed,
i.middle.revealed,
i.unknown.revealed,
i.cap-left.revealed,
i.cap-top.revealed,
i.cap-right.revealed,
i.cap-bottom.revealed {
    background-color: rgb(127, 179, 197);
    cursor: default;
}

.solved i.water,
.solved i.sub,
.solved i.middle,
.solved i.unknown,
.solved i.cap-left,
.solved i.cap-top,
.solved i.cap-right,
.solved i.cap-bottom {
    background-color: #72ffa2;
    cursor: default;
}

i.sub:after,
i.middle:after,
i.unknown:after,
i.cap-left:after,
i.cap-top:after,
i.cap-right:after,
i.cap-bottom:after {
    content: '';
    position: absolute;
    left: 3%;
    top: 3%;
    right: 3%;
    bottom: 3%;
    background-color: #2f2f2f;
}

i.sub.found:after,
i.middle.found:after,
i.cap-left.found:after,
i.cap-right.found:after {
    background-color: #ccc;
}

i.sub:after {
    border-radius: 50%;
}

i.middle:after {
}

i.unknown:after {
    content: '';
    color: white;
    font-weight: bold;
    border-radius: 25%;
    vertical-align: middle;
    line-height: 150%;
    font-size: 19px;
}

i.cap-left:after {
    border-radius: 50% 0% 0% 50%;
}

i.cap-top:after {
    border-radius: 50% 50% 0% 0%;
}

i.cap-right:after {
    border-radius: 0% 50% 50% 0%;
}

i.cap-bottom:after {
    border-radius: 0% 0% 50% 50%;
}

.puzzle-status {
    font-style: italic;
    margin-top: 8px;
}

.puzzle-status.info {
    color: green;
}

.puzzle-status.error {
    color: red;
}

.pics-horizontal {
    display: table;
    margin-left: auto;
    margin-right: auto;
}

.pics-horizontal div {
    display: table-cell;
    vertical-align: middle;
}

#counterwrap,
.score {
    display: none;
}

p.instructions {
    text-align: left  !important;
    width: auto  !important;
    font-size: 100% !important;
}
