/* Styles */
#main-window {
    position: absolute;
    height: 116px;
    width: 275px;
    transform: scale(var(--scale-factor)); /* Scale dynamically */
    transform-origin: top left; /* Scale from the top-left corner */
    /*margin-top: -58px;
    margin-left: -137px;
    top: 40%;
    left: 50%;*/
    cursor:url('../cursors/MAINMENU.PNG?inline'), auto;
    /* Ask the browser to scale showing large pixels if possible */
    image-rendering: -webkit-crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;

    image-rendering: -moz-crisp-edges;          /* Firefox */
    image-rendering:   -o-crisp-edges;          /* Opera */
    image-rendering: -webkit-optimize-contrast; /* Safari */
    image-rendering: pixelated;                 /* Only in Chrome > 40 */
    -ms-interpolation-mode: nearest-neighbor;   /* IE (non-standard property) */
}


#main-window.loading * {
    display: none;
}

#loading {
    display: none;
    text-align: center;
    font-size: 20px;
    height: 30px;
    position: absolute;
    margin: auto;
    top: 0; left: 0; bottom: 0; right: 0;
}

/* Only show loading div while we are loading */
#main-window.loading #loading {
    display: block;
}

#main-window.closed { display: none; }

#title-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 14px;
    width: 275px;
    cursor:url('../cursors/TITLEBAR.PNG?inline'), auto;
}

#option,
#minimize,
#shade,
#close {
    position: absolute;
    height: 9px;
    width: 9px;
    top: 3px;
    cursor:url('../cursors/MAINMENU.PNG?inline'), auto;
}

#title-bar #option {
    left: 6px;
}
#title-bar #option #context-menu {
    display: none;
    top: 12px;
    left: 0px;
}
#title-bar #option:active #context-menu,
#title-bar #option.selected #context-menu
{
    display: block;
}

#title-bar #minimize {
    left: 244px;
}
#title-bar #shade {
    left: 254px;
}
#title-bar #close {
    left: 264px;
    cursor:url('../cursors/CLOSE.PNG?inline'), auto;
}
#clutter-bar {
    position: absolute;
    top: 22px;
    left: 10px;
    height: 43px;
    width: 8px;
}

#clutter-bar div {
    position: absolute;
    height: 7px;
    width: 8px;
    left: 0px;
}

#clutter-bar #button-o {
    top: 3px;
    height: 8px;
}
#clutter-bar #button-a {
    top: 11px;
}
#clutter-bar #button-i {
    top: 18px;
}
#clutter-bar #button-d {
    top: 25px;
    height: 8px;
}
#clutter-bar #button-v {
    top: 33px;
}

#play-pause {
    position: absolute;
    top: 28px;
    left: 26px;
    height: 9px;
    width: 9px;
    background-repeat: no-repeat;
}

.play #work-indicator {
    position: absolute;
    top: 28px;
    left: 24px;
    height: 9px;
    width: 3px;
}
.status #time {
    position: absolute;
    left: 39px;
    top: 26px;
    /* Just to make it clickable */
    height: 13px;
    width: 59px;
}

.stop .status #time { display:none; }
.pause .status #time {
    animation: blink 2s step-start 1s infinite;
    -webkit-animation: blink 2s step-start 1s infinite;
}

.status #time #minus-sign {
    position: absolute;
    top: 6px;
    left: -1px;
    width: 5px;
    height: 1px;
}

/* Alternate format for minus sign, when skin supports it */
.status #time.ex #minus-sign {
    top: 0px;
    left: -1px;
    width: 9px;
    height: 13px;
}

.status #time #minute-first-digit {
    position: absolute;
    pointer-events: none;
    left: 9px;
    height: 13px;
    width: 9px;
}
.status #time #minute-second-digit {
    position: absolute;
    pointer-events: none;
    left: 21px;
    height: 13px;
    width: 9px;
}
.status #time #second-first-digit {
    position: absolute;
    pointer-events: none;
    left: 39px;
    height: 13px;
    width: 9px;
}
.status #time #second-second-digit {
    position: absolute;
    pointer-events: none;
    left: 51px;
    height: 13px;
    width: 9px;
}

#visualizer {
    position: absolute;
    width: 76px;
    height: 16px;
    top: 43px;
    left: 24px;
}

.stop #visualizer {
    display: none;
}


.text {
    position: absolute;
    left: 112px;
    top: 27px;
    width: 152px;
    height: 6px;
    overflow: hidden;
    display: none;
}

#song-title {
    display: block;
}

.media-info #kbps {
    position: absolute;
    left: 111px;
    top: 43px;
    width: 15px;
    height: 6px;
    overflow: hidden;
}

.stop .media-info #kbps { display: none; }

.media-info #khz {
    position: absolute;
    left: 156px;
    top: 43px;
    width: 10px;
    height: 6px;
    overflow: hidden;
}

.stop .media-info #khz { display: none; }

.media-info .mono-stereo {
    position: absolute;
    left: 212px;
    top: 41px;
    width: 57px;
    height: 12px;
}

.media-info .mono-stereo div {
    position: absolute;
    height: 12px;
    width: 29px;
}

.media-info .mono-stereo #stereo {
    left: 27px;
}

#volume {
    position: absolute;
    left: 107px;
    top: 57px;
    height: 13px;
    width: 68px;
    background-position: 0 0;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}
#volume::-webkit-slider-thumb {
    display: block;
    margin-top: 1px;
    height: 11px;
    width: 14px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}
#volume::-moz-range-thumb {
    margin-top: 1px;
    height: 11px;
    width: 14px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}

#balance {
    position: absolute;
    left: 177px;
    top: 57px;
    height: 13px;
    width: 38px;
    background-position: 0 0;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}

#balance::-webkit-slider-thumb {
    top: 1px;
    height: 11px;
    width: 14px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}
#balance::-moz-range-thumb {
    top: 1px;
    height: 11px;
    width: 14px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}

.windows {
    position: absolute;
    left: 219px;
    top: 58px;
    width: 46px;
    height: 12px;
}

.windows div {
    position: absolute;
    width: 23px;
    height: 12px;
}

.windows #equalizer-button {
    left: 0;
}

.windows #playlist-button {
    left: 23px;
}

#position {
    position: absolute;
    left: 16px;
    top: 72px;
    width: 248px;
    height: 10px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}

#position::-webkit-slider-thumb {
    height: 10px;
    width: 29px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
    /*
     * Fix the strange bug in Safair/mobile-chrome
     * http://stackoverflow.com/questions/26727769/rendering-glitch-when-manipulating-range-input-value-via-javascript-in-webkit
     */
    -webkit-box-sizing: border-box;
    position: relative;
}

#position::-moz-range-thumb {
    height: 10px;
    width: 29px;
    cursor:url('../cursors/POSBAR.PNG?inline'), auto;
}

/* For some reason, we can't use display: none here */
.stop #position::-webkit-slider-thumb { visibility: hidden; }
.stop #position::-moz-range-thumb { visibility: hidden; }

.actions div {
    height: 18px;
    width: 23px;
    position: absolute;
}

.actions #previous {
    top: 88px;
    left: 16px;
}
.actions #play {
    top: 88px;
    left: 39px;
}
.actions #pause {
    top: 88px;
    left: 62px;
}
.actions #stop {
    top: 88px;
    left: 85px;
}
.actions #next {
    top: 88px;
    left: 108px;
    width: 22px;
}

#eject {
    position: absolute;
    top: 89px;
    left: 136px;
    height: 16px;
    width: 22px;
}

.shuffle-repeat {
    position: absolute;
    top: 89px;
    left: 163px;
    width: 74px;
}

.shuffle-repeat div {
    position: absolute;
    height: 15px;
}

.shuffle-repeat #shuffle {
    width: 47px;
}

.shuffle-repeat #repeat {
    left: 46px;
    width: 28px;
}

#about {
    position: absolute;
    top: 91px;
    left: 253px;
    height: 15px;
    width: 13px;
}

.digit {
    position: absolute;
    display: inline-block;
    width: 9px;
    height: 13px;
    background-repeat: no-repeat;
    text-indent: -9999px;
}

/* Shade View */
#main-window.shade {
    height: 14px;
}

#shade-time {
    cursor:url('../cursors/MAINMENU.PNG?inline'), auto;
}


.shade .media-info,
.shade .windows,
.shade #volume,
.shade #balance,
.shade .shuffle-repeat,
.shade .status
{
    display: none;
}
.shade #title-bar {
    cursor:url('../cursors/MAINMENU.PNG?inline'), auto;
}

.shade .actions div {
    background: none;
    position: absolute;
}
.shade #previous {
    height: 10px;
    width: 7px;
    top: 2px;
    left: 169px;
}
.shade #play {
    height: 10px;
    width: 10px;
    top: 2px;
    left: 176px;
}
.shade #pause {
    height: 10px;
    width: 9px;
    top: 2px;
    left: 186px;
}
.shade #stop {
    height: 10px;
    width: 9px;
    top: 2px;
    left: 195px;
}
.shade #next {
    height: 10px;
    width: 10px;
    top: 2px;
    left: 204px;
}
.shade #eject {
    height: 10px;
    width: 10px;
    top: 2px;
    left: 215px;
    background: none;
}

.shade #position {
    position: absolute;
    left: 226px;
    top: 4px;
    width: 17px;
    height: 7px;
}

.shade #position::-webkit-slider-thumb {
    height: 7px;
    width: 3px;
    /* This make it appear. Not sure why */
    background: none;
}

.shade #position::-moz-range-thumb {
    height: 7px;
    width: 3px;
    /* This make it appear. Not sure why */
    background: none;
}

#shade-time {
    display: none;
}

.shade #shade-time {
    display: block;
    position: absolute;
    top: 4px;
    left: 127px;
    height:6px;
    width: 25px;
}

.stop.shade #shade-time { display:none; }
.pause.shade #shade-time {
    animation: blink 2s step-start 1s infinite;
    -webkit-animation: blink 2s step-start 1s infinite;
}

.shade #shade-time .character {
    position: absolute;
    top: 0;
}
.shade #shade-minus-sign {
    left: 0px;
}
.shade #shade-minute-first-digit {
    left: 6px;
}

.shade #shade-minute-second-digit {
    left: 11px;
}
.shade #shade-second-first-digit {
    left: 20px;
}

.shade #shade-second-second-digit {
    left: 25px;
}
