body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    background-color: #eaeaea;
    min-width: 620px;
}
a {
    color: #069080;
    text-decoration: none;
}

.header{
    display: flex;
    align-items: center;
    background-color: #069080;
    color: #eee;
    font-size: 32px;
    font-weight: bold;
    padding: 0.5em 0;
    height: 44px;
    line-height: 1em;
}
    .header #title {
        flex-grow: 1;
    }
    .header .logo {
        height: 1.5em;
        margin: 0 1ex;
    }
    .header select {
        margin-right: 2em;
        margin-left: 0.5em;
        height: 32px;
        background-color: #069080;
        border-radius: 1ex;
        border: 2px solid white;
        color: white;
        font-family: 'Nunito', sans-serif;
        font-weight: bold;
        outline: none;
    }
    .header select:disabled {
        text-decoration: line-through;
        /*background-color: #069080;*/
    }
    .header > label {
        font-size: 16px;
    }

div.footer{
    text-align: right;
    font-size: 0.8em;
    padding: 0.5em 0.8em;
}
div.main{
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
}
div.game{
    padding: 15px;
    width: 600px;
}
div.statusbar{
    float:right;
}
div.controllbar{
    float:left;
}
div.infobar {
    float: left;
    margin: 0.5ex;
    margin-left: 1.5ex;
}
#creepSummary {
    display: inline;
}
    #creepSummary img {
        position: relative;
        height: 1em;
        top: 0.2em;
    }
    #creepSummary canvas {
        position: relative;
        height: 1em;
        top: 0.2em;
    }
div.counter{
    margin: 5px;
    float: left;
}
div.towerInfo{
    display: flex;
    padding: 5px;
    border: 1px solid #000;
    margin-bottom: 10px;
    border-radius: 1em;
}
div.towerInfo.template{
    display: none;
}
div.towerInfo.locked {
    color: #444;
    background-color: #ddd;
}
div.towerInfo.locked img {
    filter: opacity(50%);
}
div.towerInfo.locked strong {
    text-decoration: line-through;
}
div.towerInfo .unlockInfo {
    color: red;
    font-weight: bold;
}
div.towerInfo:not(.locked) .unlockInfo {
    display: none;
}
div.towerInfo div{
    font-size: 9pt;
}
div.towerInfo strong {
    font-size: 11pt;
}
div.towerInfo img{
    max-width: 80px;
    max-height: 80px;
}
div.towerInfo button {
    border: 1px solid #069080;
    border-radius: 1em;
    font-family: 'Nunito', sans-serif;
    outline: none;
    box-shadow: #777 0 2px;
}
    div.towerInfo button:hover {
        border: 2px solid #069080;
    }
    div.towerInfo button:active:not(:disabled) {
        border: 2px solid #069080;
        background-color: #069080;
        color: white;
        outline: none;
        box-shadow: none;
        margin-top: 2px;
    }
    div.towerInfo button:disabled {
        border: 1px solid #ff52ba;
        background-color: #ddd;
        color: #777;
    }
    div.towerInfo:not(.locked) button:disabled span {
        color: red;
    }
div.towerInfo > :first-child {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    margin-right: 7px;
    align-self: center;
}
div.towerInfo > :nth-child(2) {
    flex-grow: 1;
}
div.towerInfo > button:last-child {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    margin-left: 7px;
}

button.controllerButton{
    width: 8ex;
    height: 2em;
    border: 1px solid #069080;
    border-radius: 1em;
    box-shadow: #777 0 2px;
    font-family: 'Nunito', sans-serif;
    outline: none;
    fill: #444;
    margin-bottom: 2px;
}

    button.controllerButton:hover:not(.keptPressed):not(:disabled):not(:active) {
        border: 1px solid #069080;
        fill: #069080;
    }

    button.controllerButton.keptPressed {
        border: 1px solid #069080;
        background-color: #069080;
        fill: white;
    }

    button.controllerButton.keptPressed:hover {
        border: 1px solid white;
    }

    button.controllerButton:active:not(:disabled) {
        border: 1px solid #069080;
        background-color: #069080;
        fill: white;
    }

    button.controllerButton:disabled {
        border: 1px solid #ff52ba;
        background-color: #ddd;
        fill: #777;
    }

    button.controllerButton svg {
        height: 2ex;
        margin-top: 0.6ex;
    }

span.counter{
    min-width: 3ex;
    display: inline-block;
}
.hideme {
    display: none !important;
}
.menus {
    padding: 15px;
    width: 600px;
}

.contextMenu h3 {
    margin-bottom: 0;
}

.contextMenu .infofield {
    display: flex;
    padding: 5px;
    margin-bottom: 5px;
}

    .contextMenu .infofield > div {
        margin-left: 20px;
        margin-right: 20px;
    }

    .contextMenu .infofield > :first-child {
        text-align: center;
        align-self: center;
        flex-shrink: 0;
        margin-left: 0px;
    }
    .contextMenu .infofield > :nth-child(2) {
        flex-shrink: 0;
    }

    .contextMenu .infofield > :nth-child(3) img {
        position: relative;
        height: 1em;
        top: 0.2em;
    }
    .contextMenu .infofield > :last-child {
        margin-right: 0px;
    }

    .contextMenu .infofield img {
        max-width: 80px;
        max-height: 80px;
    }

.contextMenu h4 {
    margin-bottom: 0;
}

.contextMenu .projectilefield {
    display: flex;
    padding: 5px;
    margin-bottom: 5px;
}

    .contextMenu .projectilefield img {
        max-width: 40px;
        max-height: 40px;
    }

    .contextMenu .projectilefield > div {
        margin-left: 20px;
        margin-right: 20px;
    }

    .contextMenu .projectilefield > :first-child {
        text-align: center;
        align-self: center;
        flex-shrink: 0;
        margin-left: 0px;
    }

    .contextMenu .projectilefield > :nth-child(2) {
        flex-shrink: 0;
    }

.contextMenu .priorityfield {
    display: block;
    padding: 5px;
    margin-bottom: 20px;
}

    .contextMenu .priorityfield > select {
        margin-right: 2em;
        margin-left: 0.5em;
        padding-left: 0.2em;
        padding-right: 0.2em;
        background-color: white;
        border-radius: 1ex;
        border: 1px solid #069080;
        font-family: 'Nunito', sans-serif;
        font-weight: bold;
        outline: none;
    }

.contextOption {
    display: flex;
    padding: 5px;
    border: 1px solid #000;
    margin-bottom: 10px;
    border-radius: 1em;
    font-size: 9pt;
}
.contextOption strong {
    font-size: 11pt;
}

.contextOption.template{
    display: none;
}

.contextMenu .contextOption img {
    max-width: 40px;
    max-height: 40px;
}

.contextMenu .contextOption > :first-child {
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    margin-right: 7px;
    align-self: center;
}

.contextMenu .contextOption > :nth-last-child(2) {
    flex-grow: 1;
}
.contextMenu .contextOption div[name='incompatibleUpgrades'] {
    margin-top: 1em;
}
.contextMenu .contextOption div[name='incompatibleUpgrades'] img {
    position: relative;
    height: 1em;
    top: 0.2em;
}
.contextMenu .contextOption .unlockInfo img {
    position: relative;
    height: 1em;
    top: 0.2em;
}

.contextOption button {
    border: 1px solid #069080;
    border-radius: 1em;
    font-family: 'Nunito', sans-serif;
    outline: none;
    padding: 5px;
    box-shadow: #777 0 2px;
    margin-bottom: 2px;
}
    .contextOption button:hover {
        border: 2px solid #069080;
    }
    .contextOption button:active:not(:disabled) {
        border: 2px solid #069080;
        background-color: #069080;
        color: white;
        outline: none;
        box-shadow: none;
        margin-top: 2px;
        margin-bottom: 0;
    }
    .contextOption button:disabled {
        border: 1px solid #ff52ba;
        background-color: #ddd;
        color: #777;
    }
.contextMenu .contextOption > button:last-child {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    margin-left: 7px;
    min-height: 4em;
}

.contextOption.locked {
    color: #444;
    background-color: #ddd;
}
.contextOption.locked > :first-child img {
    filter: opacity(50%);
}
.contextOption.locked strong {
    text-decoration: line-through;
}
.contextOption .unlockInfo {
    color: red;
    font-weight: bold;
}
.contextOption:not(.locked) .unlockInfo {
    display: none;
}

#muteButton {
    width: 44px;
    height: 44px;
    border: 1px solid #069080;
    border-radius: 1em;
    box-shadow: #444 0 2px;
    outline: none;
    fill: #444;
    margin-bottom: 2px;
    margin-right: 1.5em;
}
    #muteButton:hover:not(:disabled) {
        fill: #069080;
    }
    #muteButton:active:not(:disabled) {
        box-shadow: none;
        margin-top: 2px;
        margin-bottom: 0;
    }
    #muteButton svg {
        height: 3ex;
        margin-top: 0.6ex;
    }
    #muteButton svg:first-child {
        height: 4ex;
        position: relative;
        left: 1px;
    }

#messagebox {
    font-family: 'Courier New', Courier, monospace;
    background: black;
    color: #ff52ba;
    border-radius: 1ex;
    padding: 1em;
}

/* Upplåsningsanimation */
@keyframes flash {
    0% {
        background-color: initial;
        border-color: initial;
        color: initial;
        box-shadow: initial;
    }
    10% {
        background-color: #069080;
        border-color: #069080;
        color: white;
        box-shadow: #069080 0 0 1em;
    }
    100% {
        background-color: initial;
        border-color: initial;
        color: initial;
        box-shadow: initial;
    }
}
.unlocked {
    animation-name: flash;
    animation-duration: 2s;
}