/* Fixes bug when combined with WebRTC Tweaks module */
#ui-top{
    min-height:0;
}

#hand-mini-bar-container{
    display:flex;
    flex-direction: column;
    z-index: 1;
}

#hand-mini-bar-hands-container{
    display:flex;
    flex-direction: column;
    max-height:900px;
    /*ransition: max-height 500ms ease-in-out;*/
    transition: all 500ms ease-in-out;
    padding-bottom: 2px;
    overflow: hidden;    
    margin: 0px 0px 0px auto;
    padding-top:24px;
}

#hand-mini-bar-container.hidden #hand-mini-bar-hands-container{
    max-height:0px;
    padding-bottom: 0px; 
}

.hand-mini-bar-buttons-container, .hand-mini-bar-buttons-top-container{
    max-height:7px;
    max-width: 220px;
    min-width: 220px;
    display: flex;
    flex-grow: 1;
    padding-left: 15px;
    filter: drop-shadow(4px 6px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease-in, z-index 0.2s step-start;
}
.hand-mini-bar-buttons-top-container{

    margin-bottom:-20px;
}

.hand-mini-bar-buttons-container.expanded,
.hand-mini-bar-buttons-container.hidden-expanded{
    max-height:22px;
}

.hand-mini-bar-buttons-container.expanded .hand-mini-bar-hidden-buttons,
.hand-mini-bar-buttons-container.hidden-expanded .hand-mini-bar-hidden-buttons{
    display:flex;
    flex-grow: 1;
}

.hand-mini-bar-hidden-buttons,
.hand-mini-bar-buttons-container.expanded .hand-mini-bar-show-buttons,
.hand-mini-bar-buttons-container.hidden-expanded .hand-mini-bar-show-buttons,
.hand-mini-bar-buttons-container.hidden-expanded .hand-mini-bar-add-bar,
.hand-mini-bar-buttons-container.hidden-expanded .hand-mini-bar-subtract-bar,
.hand-mini-bar-buttons-container.hidden-expanded .hand-mini-bar-move-handle{
    display:none;
}

.hand-mini-bar-buttons-container .hand-mini-bar-add-bar,
.hand-mini-bar-buttons-container .hand-mini-bar-subtract-bar{
    line-height:14px;
}

.hand-mini-bar-buttons-container.hidden-expanded .hand-mini-bar-hide-show{
    transform: rotate(0deg);
    margin-bottom: 0px;
}
.hand-mini-bar-buttons-container .hand-mini-bar-hide-show{
    line-height:22px;
}

.hand-mini-bar-buttons-container .hand-mini-bar-hide-show{
    transform: rotate(180deg);
}

.hand-mini-bar-buttons-container *,
.hand-mini-bar-buttons-top-container *{
    color:#c9c7b8;
    padding:2px;
    cursor:pointer;
    pointer-events: all;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: black;    
    font-size: 26px;
    margin: auto;
    text-align: center;
    line-height: 16px;
    height: 22px;
}

.hand-mini-bar-show-buttons{
    line-height: 0px;
    max-height: 10px;
    width: 100%;
    margin-top:-3px;
    -webkit-text-stroke-color: black;
    -webkit-text-stroke-width: 1px;
    padding:0px;
    font-size: 26px;
}

.hand-mini-bar-show-buttons.hide{
    display:none;
}

.hand-mini-bar-hand{
    display:flex;
    flex-direction: column;
    max-width:200px;
    max-height: 68px;
    margin: 5px 5px 1px 15px;
    color: var(--color-text-light-highlight);
    z-index: var(--z-index-ui);
    pointer-events: all;
}

.hand-mini-bar-hand-inner{
    display:flex;
    flex-direction: row;
    padding: 0;
    border-radius: 5px;
    box-shadow: 0 0 20px var(--color-shadow-dark);
}

.hand-mini-bar-hand-name{
    display:none;
    font-size: 12px;
    color:#FFF;
    text-shadow: 2px 2px #000;
    width: 200px;
    text-align: center;
}

#hand-mini-bar-container.show-names .hand-mini-bar-hand-name{
    display:block;

}

.hand-mini-bar-settings,
.hand-mini-bar-actions{
    display:flex;
    cursor: pointer;
    flex-direction: column; 
    height: 52px;
    background: url(../../../ui/denim075.png) repeat;

}

.hand-mini-bar-settings{
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
.hand-mini-bar-actions{
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.hand-mini-bar-settings-hand{
    background-image: url(/modules/hand-mini-bar/artwork/cards.png);
    background-size: 20px;
    background-repeat: no-repeat;
    width: 23px;
    height: 27px;
    background-position-y: 1px;
    background-position-x: 0px;
    border:1px solid #000;
    border-radius: 5px 0 0 0;
    color: #c9c7b8;
}

.hand-mini-bar-settings-choose{
    background-size: 30px;
    background-repeat: no-repeat;
    width: 23px;
    height: 28px;
    border:1px solid #000;
    border-radius:0 0 0 5px;
    color:#c9c7b8;
    font-size: 21px;
    padding-left: 1px;
    line-height: 23px;
}

.hand-mini-bar-settings-choose:before{
    content:'\2699';
}


.hand-mini-bar-reset{
    width: 23px;
    height: 26px;
    background-position-y: 7px;
    border:1px solid #000;
    border-radius:0 0 5px 0;
    color:#c9c7b8;
    padding-left: 2px;
    font-size: 22px;
    line-height: 23px;
}

.hand-mini-bar-reset:before{
    content: "\21bb";
}

.hand-mini-bar-pass{
    width: 23px;
    height: 26px;
    background-position-y: 7px;
    border:1px solid #000;
    border-radius:0 0 5px 0;
    color:#c9c7b8;
    padding-left: 2px;
    font-size: 22px;
    line-height: 23px;
}

.hand-mini-bar-pass:before{
    content: "\21aa";
}

.hand-mini-bar-draw{
    display:block;
    width: 23px;
    height:26px;
    color:#c9c7b8;
    border:1px solid #000;
    border-radius:0 5px 0 0;
    padding-left:1px;
}

.hand-mini-bar-buttons-container .hand-mini-bar-hidden-buttons *:hover{
    filter: drop-shadow(0px 0px 2px #FFF);
}

.hand-mini-bar-settings-choose:hover,
.hand-mini-bar-pass:hover,
.hand-mini-bar-settings-hand:hover,
.hand-mini-bar-draw:hover{
    box-shadow: 0 0 5px #ffff;
}

.hand-mini-bar-draw:before{
    content: '+';
    font-size: 36px;
    line-height: 22px;
}

.hand-mini-bar-card-container{
    display: flex;
    flex-grow: 1;
    flex-direction: row;
    max-width: 154px;
    min-width: 154px;
    max-height: 52px;
    /*To Overlap cards and tokens*/
    padding-left: 14px;
    padding-right: 14px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 5px #444 inset;
}

.hand-mini-bar-card{
    height: 50px;
    width: 50px;
    background-repeat: no-repeat;  
    background-size: auto 50px;
    cursor: pointer;
    /*To Overlap cards and tokens*/
    margin-left: -14px;
    margin-right: -14px;    
    z-index:1000;
    filter: drop-shadow(0px 0px 1px #000);
    transition: margin 500ms;
}

.hand-mini-bar-card:hover{
    margin-top:-24px;
    height:100px;
    flex: none;
    filter:drop-shadow(0px 0px 2px #FFF);
}

.card-description-popup{
    position: absolute;
    padding: 5px;
    border: 1px solid gray;
    background: black;
    font-size: 14px;
    color:white;
    text-align: center;
    z-index: 1001;
    max-width: 240px;
    border-radius: 5px;

}


.hand-mini-bar-message{
    display: flex;
    flex-direction: row;
    text-align: center;
}

.hand-mini-bar-message-info{
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    max-width: 224px;
    padding-left: 4px;
}

.hand-mini-bar-message-name{
    margin-bottom: 2px;
}

.hand-mini-bar-play-dialog-description,
.hand-mini-bar-play-dialog-face-description{
    text-align:center;
    margin: 0px;
    font-weight: normal;
    font-size: 12px;
}

.cards-dialog div.separator{
    margin: 3px auto 0px auto;
    width: 30px;
    height: 6px;
    border-top: solid 1px #000;
}

.hand-mini-bar-message-description{
    font-size: smaller;
}

.hand-mini-bar-message-card{
    height: 50px;
    width: 50px;
    background-position: center;
    background-size: auto 50px;
    background-repeat:no-repeat;
    cursor:pointer;

    filter: drop-shadow(4px 6px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease-in, z-index 0.2s step-start;
}

.hand-mini-bar-message-card:hover{
    z-index: 3;
    transform: translate(113px) scale(6);
}

.empty-hand-message{
    margin-left:-10px;
    padding:8px;
}
.empty-hand-message .settings-icon{
    color:greenyellow;
}

/* For displaying at the bottom-right of the screen*/

#ui-bottom.hand-mini-bar{
  display: grid;
  grid-auto-rows: minmax(auto, auto);
}

.hand-mini-bar-right{
    grid-template-columns: minmax(auto, auto) minmax(220px, 220px);
}

.hand-mini-bar-left{
    grid-template-columns: minmax(220px, 220px) minmax(auto, auto) ;
}

.hand-mini-bar #camera-views .camera-view{
    height:auto;
}

#ui-bottom.hand-mini-bar div{
    grid-row: 3;
}

#ui-bottom.hand-mini-bar div#camera-views{
    grid-row: 2;
    display:flex;
    flex-wrap: nowrap;
}

div#hand-mini-bar-container{
    justify-content: end;
}

#ui-bottom.hand-mini-bar div#hand-mini-bar-container{
    grid-row: 1/4;
    grid-column: 2;
}
#ui-bottom.hand-mini-bar-left div#hand-mini-bar-container{
    grid-column: 1;
}

#ui-bottom.hand-mini-bar-right div#hand-mini-bar-container{
    grid-column: 2;
}
/* Window popup css*/
.hand-mini-bar-hand-popout .window-content{
    background: transparent;
}

.hand-mini-bar-window{
    height:100%;
}


.hand-mini-bar-window-cards{    
    max-width: 100%;
    height: calc(100% - 33px);
    display: flex;
    flex-grow: 1;
}

.hand-mini-bar-pile-shortcut-container{
    margin-left: 9px;
    min-height: 20px;
}

.hand-mini-bar-pile-shortcut-container .hand-mini-bar-pile-shortcut{
    max-width: 154px;
    min-width: 154px;
    max-height: 52px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background: rgba(0, 0, 0, 0.5);
    color: #FFF;
    text-shadow: 2px 2px #000;
    box-shadow: 0 0 5px #444 inset;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    margin: auto;
    margin-bottom:-22px;    
    pointer-events: all;
}
.directory-item .hand-mini-bar-pile-shortcut{    
    background-image: url(/modules/hand-mini-bar/artwork/cards.png);
    background-repeat: no-repeat;
    background-size: 30px;
    width: 40px;
    max-width: 40px;
    background-position: 4px;
    margin-right: 2px;
    cursor: pointer;
}

.hand-mini-bar-pile-shortcut:hover{
    outline: none;
    box-shadow: 0 0 5px #FFF;
}


.hand-mini-bar-window-cards.deck, .hand-mini-bar-window-cards.pile{    
    max-width: 100%;
    height: calc(100% - 33px);
    display: flex;
    flex-grow: 1;
    flex-flow: wrap;
}

.hand-mini-bar-window-cards.hand{    
    max-width: 100%;
    height: calc(100% - 33px);
    display: table;
    width: 100%;
}

.hand-mini-bar-window-cards-row{
    max-width: 100%;
    height: calc(100% - 33px);
    display: table-row;
    flex-grow: 1;
    flex-direction: row;
}
.hand-mini-bar-window-cards-row .card{
    display: table-cell;
}

.hand-mini-bar-window-cards.pile.show-players{    
    overflow-x: scroll;
    flex-flow:nowrap;
}

.hand-mini-bar-window-cards.pile.show-players .hand-mini-bar-window-card{
    margin: 10px;
}

.hand-mini-bar-window-cards.deck .hand-mini-bar-window-card, 
.hand-mini-bar-window-cards.pile .hand-mini-bar-window-card{
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    margin: 6px;
    filter: drop-shadow(0px 0px 6px #000);
    border: none;
    flex-grow: 1;
    max-height: 114px;
    min-width: 100px;
    min-height: 165px;
}

.hand-mini-bar-window-card{
    min-height: 300px;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    margin: 6px;
    filter: drop-shadow(0px 0px 6px #000);
    border: none;
    flex-grow: 1;
}

.fa-hand-mini-bar-open-hand{    
    background-image: url(/modules/hand-mini-bar/artwork/cards.png);
    width: 15px;
    height: 15px;
    background-size: contain;
    display: block;
    margin-top: 6px;
    background-repeat: no-repeat;
    float: left;
}

.hand-mini-bar-window-buttons{
    display:flex;
    top:0;
    padding-bottom:3px;
}

.hand-mini-bar-window-button{    
    flex-grow: 1;
    max-width: 33%;
    margin: 0 1px;
    background: rgba(255, 255, 240, 1);
    border: 1px solid var(--color-border-light-primary);
    border-radius: 3px;
    font-size: var(--font-size-14);
    line-height: 28px;
    font-family: var(--font-primary);
    cursor: pointer;
    text-align: center;
    background: url(../../..//ui/parchment.jpg) repeat;
}

.hand-mini-bar-window-button:hover {
    outline: none;
    box-shadow: 0 0 5px var(--color-shadow-primary);
}

.hand-mini-bar-flip-icon:before{
    content: "\f064";
}

.hand-mini-bar-window-player-container{
    margin-right:2px;
}
.hand-mini-bar-window-player-container-name{
    color:var(--color-border-light-primary);
    border: 1px solid var(--color-border-light-primary);
    text-align:center;
    border-radius: 8px;
    background-color: #000;
    margin-bottom:0px;
}
.hand-mini-bar-window-player-container-cards {
    width: 130px;
    margin: 2px;
    overflow: hidden;
}
.hand-mini-bar-option-container{
    margin:8px 0px;
}

/* Shrink macro bar sooner*/
@media (max-width: 1316px)
{
    #hotbar {
        width: calc(var(--hotbar-width) / 2);
        height: calc(var(--hotbar-height) * 2);
    }
    #hotbar #macro-list {
        grid-template-columns: repeat(5, 50px);
    }
}

@media (max-width: 1065px)
{
    #ui-bottom div#hand-mini-bar-container div#hand-mini-bar-hands-container{
        /*margin-left:24px;*/
    }

    #ui-bottom{
      grid-template-columns: minmax(auto, auto) minmax(244px, 244px);
    }
}

.hand-mini-bar-draggable{
    position: absolute;
    /*Default location*/
    left: 110px;
    top: 50px;
}

.hand-mini-bar-move-handle{
    cursor: move;
    display:none;
    height: 5px;
    width: 30px;
    border-top: 1px solid #c9c7b8;
    border-bottom: 1px solid #c9c7b8;
    padding-bottom: 2px;
    padding-top:2px;
}

.hand-mini-bar-draggable .hand-mini-bar-move-handle{
    display: block;
}