@font-face {
    font-family: 'icomoon';
    src:url('../../res/icomoon.eot?xewvs9');
    src:url('../../res/icomoon.eot?xewvs9#iefix') format('embedded-opentype'),
        url('../../res/icomoon.ttf?xewvs9') format('truetype'),
        url('../../res/icomoon.woff?xewvs9') format('woff'),
        url('../../res/icomoon.svg?xewvs9#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
}

/***************
 * MAIN LAYOUT *
 ***************/

body, html {
    height: 100%;
    font-family: 'Open Sans', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    position: relative;
    overflow: hidden;
    cursor: default !important;
}

#main {
    width: 500px;
    height: 540px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -270px 0 0 -250px;
    text-align: center;
}

#units {
    width: 240px;
    display: inline-block;
}

#stats {
    position: relative;
    margin-left: 50px;
    display: inline-block;
}

#hp, #other {
    width: 440px;
    display: inline-block;
    text-align: center;
}

#hp {
    margin: 30px auto 0 auto;
}

#hp-cell {
    cursor: pointer;
}

#turns + #hp {
    margin-top: 15px;
}

#turns {
    margin-top: 30px;
}

#other {
    margin: 20px auto 0 auto;
}

#other > button {
    width: 40px;
}

#transient {
    width: 440px;
    padding: 5px;
    margin: 5px auto 0 auto;
    cursor: pointer;
}

@media (hover) {
    #transient:hover {
        background-color: #FF9E9E;
        border-color: #EC92A0;
    }
}

#transient > span {
    text-decoration: underline;
    cursor: help;
}

#transient-explanation {
    padding: 10px;
}

.animated {
    animation-duration: 0.5s !important;
    -webkit-animation-duration: 0.5s !important;
}

#instructions {
    padding-left:10px
}

#instructions > ul {
    list-style-type: none;
    margin-left: 15px;
}


/******************
 * MAIN UNIT PANE *
 ******************/

.unit {
    width: 112px;
    height: 112px;
    cursor: pointer;
    border: 1px solid black;
    margin: 4px 4px 0 0 !important;
    text-align: center;
    position: relative;
    display: inline-block;
    float: left;
}

.empty {
    border-style: dashed !important;
    opacity: 0.5;
}

@media (hover) {
    .empty:hover {
        border-color: black;
        opacity: 1 !important;
    }
}

.unit:not(.slide) > :not([class]) {
    display: none !important;
}

.unitPlaceholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.unitContainer, .unitContainer + .ghostContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: -1px;
    left: -1px;
    z-index: 1;
}

.unitPortrait {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    background-repeat: no-repeat;
    background-size: 112px 112px;
}

.unitLevel {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 70%;
    font-weight: bold;
    padding: 1px;
    outline: 1px solid black;
    background-color: white;
    cursor: pointer;
    z-index: 4;
}

@media (hover) {
    .unitLevel:hover {
        background: lightcoral;
    }
}

.unitLevel > input {
    width: 100%;
    height: 100%;
}

.unit > :not([class]) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    padding-top: 25px;
    z-index: 5;
}

.unitSlider, candySlider {
    text-shadow: 0 0 black, 0 1px black, 1px 0 black, 1px 1px black, 0 -1px black, -1px 0 black, -1px -1px black;
    cursor: default;
}

#captain {
    border-color: red !important;
}

#captain:not(.empty) {
    border: 1px solid red !important;
}

#friend {
    border-color: orange !important;
}

#friend:not(.empty) {
    border: 1px solid orange !important;
}

.unitContainer.gray > .unitOrb, .ghostContainer.gray > .unitOrb {
    opacity: 1;
}

.unitContainer.gray > .unitPortrait, .ghostContainer.gray > .unitPortrait,
.unitContainer.gray > .unitOrb, .ghostContainer.gray > .unitOrb,
.slide .unitPortrait {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    opacity: 0.5;
}

.ghosted .unitContainer {
    display: none;
}

.unitChain {
    width: 100%;
    height: 100%;
    background-image: url('../res/chain.png');
    position: absolute;
    top: 1px;
    left: 1px;
    pointer-events: none;
    display: none;
}

.unitSilence {
    position: absolute;
    top: 32px;
    right: 7px;
    width: 32px;
    height: 20px;
    background-image: url("../res/silence.png");
    background-size: 32px 20px;
    display: none;
    pointer-events: none;
}

.unitRemoved {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
    font-size: 100px;
    line-height: 0px;
    color: darkred;
}

.unitChain.active, .unitSilence.active, .unitRemoved.active {
    display: block;
}

#removeZone {
    line-height: 150%;
}

.picking .unitContainer {
    z-index: 102 !important;
}

.picking .ribbon-container {
    z-index: 103 !important;
}

/******************
 * DAMAGE NUMBERS *
 ******************/

.damage {
    border-radius: 5px;
    width: 150px;
    text-align: center;
    padding: 5px;
}

.damage:last-child {
    margin-bottom: 0 !important;
}

.damage.STR, li.STR, [current-type="STR"] > div { background: salmon; }
.damage.QCK, li.QCK, [current-type="QCK"] > div { background: lightskyblue; }
.damage.DEX, li.DEX, [current-type="DEX"] > div { background: lightgreen; }
.damage.PSY, li.PSY, [current-type="PSY"] > div { background: gold; }
.damage.INT, li.INT, [current-type="INT"] > div { background: orchid; }

.damageLabel {
    font-size: 75%;
}

.damageAmount {
    font-size: 150%;
    font-weight: bold;
    display: block;
}

.damageDealer, .onTurn {
    width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/********************
 * BUTTONS & HP BAR *
 ********************/

#hpSlider, #turnSlider, #healSlider, #semlaSlider, #damageSlider, #rcvSlider, #basehpSlider, #dmgreductionSlider, #carrychainSlider {
    width: 350px;
    height: 12px;
    display: inline-block;
}

#turnSlider, #healSlider, #semlaSlider, #damageSlider, #rcvSlider, #basehpSlider, #dmgreductionSlider, #carrychainSlider {
    width: 300px;
}

#turns > .noUi-connect {
    background: orchid;
}

#heals > .noUi-connect {
    background: green;
}

#rcvs > .noUi-connect {
    background: rgb(216, 85, 14);
}

#basehps > .noUi-connect {
    background: green;
}

#semla > .noUi-connect {
    background: lemonchiffon;
}

#damages > .noUi-connect {
    background: darkred;
}

#dmgreductions > .noUi-connect {
    background: linear-gradient(90deg,#fa8072,#ffd700,#90ee90,#87cefa, #da70d6);
}

#carrychains > .noUi-connect {
    background: linear-gradient(90deg,#ffcc00, #ffcc00, #eb5800);
}

.noUi-handle {
    width: 24px !important;
    height: 18px !important;
    top: -4px !important;
}

.noUi-handle:before {
    left: 9px !important;
    top: 3px !important;
    height: 10px !important;
}

.noUi-handle:after {
    left: 11px !important;
    top: 3px !important;
    height: 10px !important;
}

#hp-rcv {
    width: 100%;
    margin-top: 10px;
}

#hp-rcv > table {
    width: 100%;
}

#hp-rcv td:first-child {
    text-align: right;
    padding-right: 2px;
    width: 50%;
}

#hp-rcv td:last-child {
    text-align: left;
    padding-left: 2px;
    width: 50%;
}

.btn-settings, .btn-settings:focus {
    background: #555;
    color: white;
}

@media (hover) {
    .btn-settings:hover {
        background: #444;
        color: white;
    }
}

.btn-orchid {
    color: white;
    background: orchid;
}

@media (hover) {
    .btn-orchid:hover {
        color: white;
        background: mediumorchid;
    }
}

#other > :not(:last-child) {
    margin-right: 5px;
}

#urlContainer {
    margin-top: 10px;
    height: 0;
    overflow: hidden;
    transition: height 0.25s linear;
}

#urlContainer.visible {
    height: 40px;
}

#urlContainer > input {
    width: 350px;
}

#abilitySummary {
    cursor: help;
}

/*******************
 * SLOT THUMBNAILS *
 *******************/

.slot {
    display: inline-block;
    cursor: pointer;
}

@media (hover) {
    .slot:not(.nohover):hover {
        outline: 1px solid red;
    }
}

.slot.big {
    width: 112px;
    height: 112px;
    background-size: 112px 112px;
    margin: 4px;
}

.slot.medium {
    width: 80px;
    height: 80px;
    background-size: 80px 80px;
    margin: 2px;
}

.slot.small {
    width: 40px;
    height: 40px;
    background-size: 40px 40px;
    margin: 1px;
}

/***********
 * SIDEBAR *
 ***********/

#menu {
    position: fixed;
    top: 0px;
    left: -20.9em;
    width: 20.9em;
    height: 100%;
    transition: left .1s linear;
    margin-bottom: 0;
    overflow-y: scroll;
    overflow-x: hidden;
}

#menu.open {
    left: 0em;
}

#defense {
    width: 60px;
    margin-left: 10px;
    position: relative;
    bottom: 1px;
}

#sliderToggle[status="0"]:after { content: "레벨 슬라이더: 허용"; }
#sliderToggle[status="1"]:after { content: "레벨 슬라이더: 비허용"; }

nav.panel {
    position: fixed;
    left: -16.625em;
    width: 16.625em;
    background: #2C3E50;
}

#menu li > div {
    display: block;
    padding: 0.8em;
    color: white;
    text-align: left;
    font-size: 11pt;
    -webkit-transition: background 0.1s linear;
       -moz-transition: background 0.1s linear;
            transition: background 0.1s linear;
}

@media (hover) {
    #menu li > div:not(.menuIcon):not(#specialDivider):not(#supertypeContainer):not(#superclassContainer):hover {
        background: #688aac;
        color: white !important;
        cursor: pointer;
    }
}

ul { padding-left: 0; }

#menu li {
    list-style: none;
    border-bottom: 2px solid #34495D;
    position: relative;
}

#menu li i {
    margin-right: 5px;
}

#menu li button {
    color: black;
}

input {
    color: black;
}

.width-12 { width: 100%; }
.width-7 { width: 58.33%; }
.width-6 { width: 50%; }
.width-5 { width: 41.66%; }
.width-4 { width: 33.33%; }
.width-3 { width: 25%; }

#specialDivider {
    padding: 5px !important;
    text-align: center;
    background: #cdd8e4;
    color: black !important;
    cursor: default;
}

li.STR > div, li.QCK > div, li.DEX > div, li.PSY > div, li.INT > div {
    color: black !important;
}

#supertypeContainer {
    padding: 0em !important;
    background-color: white;
}

#supertypeContainer > input {
    display: none;
}

.supertype {
    border: none;
    display: inline-block;
    text-align: center;
    color: black;
    cursor: pointer;
    opacity: 0.3;
    margin-bottom: 0;
    padding-top: 2.5px;
    padding-bottom: 2.5px;
}

#superclassContainer {
    padding: 0em !important;
    background-color: white;
}

#superclassContainer > input {
    display: none;
}

.superclass {
    border: none;
    display: inline-block;
    text-align: center;
    color: black;
    cursor: pointer;
    opacity: 0.3;
    margin-bottom: 0;
    padding-top: 2.5px;
    padding-bottom: 2.5px;
}

.supertype.STR       { background: salmon; }
.supertype.QCK       { background: lightskyblue; }
.supertype.DEX       { background: lightgreen; }
.supertype.PSY       { background: gold; }
.supertype.INT       { background: orchid; }
.superclass.Fighter       { background: #FF0C2A; }
.superclass.Slasher       { background: #31E7FF; }
.superclass.Striker       { background: #2356F6; }
.superclass.Shooter       { background: #C318FF; }
.superclass.FreeSpirit       { background: #FFB841; }
.superclass.Driven       { background: #FF11CA; }
.superclass.Cerebral       { background: #5AFF38; }
.superclass.Powerhouse       { background: #FA5B12; }
.superclass.Evolver       { background: Peru; }
.superclass.Booster       { background: Peru; }

@media (hover) {
    .supertype:hover {
        opacity: 1;
    }

    .superclass:hover {
        opacity: 1;
    }
}

input:checked + .supertype {    
    font-weight: bold;
    text-decoration: underline;
    opacity: 1;
}

input:checked + .superclass {    
    font-weight: bold;
    text-decoration: underline;
    opacity: 1;
}

#enemySuperTypeContainer > input + span {
    padding: 4px
}

li.disabled {
    visibility: hidden;
    height: 0px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border-width: 0 !important;
}

.menuIcon {
    position: absolute;
    left: 7px;
    top: 15px;
    padding: 0;
    width: 20px;
    height: 20px;
}

.special > div, #profileContainer {
    width: 270px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

li.locked > div {
    cursor: not-allowed !important;
    opacity: 0.5;
}

li > div > a {
    color: white !important;
    text-decoration: none !important;
}

#gather {
    background-color: crimson;
}

.profiled {
    background-color: orchid;
}

li input {
    color: black;
    background: white;
}

nav > li > div {
    position: relative;
    margin-left: -1px;
}

@media (hover) {
    .comodity:hover {
        color: red;
    }
}

/***********
 * RIBBONS *
 ***********/

.ribbon-container {
    width: 53px;
    height: 55px;
    overflow: hidden;
    position: absolute;
    top: -3px;
    right: -3px;
}

.corner-ribbon {
    color: white;
    font-size: 10px;
    left: -2px;
    padding: 3px 0;
    position: relative;
    text-align: center;
    top: 8px;
    width: 75px;
    z-index: 7;
    /* wizardry */
    -webkit-box-shadow : 0px 0px 3px rgba(0,0,0,0.3);
    -moz-box-shadow    : 0px 0px 3px rgba(0,0,0,0.3);
    box-shadow         : 0px 0px 3px rgba(0,0,0,0.3);
    -moz-transform     : rotate(45deg);
    -ms-transform      : rotate(45deg);
    -o-transform       : rotate(45deg);
    -webkit-transform  : rotate(45deg);
}

.corner-ribbon:before, .corner-ribbon:after {
    content: "";
    border-top:   3px solid #6e8900;   
    border-left:  3px solid transparent;
    border-right: 3px solid transparent;
    position:absolute;
    bottom: -3px;
}

.corner-ribbon:before {
    left: 0;
}
.corner-ribbon:after {
    right: 0;
}

.corner-ribbon.red {
    background: #e43;
}

.corner-ribbon.orange {
    background: #e82;
}

/**********
 * POPUPS *
 **********/

.popup {
    position: absolute;
    height: 100%;
    width: 100%;
    display: table;
    z-index: 100;
}

.popup:not(.visible) {
    display: none;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.65);
    z-index: 100;
}

.inner-container {
    position: relative;
    display: table-cell;
    width: 100%;
    height: 100%;
    vertical-align: middle;
    z-index: 101;
}

.custom-modal {
    position: relative;
    z-index: 101;
    width: 705px;
    margin: auto;
}

#quickpick-modal {
    max-width: 405px;
}

#quickpick-modal > .modal-dialog {
    max-width: 405px;
}

#quickpick-modal .modal-body {
    height: 300px;
}

.modal-dialog {
    width: 705px;
}

.modal-content {
    border-radius: 0;
}

.modal-header {
    background-color: #428bca;
    color: white;
}

.modal-header a {
    color: white;
}

.modal-footer {
    background-color: rgb(235,235,235);
}

.animated {
    animation-duration: 0.2s;
    -webkit-animation-duration: 0.2s;
}

.modal-filter {
    width: 100%;
}

.modal-div:not(.slim) {
    height: 340px;
    overflow: auto;
}

.modal-div.tiny {
    height: 42px;
};

.modal-div td {
    padding-left: 5px;
}

.modal-div table {
    width: 100%;
}

.modal-div th {
    padding: 10px 0 10px 0;
}

.modal-div .to-the-right {
    text-align: right;
}

.modal-div.padded {
    padding: 10px;
}

#recent > span {
    border-bottom: 1px solid black;
    display: block;
}

#recentUnits {
    height: 42px;
    margin-top: 5px;
}

@media (hover) {
    #defense-table tbody > tr:hover,
    #defense-table tbody > td:hover,
    #ship-table tbody > tr:hover,
    #ship-table tbody > td:hover,
    #profile-table tbody > tr:hover,
    #profile-table tbody > td:hover,
    #slot-table tbody > tr:hover,
    #slot-table tbody > td:hover {
        background-color: rgba(200,200,200,0.3);
        cursor: pointer;
    }
}

.help {
    cursor: help;
}

.popover-content {
    color: black;
    font-size: 90%;
}

.popover {
    width: 400px !important;
    max-width: 400px;
}

.popover ul {
    padding-left: 15px;
    margin-bottom: 0;
}

#profile-table td:nth-child(2) {
    white-space: nowrap;
}

#profile-table td ~ td,
#profile-table th ~ th {
    padding-left: 10px;
}

#ship-table tr:not(:first-child) {
    border-top: 1px solid lightgray;
}

.ship-name {
    white-space: normal;
    padding: 0 10px 0 10px;
}

.ship-icon {
    margin: 0;
    padding: 0;
}

.ship-icon > div {
    vertical-align: middle;
}

.padded-picker {
    margin-bottom: 2px;
}

.floatThead-table tr > th {
    background: white;
}

#saveslot .alert {
    margin-bottom: 0;
}

#labelContainer {
    padding: 20px 10px 10px 10px;
    text-align: center;
}

#labelContainer > :first-child {
    margin-right: 25px;
}

#slot-dialog {
    width: 400px;
}

.outerSlotContainer {
    position: relative;
}

.slotContainer {
    position: fixed;
    width: 100%;
    height: 33px;
}

/********
 * SHIP *
 ********/

#ship-background {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#ship > :not(#ship-background) {
    position: relative;
    z-index: 1;
}

/**************
 * CANDY MODE *
 **************/

.modal-body > .slot ~ :not([class]) {
    position: relative;
}

.unitContainer:not(.empty) {
    z-index: 3;
}

.middle-backdrop {
    z-index: 1;
}

.candyContainer {
    display: inline-block;
    position: relative;
}

.candySlider {
    margin-top: 28px !important;
}

.candyCurrent {
    display: block;
}

#candySliders {
    text-align: center;
}

#candySliders > div {
    margin: 0 10px 0 10px;
}

.candyLabel {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
    font-size: 11px;
}

.unitCandies {
    position: absolute;
    top: 5px;
    right: 40px;
    z-index: 4;
    font-weight: bold;
    color: gold;
    pointer-events: none;
    text-shadow: 0 0 black, 0 2px black, 2px 0 black, 2px 2px black, 0 -2px black, -2px 0 black, -2px -2px black,
                 0 0 black, 0 1px black, 1px 0 black, 1px 1px black, 0 -1px black, -1px 0 black, -1px -1px black;
}

.unitSailor {
    position: absolute;
    width: 19px;
    height: 21px;
    bottom: -1px;
    z-index: 4;
    font-size: 9pt;
    color: powderblue;
    border: 2px solid gold;
    border-left: 1px solid black;
    border-radius: 4px;
    background-color: SteelBlue;
    pointer-events: none;
    text-shadow: 2px 0 0 #003366, -2px 0 0 #003366, 0 2px 0 #003366, 0 -2px 0 #003366, 1px 1px #003366, -1px -1px 0 #003366, 1px -1px 0 #003366, -1px 1px 0 #003366;
    box-shadow: inset 0px 0px 1px blue, 0px 0px 1px blue;
}

.unitAbilities {
    width: 20px;
    height: 20px;
    position: absolute;
    bottom: 23px;
    left: 7px;
    z-index: 4;
    font-weight: bold;
    color: black;
    background: mistyrose;
    border-radius: 50%;
    box-shadow: 0 0 0 1pt black;
}

@media (hover) {
    .unitAbilities:hover {
        background: lightcoral;
    }
}

.candySlider {
    width: 50px !important;
    height: 27px !important;
    margin-left: -81px !important;
    margin-top: 33px !important;
    border-radius: 10px;
    font-size: 22px !important;
}

.candySlider:focus, .candySlider:active {
    outline: none !important;
}

.candyContainer:nth-child(2) .candySlider {
    border: 1px solid #fcac68 !important;
}

.candyContainer:nth-child(3) .candySlider {
    border: 1px solid #fb6f64 !important;
}

.candyContainer:nth-child(4) .candySlider {
    border: 1px solid #7feb9f !important;
}

#quickPicker {
    width: 100%;
    height: 100%;
}

.quickpick-icon {
    width: 24px;
    height: 24px;
}

/***********
 * POPOVER *
 ***********/

.popover {
    width: 350px;
}

 body > .popover.bottom {
    display: none !important;
}


.popover-data {
    font-size: 90%;
}

.popover-data table {
    margin: 0;
}

.popover-data td {
    width: 25%;
    padding: 4px !important;
}

.popover-data .header > td {
    font-weight: bold;
}

body > .popover .popover-content {
    padding: 0;
}

.popover-data .STR   { background: salmon; }
.popover-data .QCK   { background: lightskyblue; }
.popover-data .DEX   { background: lightgreen; }
.popover-data .PSY   { background: gold; }
.popover-data .INT   { background: orchid; }
.popover-data .RCV   { background: darkgoldenrod; }
.popover-data .TND   { background: peru; }
.popover-data .BLOCK { background: darkslateblue; }
.popover-data .BOMB  { background: maroon; }
.popover-data .SEMLA  { background: saddlebrown; }
.popover-data .RAINBOW { background: linear-gradient(90deg,#fa8072,#ffd700,#90ee90,#87cefa, #da70d6); }
.popover-data .G     { background: orange; }

.block-icon:before, .tnd-icon:before {
    font-style: normal;
    font-weight: normal;
    font-family: icomoon;
    font-size: 11px;
    position: relative;
    top: 1px;
}

.block-icon:before {
    content: "\e902";
}

.tnd-icon:before {
    content: "\e903";
}

.mini-type {
    color: white;
    border-radius: 10px;
    display: inline-block;
    width: 35px;
    text-align: center;
}

.notes {
    font-size: 80%;
}

.notes:before {
    content: "NOTES: ";
    font-weight: bold;
    color: gray;
}

.cooldown:before {
    content: "Cooldown: ";
}

/**********
 * IMAGES *
 **********/

#canvasContainer {
    text-align: center;
}

#canvas {
    border: 1px solid black;
}

/******************
 * MOBILE SUPPORT *
 ******************/

@media only screen and (max-width: 768px) {

    html, body {
        transition: left .1s linear;
    }

    .custom-modal {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 300;
    }

    .modal-dialog {
        width: 100%;
        height: 100%;
        margin: 0 !important;
    }

    .shifted #main {
        margin-left: 0;
        left: 17.5em;
    }

    .unitLevel {
        font-size: 100%;
    }

    .popover:not([title="Active Abilities"]) {
        display: none !important;
    }

    .noUi-handle {
        width: 36px !important;
        height: 27px !important;
        top: -8px !important;
    }

    .noUi-handle:before {
        left: 15px !important;
        top: 6px !important;
        height: 10px !important;
    }

    .noUi-handle:after {
        left: 17px !important;
        top: 6px !important;
        height: 10px !important;
    }

}

