@CHARSET "UTF-8";

@font-face{
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: url('opensans400.eot');
    src: local('Open Sans'),
         local('OpenSans'),
         url('opensans400.eot') format('embedded-opentype'),
         url('opensans400.woff') format('woff'),
         url('opensans400.ttf') format('truetype');
}

@viewport{
    zoom: 1.0;
    width: extend-to-zoom;
}

html, body{
    width: 100%; height: 100%;
    margin: 0; padding: 0;
}

body{
    color: #FFF; background-color: #000;
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
}

body.flow{
    overflow: hidden;
}

body.flow .item .play-overlay,
body.flow .item .video-badge {
    display: none;
}

a:active, a:hover, a:visited, a:focus, a{
    color: #FFF;
    outline: none;
    text-decoration: none;
}

a img{
    outline: none;
}

/*download bar*/
#download-bar{
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(30, 30, 30, 0.95);
    padding: 10px 16px;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-bottom: 1px solid #444;
}

#download-bar button{
    background: #555;
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
}

#download-bar button:hover{
    background: #777;
}

#download-bar #btn-download{
    background: #2a7;
}

#download-bar #btn-download:hover{
    background: #3c9;
}

#download-bar #btn-cancel{
    background: #a33;
}

#download-bar #btn-cancel:hover{
    background: #c55;
}

#dl-status{
    color: #aaa;
    font-size: 13px;
}

/*PAGE: albums*/

#page-albums{
    margin-top: 52px;
}

#page-albums.select-mode .item{
    cursor: pointer;
}

#page-albums.select-mode .item.selected{
    outline: 3px solid #2a7;
    outline-offset: -3px;
}

.item .item-checkbox{
    display: none;
    position: absolute;
    top: 6px; left: 6px;
    z-index: 2;
}

#page-albums.select-mode .item .item-checkbox{
    display: block;
}

.item .item-checkbox input{
    width: 22px; height: 22px;
    cursor: pointer;
    accent-color: #2a7;
}

/*download confirmation modal*/
#dl-modal{
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dl-modal-bg{
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
}

#dl-modal-box{
    position: relative;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 480px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
}

#dl-modal-box h3{
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 400;
}

#dl-modal-list{
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

#dl-modal-list span{
    display: block;
    padding: 2px 0;
}

#dl-modal-info{
    font-size: 13px;
    color: #888;
    margin: 0 0 16px 0;
}

#dl-modal-actions{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#dl-modal-actions button{
    background: #555;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
}

#dl-modal-actions #dl-modal-confirm{
    background: #2a7;
}

#dl-modal-actions #dl-modal-confirm:hover{
    background: #3c9;
}

#dl-modal-actions #dl-modal-close:hover{
    background: #777;
}

/*PAGE: album*/
/* Top navigation.
   The public layout loads only this stylesheet — .admin-nav lives in
   admin.css, which was dropped from layouts/app.blade.php in bacce5d, so
   these pages had an unstyled nav. #page-albums already reserves 52px for a
   fixed bar, so match that height. */
.admin-nav{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    box-sizing: border-box;
    padding: 0 16px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    z-index: 50;
    font-size: 15px;
    line-height: 52px;
    white-space: nowrap;
    overflow: hidden;
}

.admin-nav-link{
    color: #ddd;
    text-decoration: none;
    margin-right: 18px;
}

.admin-nav-link:hover{
    color: #fff;
}

.admin-nav .admin-logout{
    float: right;
    margin-right: 0;
}

/* The album grid sits under the same fixed bar as the album list. */
#page-album{
    margin-top: 52px;
}

body.flow .admin-nav{
    display: none;
}


/*items*/

/* Keep server order left to right, then top to bottom, even with tall tiles. */
.page{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
}

.item{
    width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    background-color: #000;
    background-size: cover;
}

.item .aspect43{
    padding-bottom: 75%;
}

.item .aspect23{
    padding-bottom: 150%;
}

.item .content{
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
}

.item .content span{
    display: block;
    position: absolute;
    bottom: 0; right: 0;
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
    background-color: rgba(0, 0, 0, 0.8);
}

/* Labels inherit body's 20px otherwise, and long titles ran past the tile. */
.item .content h4{
    margin: 0;
    padding: 5px 10px;
    position: absolute;
    left: 0; top: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: rgba(0, 0, 0, 0.5);
}

.item .content em{
    position: absolute;
    left: 0; bottom: 0;
    padding: 5px 10px;
    font-style: normal;
    font-size: 12px;
    white-space: nowrap;
    background-color: rgba(0, 0, 0, 0.8);
}

/* Fewer, wider columns on narrow screens: 20% of a phone is ~75px. */
@media (max-width: 1200px){
    .page{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px){
    .page{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Three columns even on phones (~128px tiles on a 384px-wide S22 Ultra). */
@media (max-width: 600px){
    .item .content h4,
    .item .content em,
    .item .content span{
        font-size: 10px;
        padding: 2px 4px;
    }
}

/*flow viewer*/
#flow-view{
    position: fixed;
    top: 0; bottom: 0; left: 0; right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    z-index: 100;
}

#flow-close, #flow-video-close {
    width: 80px; height: 80px;
    position: absolute;
    right: 0; top: 0;
    font-size: 80px;
    line-height: 80px;
    color: #333;
    text-align: center;
    background-color: #bbb;
    z-index: 300;
    cursor: pointer;
}

#flow-prev, #flow-next, #flow-center{
    position: absolute;
    top: 0; bottom: 0;
    z-index: 150;
    cursor: pointer;
}

#flow-prev{
    left: 0; right: 70%;
}

#flow-next{
    left: 70%; right: 0;
}

#flow-center{
    left: 30%; right: 30%;
}

#flow-view.video-view #flow-prev,
#flow-view.video-view #flow-next,
#flow-view.video-view #flow-center{
    bottom: 48px;
}

/* Sized relative to the tile so it shrinks with the column width. */
.item .play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    width: 30%;
    max-width: 60px;
    aspect-ratio: 1;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 3px solid #fff;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.2s;
}

.item .play-overlay::after {
    content: '';
    position: absolute;
    top: 50%; left: 55%;
    width: 36%; height: 40%;
    transform: translate(-50%, -50%);
    background: #fff;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.item:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
}

.item .video-badge {
    position: absolute;
    top: 6px; right: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 3px;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 0.5px;
}

#flow-view.video-view .vjs-big-play-button {
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    line-height: 80px;
}

#flow-view.video-view .vjs-big-play-button .vjs-icon-placeholder::before {
    font-size: 48px;
    line-height: 80px;
}
