/******************** Shop Containers **********************/

#shopItemsWrapper {
    position: relative;
    left: -10px;
    width: calc(100% + 20px);
    text-align: center;
}

#shopItemsContainer,
#goldShopItemsContainer {
    display: inline;
}

/******************** Prices **********************/

.price {
    font-family: Arial black;
    font-size: 1.2em;
}

.price.largeAmount {
    font-size: 0.8em;
}

.currencyIcon {
    display: inline;
    vertical-align: text-top;
    position: relative;
    top: -2px;
    left: 2px;
}

.largeAmount .currencyIcon {
    top: -4px;
    left: 1px;
    width: 22px;
}

/******************** General Shop Items **********************/

.shopItem {
    background: linear-gradient(to bottom, #cccccc, #4d4d4d);
    border-radius: 5px;
    display: inline-block;
    margin: 0 10px 20px;
    padding: 5px 0;
    width: 140px;
    height: 245px;
    box-sizing: border-box;
    position: relative;
    vertical-align: top;
    color: #ffffff;
    text-align: center;
}

.shopItem.withOptions {
    height: 285px;
}

.shopItem .header {
    position: absolute;
    width: 100%;
    font-family: TankTrouble;
    text-shadow: black 0px 1px 2px;
    z-index: 1;
}

.shopItem .preview {
    position: absolute;
    left: -10px;
    top: -10px;
}

.shopItem .purchaseOption {
    width: 100%;
    position: absolute;
    bottom: 0px;
}

.shopItem .quantity {
    font-family: TankTrouble;
    text-shadow: black 0px 1px 2px;
    margin-bottom: 5px;
}

.shopItem .price {
    display: inline-block;
    width: calc(100% - 20px);
    border-radius: 5px;
    background-color: rgba(50, 50, 50, 0.5);
    box-sizing: border-box;
    line-height: 31px;
    height: 31px;
}

.shopItem .options {
    margin-top: 5px;
}

.shopItem .options select {
    width: calc(100% - 20px);
}

.shopItem .soldOut,
.shopItem .unavailable,
.shopItem .countdown {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 180px;
    z-index: 2;
    -webkit-filter: drop-shadow(0px 3px 2px rgba(0,0,0,0.5));
    filter: drop-shadow(0px 3px 2px rgba(0,0,0,0.5));
}

.shopItem svg {
    width: 100%;
    height: 100%;
}

.shopItem svg text {
    font-family: TankTrouble;
    stroke: #000000;
    stroke-width: 1px;
    fill: #ffda00;
    text-anchor: middle;
}

.shopItem .soldOut text {
    font-size: 44pt;
    stroke-width: 2px;
    transform:  translate(93px, 98px) rotate(-70deg);
}

.shopItem .unavailable text {
    font-size: 16pt;
    transform:  translate(80px, 96px) rotate(-70deg);
}

.shopItem .countdown text {
    font-size: 14pt;
    transform:  translate(73px, 150px) rotate(-10deg);
}

.shopItem button {
    margin: 5px 0 10px 0;
    position: relative;
    width: calc(100% - 20px);
}

.shopItem.info button.buy {
    width: calc(100% - 34px - 30px);
    float: left;
    left: 10px;
}

.shopItem.info button.info {
    width: 34px;
    float: right;
    right: 10px;
}


/* When viewport width is 800 we assume we are on a mobile and grow item box size to accommodate bigger font */
@media (max-width: 800px) {
    .shopItem.withOptions {
        height: 260px;
    }
}

/******************** Shop Item Details **********************/

.shopItemDetails {
    text-align: center;
}

.shopItemDetails .details {
    display: inline;
}

.shopItemDetails .purchaseOption {
    position: relative;
}

.shopItemDetails .purchaseOption button {
    width: 120px;
}

.shopItemDetails .description {
    margin-bottom: 15px;
}

.shopItemDetails .countdown {
    font-size: 1.2em;
    margin: 5px;
}

/******************** Shop Item Purchase Details **********************/

.shopItemPurchaseDetails {
    position: relative;
}

.shopItemPurchaseDetails .preview {
    height: 165px;
}

.shopItemPurchaseDetails .preview img {
    display: inline;
}

.shopPurchaseVerticalCentering {
    margin-bottom: 30px;
}

/******************** Shop Item Purchase **********************/

.shopItemPurchaseIcon {
    position: absolute;
    z-index: 10;
}

/******************** Player Panel **********************/

.shop.panelWrapper #playerPanel {
    position: relative;
}
/******************** GENERAL **********************/

.snippet {
	background: linear-gradient(to bottom, #eeeeee, #cccccc);
	border-radius: 5px;
	color: #000000;
	cursor: default;
	display: table;
	position: relative;
	table-layout: fixed;
	text-align: center;
	width: 100%;
	border-spacing: 0;										/* Reset value when used in admin news preview */
}

.snippet .header{
	font-family: TankTrouble;
	padding: 3px 0px 5px 0px;
}

.snippet .content{
    margin: 3px 3px 3px 3px;
}

/******************** INDIVIDUAL SNIPPETS **********************/

#scrapyardSnippet {
	background: #000000;
	color: #ffffff;
	box-sizing: border-box;
	padding: 2px;
}

#scrapyardSnippet .content {
	height: 22px;
	margin-top: 0px;
	margin-right: 4px;
}

#statisticsSnippet {
	background: #eeeeee;
	border-color: #cccccc;
	display: none;
}

#statisticsSnippet .positive {
    color: #7cfc00;
}

#statisticsSnippet .negative {
    color: #ff0000;
}

#wallOfFameSnippet {
	background: #000000;
	cursor: pointer;
	box-sizing: border-box;
	padding: 4px;
}

#wallOfFameSnippet img {
    width: 100%; /* Makes the image the right height in IE */
}

#messagesSnippet {
	cursor: pointer;
}

#messagesSnippet .marker {
	display: none;
	position: absolute;
	left: -16px;
	top: -10px;
}
/******************** jQuery UI select menu **********************/

.ui-menu-item .ui-icon {
    background-image: none;
    width: 26px;
    height: 26px;
}

.ui-selectmenu-button {
    vertical-align: middle;
}

/******************** General Boxes **********************/
.box{
    -webkit-filter: drop-shadow(0px 12px 7px rgba(0,0,0,0.25));
    filter: drop-shadow(0px 12px 7px rgba(0,0,0,0.25));
    position: absolute;
    z-index: 100;

    /* Fix to make drop-shadow filter look correct on Safari on Retina displays */
    -webkit-transform: translateZ(0);

    font-family: Arial;
    font-weight: bold;
    color: #464646;

    text-align: center;
}

.box .content{
    border-radius: 5px;
	background: linear-gradient(to bottom, #cccccc 10%, #999999 90%);
    padding: 5px;
}

.boxbackground{
    background-color: #000000;
    opacity: 0.0;
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.box .spaced{
    padding: 5px;
}

.box button{
    margin: 5px;
}

.box .tab{
	position: absolute;
    z-index: -1;
    width: 34px;
    height: 34px;

    margin: -17px -17px;
}

.box.left .tab.left{
    display: inherit;
}

.box.right .tab.right{
    display: inherit;
}

.box.top .tab.top{
    display: inherit;
}

.box.topRight .tab.topRight{
    display: inherit;
}

.box.bottom .tab.bottom{
    display: inherit;
}


.box .tab.left{
    left: 0;
    top: 35px;
	background: linear-gradient(-45deg, #999999 -400%, #cccccc 90%);
    -webkit-transform: scaleY(0.7) rotate(45deg);
    -ms-transform: scaleY(0.7) rotate(45deg);
    transform:  scaleY(0.7) rotate(45deg);
    display: none;
}

.box .tab.right{
    right: 0;
    top: 35px;
	background: linear-gradient(-45deg, #999999 -400%, #cccccc 90%);
    -webkit-transform: scaleY(0.7) rotate(45deg);
    -ms-transform: scaleY(0.7) rotate(45deg);
    transform:  scaleY(0.7) rotate(45deg);
    display: none;
}

.box.localPlayer .tab.left,
.box.localPlayer .tab.right{
    background: linear-gradient(-45deg, #999999 -400%, #cccccc 50%);
}

.box .tab.bottom{
    left: 50%;
    bottom: 0;
	background: linear-gradient(-45deg, #999999 70%, #cccccc 300%);
    -webkit-transform: scaleX(0.7) rotate(45deg);
    -ms-transform: scaleX(0.7) rotate(45deg);
    transform:  scaleX(0.7) rotate(45deg);
    display: none;
}

.box .tab.top{
    left: 50%;
    top: 0;
	background: linear-gradient(-45deg, #999999 -300%, #cccccc 30%);
    -webkit-transform: scaleX(0.7) rotate(45deg);
    -ms-transform: scaleX(0.7) rotate(45deg);
    transform:  scaleX(0.7) rotate(45deg);
    display: none;
}

.box .tab.topRight{
    right: 35px;
    top: 0;
	background: linear-gradient(-45deg, #999999 -300%, #cccccc 30%);
    -webkit-transform: scaleX(0.7) rotate(45deg);
    -ms-transform: scaleX(0.7) rotate(45deg);
    transform:  scaleX(0.7) rotate(45deg);
    display: none;
}

/* When viewport width is 800 we assume we are on a mobile and let .box center on top of .boxbackground */
@media (max-width: 800px){
    .box{
        position: fixed;
        left: 50% !important;
        top: 50% !important;

        -webkit-transform: translate(-50%, -50%) !important;
        -ms-transform: translate(-50%, -50%) !important;
        transform: translate(-50%, -50%) !important;
    }

    .boxbackground{
        opacity: 0.5;
    }

    .box .tab{
        display: none !important;
    }
}

/******************** Error Box **********************/
#error{
    position: fixed;
    left: 50%;
    top: 50%;

    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

#error .title{
    color: #cc0000;
    font-family: TankTrouble;
}

/******************** Tank Info Box **********************/
#tankinfo .icon{
    position: absolute;
    width: 320px;
    height: 192px;
    left: calc(50% + 5px);
    top: -167px;

    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

#tankinfo .username{
    position: relative;
    z-index: 1;
    height: 28px;
}

#tankinfo .rank,
#tankinfo .xp {
    position: relative;
    height: 34px;
}

#tankinfo .title {
    position: absolute;
}

#tankinfo .rankIcon {
    position: absolute;
    top: 4px;
}

#tankinfo .progress {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    height: 22px;
    margin: 0 5px 0 5px;
    overflow: hidden;
    position: absolute;
    top: 6px;
    width: calc(100% - 5px - 5px);
}

#tankinfo .progress .border {
    border-color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-style: solid;
    border-width: 2px 0 0 0;
    height: 100%;
    position: absolute;
    width: 100%;
}

#tankinfo .progress .bar {
    background-size: 10px 22px;
    height: 100%;
}

#tankinfo .rank .progress .bar {
    background-image: url('../assets/images/tankInfo/rankProgressBar.png');
}

#tankinfo .xp .progress .bar {
    background-image: url('../assets/images/tankInfo/xpProgressBar.png');
}

/* When retina, set background-images to high res versions */
@media 	(-webkit-min-device-pixel-ratio: 2),
(   min--moz-device-pixel-ratio: 2),
(     -o-min-device-pixel-ratio: 2/1),
(        min-device-pixel-ratio: 2),
(                min-resolution: 192dpi),
(                min-resolution: 2dppx) {
    #tankinfo .rank .progress .bar {
        background-image: url('../assets/images/tankInfo/rankProgressBar@2x.png');
    }

    #tankinfo .xp .progress .bar {
        background-image: url('../assets/images/tankInfo/xpProgressBar@2x.png');
    }
}

#tankinfo table {
    border-collapse: separate;
    border-spacing: 0 6px;
    width: 100%;
}

#tankinfo table td {
    position: relative;
}

#tankinfo table .statsIcon {
    position: absolute;
}

#tankinfo table td:last-child .statsIcon {
    right: 5px;
}

#tankinfo table svg {
    display: block;
    position: relative;
}

#tankinfo table td:first-child svg {
    left: 45px;
}

#tankinfo table td:last-child svg {
    left: 3px;
}

@keyframes tankinfoglowscale {
    from {
        transform: scale(1.0);
    }

    to {
        transform: scale(1.5);
    }
}

#tankinfo .glow {
    animation-name: tankinfoglowscale;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
    animation-iteration-count: infinite;
    left: auto;
    pointer-events: none;
    right: -1px;
    top: -8px;

}


@keyframes tankinforayopacity {
    from {
        opacity: 0.2;
    }

    to {
        opacity: 1.0;
    }
}

@keyframes tankinforayrotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#tankinfo .ray {
    animation-name: tankinforayopacity, tankinforayrotation;
    animation-timing-function: ease-in-out, linear;
    animation-direction: alternate, normal;
    animation-iteration-count: infinite, infinite;
    left: auto;
    pointer-events: none;
    right: -1px;
    top: -8px;

}

#tankinfo .ray.first {
    animation-duration: 1.0s, 12.2s;
    animation-delay: -0.25s, 0s;
}

#tankinfo .ray.second {
    animation-duration: 1.5s, 12.2s;
    animation-delay: -0.75s, -1.525s;
}

#tankinfo .actions:not(.centered){
    text-align: right;
}

#tankinfo .button {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: 52px;
    height: 52px;
}

#tankinfo .button.disabled {
    cursor: default;
}

#tankinfo .button img {
    display: none;
}

#tankinfo .button:not(:active):not(.disabled) .standard,
#tankinfo .button:active:not(.disabled) .active,
#tankinfo .button.disabled .disabled {
    display: inherit;
}

#tankinfo .button.shop:not(:active):not(.disabled) .standard {
    display: none;
}

#tankinfo .button.shop:not(:active):not(.disabled).flicker .standard.flicker,
#tankinfo .button.shop:not(:active):not(.disabled):not(.flicker) .standard:not(.flicker) {
    display: inherit;
}

#tankinfo .button img.buttonMarker {
    display: inherit;
    position: absolute;
    top: -10px;
    right: -1px;
}

/* When viewport width is 800 we assume we are on a mobile and let #tankinfo center on top of .boxbackground */
@media (max-width: 800px) {
    #tankinfo{
        /* Fix to make drop-shadow filter look correct on Safari on Retina displays */
        -webkit-transform: translate(-50%, -40%) translateZ(0) !important;
        -ms-transform: translate(-50%, -40%) !important;
        transform: translate(-50%, -40%) !important;
    }
}

/******************** Settings Box **********************/
#settings {
    text-align: left;
}

/******************** Select User Box **********************/
#selectuser .iconContainer {
    position: relative;
    height: 70px;
}

#selectuser .icon {
    position: absolute;
    width: 140px;
    height: 84px;
    left: calc(50% + 2px);

    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

#selectuser .username {
    position: relative;
    height: 28px;
    z-index: 1;
}

#selectuser .option {
    display: inline-block;
    width: 114px;
    position: relative;
}

#selectuser.users1 .option.option2,
#selectuser.users1 .option.option3,
#selectuser.users2 .option.option3 {
    display: none;
}

/******************** Cookie Box **********************/

#cookie {
    background: #000000;
    bottom: 0;
    color: #ffffff;
    display: table;
    padding: 10px;
    position: fixed;
    width: calc(100% - 20px);
    z-index: 100000;
}

#cookie > div {
    display: table-cell;
    vertical-align: middle;
}

#cookie > div:last-child{
    text-align: right;
}

/******************** Chat **********************/
#chat {
    -webkit-filter: drop-shadow(0px 12px 7px rgba(0,0,0,0.5));
    filter: drop-shadow(0px 12px 7px rgba(0,0,0,0.5));

    /* Fix to make drop-shadow filter look correct on Safari on Retina displays */
    -webkit-transform: translateZ(0);

    position: fixed;
    z-index: 10;
    width: 1px;
    height: 1px;
}

#chat .status {
    position: absolute;
    left: -25px;
    top: -12px;
}

#chat .content {
    font-family: verdana;
    font-size: 10pt;
    width: 0;
    pointer-events: none;
    transition: width 0.3s 0.2s;
}

@keyframes chatsend {
    from {
        background-position-x: 0;
    }
    to {
        background-position-x: -50px;
    }
}

#chat form {
    border-radius: 3px;
    background-color: #ffffff;
    pointer-events: auto;
    animation-name: chatsend;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-direction: normal;
    animation-iteration-count: infinite;
}

#chat.global form {
    background: #68c5ff;
}

#chat.user form {
    background: #00ff02;
}

#chat textarea {
    font-family: Arial;
    font-weight: bold;
    position: relative;
    left: 25px;
    width: 0;
    min-height: 16px !important;
    opacity: 0;
    margin: 0;
    padding: 1px 2px;
    border: none !important;
    outline: none !important;
    overflow-y: hidden;
    resize: none;
    background: none;
    cursor: default;
}

#chat.opening textarea,
#chat.open textarea {
    width: 172px;
    opacity: 1;
    cursor: inherit;
}

#chat.opening textarea {
    transition: width 0.3s, height 0.3s, opacity 0.2s 0.3s;
}

#chat:not(.open):not(.opening) textarea {
    height: 16px !important;
    transition: width 0.3s 0.2s, height 0.3s 0.2s,  opacity 0.2s;
}

#chat .body {
    width: 220px;
    height: 200px;
    margin-left: 20px;
    margin-top: 10px;
    cursor: default;
}

#chat .handle {
    pointer-events: auto;
}

#chat .chatMessage {
    pointer-events: auto;
    width: 0;
}

#chat .whistle {
    position: absolute;
    bottom: -2px;
    cursor: pointer;
}

#chat.opening .content,
#chat.open .content {
    width: 200px;
    transition: width 0.3s;
}

#chat .body.dragging {
    border: 2px dotted #aaaaaa;
    border-radius: 3px;
    margin-left: 18px;
    margin-top: 8px;
}

/******************** Sound Button **********************/

.sound {
    position: absolute;
    right: 108px;
    top: 0px;
    cursor: pointer;
}

.sound img {
    display: none;
}

.sound.low:not(:active) .low.standard,
.sound.low:active .low.active,
.sound.medium:not(:active) .medium.standard,
.sound.medium:active .medium.active,
.sound.high:not(:active) .high.standard,
.sound.high:active .high.active,
.sound.off:not(:active) .off.standard,
.sound.off:active .off.active{
    display: inherit;
}

/******************** Music Button **********************/

.music {
    position: absolute;
    right: 54px;
    top: 0px;
    cursor: pointer;
}

.music img {
    display: none;
}

.music.on:not(:active) .on.standard,
.music.on:active .on.active,
.music.off:not(:active) .off.standard,
.music.off:active .off.active{
    display: inherit;
}

/******************** Settings Button **********************/

.settings {
    position: absolute;
    right: 0px;
    top: 0px;
    cursor: pointer;
}

.settings img {
    display: none;
}

.settings:not(:active) .standard,
.settings:active .active {
    display: inherit;
}

/******************** Tutorial Marker **********************/

@keyframes tutorialmarkeranimation {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(40px, -40px);
    }
}

.tutorialMarker {
    position: absolute;
    animation-name: tutorialmarkeranimation;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
    animation-iteration-count: infinite;
    animation-duration: 0.4s;
    pointer-events: none;
    width: 100px;
    height: 100px;
    opacity: 0;
    transition: width 0.2s ease-in, height 0.2s ease-in, opacity 0.2s ease-in;
}

.tutorialMarker.active {
    width: 62px;
    height: 62px;
    opacity: 1;
    transition: width 0.2s ease-out, height 0.2s ease-out, opacity 0.2s ease-out;
}
#wallOfFame {
	background: #000000;
	box-sizing: border-box;
	color: #ffffff;
	cursor: default;
	font-size: 2em;
	height: 100%;
	left: 0px;
	overflow: auto;
	padding-right: 30px;		/* hide scroll bar */
	padding-top: 10%;
	position: fixed;
	text-align: center;
	top: 0px;
	width: calc(100% + 30px);	/* hide scroll bar */
	z-index: 1000;
}

@media (max-width: 1024px) {
	#wallOfFame{
		font-size: 1.5em;
	}
}

#wallOfFame > * {
	 box-sizing: border-box;
	 display: block;
	 margin-left: auto;
	 margin-right: auto;
	 padding: 5% 20% 0 20%;
	 width: 100%;
}

#wallOfFame .separator {
	font-size: 0.5em;
	vertical-align: 20%;
}

#wallOfFame .subHeader {
	font-family: TankTrouble;
}

#wallOfFame .gameCredits {
	padding-left: 5%;
	padding-right: 5%;
}

#wallOfFame .gameCredits tr td:first-child {
	text-align: right;
	vertical-align: top;
	width: 50%;
}
#wallOfFame .gameCredits tr td:last-child {
	text-align: left;
	vertical-align: bottom;
	width: 50%;
}

#wallOfFame .postface {
	display: table;
}

#wallOfFame .postface > div {
	display: table-cell;
	vertical-align: middle;
}
