
#loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Add animation to "page content" */
.animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 0.5s;
    animation-name: animatebottom;
    animation-duration: 0.5s
}

@-webkit-keyframes animatebottom {
    from {
        bottom: -100px;
        opacity: 0
    }

    to {
        bottom: 0px;
        opacity: 1
    }
}

@keyframes animatebottom {
    from {
        bottom: -100px;
        opacity: 0
    }

    to {
        bottom: 0;
        opacity: 1
    }
}

body {
    min-width: 680px
}

body {
    font-family: Verdana;
    font-size: small;
    color: #000;
}

/* Remove controls from Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

    /* Remove controls from Safari and Chrome */
input[type='number']:hover::-webkit-inner-spin-button,
input[type='number']:hover::-webkit-outer-spin-button,
input[type='number']:default::-webkit-inner-spin-button,
input[type='number']:default::-webkit-outer-spin-button,
input[type='number']:disabled::-webkit-inner-spin-button,
input[type='number']:disabled::-webkit-outer-spin-button,
input[type='number']:enabled::-webkit-inner-spin-button,
input[type='number']:enabled::-webkit-outer-spin-button,
input[type='number']:focus::-webkit-inner-spin-button,
input[type='number']:focus::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0; /* Removes leftover margin */
}

.clear {
    clear: both;
    display: block;
    overflow: hidden;
    visibility: hidden;
    width: 0;
    height: 0
}

.clearfix:before, .clearfix:after, .container_12:before, .container_12:after, .container_16:before, .container_16:after {
    content: '.';
    display: block;
    overflow: hidden;
    visibility: hidden;
    font-size: 0;
    line-height: 0;
    width: 0;
    height: 0
}

.clearfix:after, .container_12:after, .container_16:after {
    clear: both
}

.clearfix, .container_12, .container_16 {
    zoom: 1
}


#header div {
    height: 171px;
    border-radius: 4px;
    background: url('/img/anno2070logo.jpg');
}

h1 {
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

    h1 .alpha {
        font-size: 10px;
        font-weight: normal;
        color: #FF0000;
    }

.table td {
    display: table-cell;
    vertical-align: middle;
}

.table-fixed {
    table-layout: fixed;
}

.table-fixed tr td {
    text-align: center;
}

.table-fixed tr td:first-child{
    text-align: left !important;
}

.table-fixed tr td:last-child {
    text-align: right !important;
}


.modal-xl {
    max-width: 1450px;
}

.dismiss {
    color: #222;
    cursor: pointer;
}

nav {
    position: fixed !important;
    width: 100%;
    z-index: 1000;
    margin-top: -1rem;
    padding: 0 .5rem!important;
}

.bg-dark nav {
    border-bottom: 1px solid #222;
}

.icon-navbar {
    margin: -.125rem;
    width: 1.5rem;
    height: 1.5rem;
}

.ui-fieldset {
    border-top: 1px solid #CECECE;
    margin: 15px;
    margin-bottom: 20px;
}

.ui-fieldset legend {
    font-weight: bold;
    color: #000;
    font-size: unset;
    width: unset;
    padding-right: 5px;
}



.ui-fchain-item {
    float: left;
    width: 130px;
    margin-bottom: 10px;
    margin-right: -1px;
    border: 1px solid #00000031;
    border-radius: 4px;
    padding: 10px;
}

.ui-service-building-item {
    float: left;
    height: 180px;
    width: 130px;
    margin-bottom: 10px;
    margin-right: -1px;
    border: 1px solid #00000031;
    border-radius: 4px;
    padding: 10px;
}

.ui-service-building-item.no-name {
    height: calc(180px - 2rem);
}

.bottom-button {
    margin-left: -10px;
    margin-right: -10px;
}

.bottom-button button {
    height: 1.6rem;
    padding: 0.125rem;
}

.ui-fchain-item-small {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 12rem;
}

.ui-fchain-item-xl {
    width: 30rem;
    height: unset;
}

    .ui-fchain-item.danger {
        border-color: #FF0000;
        background-color: #FFBBBB;
    }

.ui-fchain-item-tr-button {
    margin-left: calc(100% - 1.25rem);
}

    .ui-fchain-item-tr-button div {
        position: absolute;
        margin-top: -10px;
    }

        .ui-fchain-item-tr-button div .btn-light {
            background-color: rgba(248, 249, 250, 0.5);
            border-color: rgba(248, 249, 250, 0.5);
        }

        .ui-fchain-item-tr-button div .btn-dark {
            background-color: rgba(52, 58, 64, 0.5);
            border-color: rgba(52, 58, 64, 0.5);
        }

.ui-fchain-item-tr-checkbox {
    display: flex;
    justify-content: flex-end;
    margin-right: -10px;
}

    .ui-fchain-item-tr-checkbox div {
        position: absolute;
        margin-top: -15px;
        margin-right: -0.5rem;
    }

.ui-fchain-item-icon {
    text-align: center;
    margin-top: 5px;
}

.ui-fchain-item-icon-replacement {
    text-align: center;
    margin-top: 5px;
    display: flex;
    justify-content: space-evenly;
}

.ui-fchain-item-name {
    font-size: 12px;
    text-align: center;
    /*word-wrap: break-word;*/
    height: 2rem;
}

.float-right + .ui-fchain-item {
    max-width: calc(100% - 16px);
}

.ui-fchain-item-attribute-group {
    display: flex;
    flex-flow: column;
    height: 6rem;
    justify-content: space-between;
    margin: -0.75rem 0rem;
}

.ui-fchain-item-attribute-group .mb-3 {
    margin-bottom: 0rem !important;
}

.ui-fchain-item-boost {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.ui-fchain-item-count {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.ui-fchain-item-amount {
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
}

.ui-fchain-item-module {
    flex-flow: row;
    display: flex;
}

.ui-fchain-item-extra-input {
    padding-top: 5px;
    margin-bottom: -10px;
}

.ui-fchain-item-load {
    font-size: 10px;
    margin-top: 5px;
    text-align: center;
}

.ui-fchain-item-loadbar {
    height: 6px;
    margin: 2px 14px 0 14px;
    border: 1px solid #000;
}

.ui-fchain-spacer {
    float: left;
    color: #CECECE;
    font-size: 30px;
    margin: auto 25px;
    line-height: 115px;
}

.ui-replacement-spacer {
    color: #CECECE;
    font-size: initial;
    line-height: 30px;
}

.ui-tier-unit {
    float: left;
    margin-right: 15px;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.ui-tier-icon {
    float: left;
    margin-right: 12px;
}

.ui-tier-unit-name {
    font-weight: bold;
}

.ui-tier-unit input {
    width: 80px;
    border: 1px solid #CECECE;
    border-radius: 4px;
    height: unset;
    padding: 0;
}

#nav {
    text-align: center;
    margin-top: 10px;
}

    #nav ul li {
        display: inline;
        margin-right: 10px;
    }

    #nav a, #nav a:active, #nav a:hover, #nav a:visited {
        color: blue;
        text-decoration: underline;
    }

.center {
    text-align: center;
}

.right {
    float: right;
}

.hspacer15 {
    margin-top: 15px;
}

.fleft {
    float: left;
}

#footer {
    color: #CECECE;
}

.input-group-short {
    max-width: 10rem;
    float: right;
}

.input-group-medium {
    max-width: 12rem;
    float: right;
}

.spinner input {
    text-align: right;
}

.input-group-btn-vertical {
    position: relative;
    white-space: nowrap;
    vertical-align: middle;
    display: table-cell;
}

    .input-group-btn-vertical > .btn {
        display: block;
        float: none;
        width: 100%;
        max-width: 100%;
        padding: 9px;
        margin-left: -1px;
        position: relative;
        border-radius: 0;
        background-color: #e9ecef;
        border: 1px solid #ced4da;
    }

.input-group-sm .input-group-btn-vertical > .btn {
    padding: 8px;
}

div:last-child > .input-group-btn-vertical, div:last-child > .input-group-btn-vertical > .btn:first-child {
    border-top-right-radius: .2rem;
}

.input-group-sm .input-group-btn-vertical > .btn:last-child {
    margin-top: -3px;
}

.input-group-btn-vertical > .btn:last-child {
    margin-top: 0px;
}

div:last-child > .input-group-btn-vertical, div:last-child > .input-group-btn-vertical > .btn:last-child {
    border-bottom-right-radius: .2rem;
    
}

.input-group-btn-vertical i {
    position: absolute;
    top: 0;
    left: 4px;
}

.input-group-sm .input-group-btn-vertical i {
    position: absolute;
    top: 0;
    left: 3px;
    margin-top: -1px;
}

.input-group-sm .icon-sm {
    width: 20px;
    height: 20px;
}

.input-group {
    flex-wrap: unset;
}

.form-control {
    padding: 0.25rem;
}

.input-group-text {
    padding: 0.25rem !important;
}

.input-group-sm .input-group-text {
    padding: 0.25rem !important;
}

.ui-tier-unit .form-control {
    width: 6rem;
}

.input-group-text {
    font-size: 0.7rem;
}

p {
    margin-bottom: unset;
}


.collapsible-section {
    border-top: 1px solid #CECECE;
    margin-top: 1.5rem !important;
}

.collapsible-section legend {
    font-weight: bold;
    color: #000;
    font-size: initial;
    width: unset;
    padding-right: 5px;
}

/*
.collapser .custom-control-label::before,.collapser .custom-control-label::after {
    top: .1rem;
}*/

.collapser .summary {
    width: calc(100% - 2rem);
    position: absolute;
}

.collapser .summary>*{
    background-color: white;
    padding-left: 10px;
    float: right !important;
}

.bg-dark .collapser .summary > * {
    background-color: #343a40 !important;
}

.collapser {
    cursor: pointer;
}

.collapser > .fa {
    display: none;
}

.collapsed > .fa-chevron-right {
    display: inline;
}

:not(.collapsed) > .fa-chevron-down {
    display: inline;
}

input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

input[type=number]::-webkit-inner-spin-button {
    -moz-appearance: textfield;
    appearance: textfield;
    margin: 0;
}

.icon-tile {
    width: 50px;
    height: 50px;
}

.icon-sm {
    width: 25px;
    height: 25px;
}

.superscript-icon {
    vertical-align: bottom;
    height: 20px;
    width: 20px;
    position: absolute;
    margin-left: -68px;
}

.inactive {
    color: grey;
}

.inactive img {
    filter: grayscale(100%);
}

.strike-through {
    position: relative;
    display: inline-block;
}

.strike-through::after {
    position: absolute;
    content: "";
    left: 0;
    top: 33%;
    right: 0;
    border-top: 3px solid;
    border-top-color: currentcolor;
    border-color: #CECECE;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.help {
    float: right;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    filter: alpha(opacity=20);
    opacity: .2;
    cursor: pointer;
    background: 0 0;
    border: 0;
}

.bg-dark .help {
    color: #f8f9fa;
}

#help-dialog p, #help-dialog span {
    text-align: justify;
}

.danger-icon {
    position: absolute;
    color: red;
    z-index: 500;
    margin: 2px;
}

.inline-list {
    display: flex;
    flex-flow: wrap;
    justify-content: left;
    align-items: center;
}

.inline-list-centered {
    display: flex;
    flex-flow: wrap;
    justify-content: center;
    align-items: center;
}

.inline-list-stretched {
    display: flex;
    flex-flow: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dlc-list li {
    display: inline-block;
    vertical-align: top;
    width: 32%;
}

.dlc-list li div {
    display: inline-block;
}

/* dark-mode styles */
.bg-darker {
    background: #222;
}

.bg-dark .ui-fchain-item {
    border: 1px solid #222;
}

    .bg-dark .ui-fchain-item.danger {
        border-color: #A66A6A;
        background: #DB7979 !important;
    }

body:not(.bg-dark) .icon-light {
    filter: invert(61.2%) sepia(48%) hue-rotate(168.4deg);
}

.bg-dark .danger-icon {
    color: #CB4141;
}

.bg-dark .table {
    color: #f8f9fa !important;
    border-color: #454d55;
}

.bg-dark .table td{
    border-color: #454d55;
}

.bg-dark .ui-fieldset legend, body.bg-dark {
    color: #f8f9fa !important;
}

.bg-dark .form-control {
    color: #f8f9fa !important;
    background: #222;
}

.bg-dark .custom-select {
    color: #f8f9fa !important;
    background: #222;
}

.bg-dark .input-group-text, .bg-dark .modal-content, .bg-dark .collapsible-section legend {
    color: #f8f9fa !important;
    background: #343a40 !important;
}

.bg-dark .input-group-btn-vertical {
    background: #343a40 !important;
}

.bg-dark .btn-default {
    border-color: #343a40;
    color: #f8f9fa;
}

    .bg-dark .input-group-btn-vertical > .btn {
        background-color: #343a40;
        border: 1px solid #ced4da;
        margin-right: -1px;
    }



.bg-dark .btn-light {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.bg-dark .ui-fchain-item {
    background-color: #343a40 !important;
}

.bg-dark .card {
    background-color: #343a40 !important;
}

.bg-dark .custom-select {
    color: #f8f9fa;
    background: #343a40 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='rgb(248,249,250)' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;
}

.bg-dark .help {
    color: #f8f9fa;
    opacity: 0.5;
    text-shadow: unset;
}

.bg-dark .close {
    color: #f8f9fa;
    opacity: 0.5;
    text-shadow: unset;
}

.bg-dark hr {
    border-color: #f8f9fa;
}


.input-transfer-amount {
    max-width: 16rem
}


.input-group-btn-vertical > .btn:first-child {
    border-bottom: unset;
}

.input-group-btn-vertical > .btn:last-child {
    border-top: unset;
}

.amount-negative {
    color: #DB7979;
}

.amount-positive {
    color: green;
}

/* Tree for production chain */

* {
    margin: 0;
    padding: 0;
}

.tree {
    display: flex;
    flex-flow: row;
    justify-content: center;
}

.tree ul {
	padding-top: 20px; position: relative;
	margin-bottom: 0;
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

.tree li {
    float: left;
	text-align: center;
	list-style-type: none;
	position: relative;
	padding: 20px 5px 0 5px;
	
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

/*We will use ::before and ::after to draw the connectors*/

.tree li::before, .tree li::after{
	content: '';
	position: absolute; top: 0; right: 50%;
	border-top: 1px solid #ccc;
	width: 50%; height: 20px;
}
.tree li::after{
	right: auto; left: 50%;
	border-left: 1px solid #ccc;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.tree li:only-child::after, .tree li:only-child::before {
	display: none;
}

/*Remove space from the top of single children*/
.tree li:only-child{ padding-top: 0;}

/*Remove left connector from first child and 
right connector from last child*/
.tree li:first-child::before, .tree li:last-child::after{
	border: 0 none;
}
/*Adding back the vertical connector to the last nodes*/
.tree li:last-child::before{
	border-right: 1px solid #ccc;
	border-radius: 0 5px 0 0;
	-webkit-border-radius: 0 5px 0 0;
	-moz-border-radius: 0 5px 0 0;
}
.tree li:first-child::after{
	border-radius: 5px 0 0 0;
	-webkit-border-radius: 5px 0 0 0;
	-moz-border-radius: 5px 0 0 0;
}

/*Time to add downward connectors from parents*/
.tree ul ul::before{
	content: '';
	position: absolute; top: 0; left: 50%;
	border-left: 1px solid #ccc;
	width: 0; height: 20px;
}

.tree li shadow{
	border: 1px solid #ccc;
	padding: 5px 10px;
	text-decoration: none;
	display: inline-block;
	
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

.tree > ul > li > div > ul > li {
    margin-bottom: 2rem !important; /* if the tree wraps over liner, add margin to the first line */
}

.tree-node {
    width: 7rem;
}

.tree-node-item-name {
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
}
