﻿:root {
    --active-color: red;
    --bar-color: #388222; /*#6aae04*/
    --bar-height: 45px;
    /*伸縮選單寬度*/
    --slide-width: 240px;
    --slide-height: 85vh;
    --book-font-color: white;
}
html, body {
    overflow: hidden;
    font-family: 微軟正黑體;
    background-color: var(--book-font-color) !important;
    width: 100%;
    padding: 0;
    margin: 0;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
.skip-nav {
    position: absolute;
    right: -100%;
    color:white !important;

}
.skip-nav:focus{
    position:static;
}
    .skip-nav.c {
        position: absolute !important;
        color: black !important;
        top: 5px;
        right: 30px !important;
        color: red;
    }


.uil {
    font-size: 1.4em;
}
.small-btn{
    border:unset;
    
    background-color:transparent;
    padding:0;
    color:var(--book-font-color);
}
.page-mask {
    background-color: rgba(0,0,0,.5);
    position: fixed;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    color: var(--book-font-color);
    display: none;
}
.pagetbx {
    text-align: center;
    width: 130px;
    height: 36px;
    border: solid 1px white;
   /* outline: none;*/
    border-radius: 8px;
    background-color: transparent;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
}
    .pagetbx:focus{
        background-color:#fc8606;
    }
    .pagetbx::placeholder {
        color: #fff;
        opacity: 1;
    }
/* 標準寫法 */
.pagetbx:-ms-input-placeholder {
    color: #fff;
}
/* IE10-11 */
.pagetbx::-ms-input-placeholder {
    color: #fff;
}
/* Edge 舊版 */
.pagetbx::-webkit-input-placeholder {
    color: #fff;
}
/* Chrome/Safari */
.pagetbx::-moz-placeholder {
    color: #fff;
    opacity: 1;
}
/* Firefox */

#book-title-container {
    display: flex;
    align-items: center;
    var(--book-font-color)-space: nowrap;
    padding: 5px 10px;
    color: var(--book-font-color);
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 10px;
}

#qrcode-container {
    position: absolute;
    right: 50px;
    top: 5px;
    z-index:100;
}

.qr-btn {
    /*font-size: 1.5em;*/
    border: solid 1px #328d1c;
    cursor: pointer;
    margin-right: 20px;
    color:black !important;
    font-size:1.8em !important;
}

#qrcode {
    position: absolute;
    top: 50px;
    right: 0px;
    background-color: var(--book-font-color);
    border: solid 3px #328d1c;
    padding: 4px;
    z-index: 20;
    display: none;
}

    #qrcode::after {
        content: '';
        position: absolute;
        top: -16px;
        right: 10px;
        /*width: 0;
        height: 0;
        border-style: solid;
        border-width: 10px 0 10px 16px;
        border-color: transparent transparent transparent #328d1c;*/
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 10px 16px 10px;
        border-color: transparent transparent #328d1c transparent;
    }



#qrcode img.logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    background-color: var(--book-font-color);
}

.loading {
    z-index: 10;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
}

#logo {
    position: absolute;
    left: 40px;
    bottom: 40px;
}

#flipbook-container {
    position: relative;
}

.wrap {
    width: 28px;
    height: 28px;
    position: absolute;
    /*left:50%;
    top:50%;
    transform:translate(-50%,-50%);*/
    margin-bottom:4px;
    z-index: 200;
}

    .wrap #countdownSvg {
        display: none;
        width: 100%;
        height: auto;
    }

.wrap .bg {
    stroke: #ccc;
}

.wrap .progress {
    stroke: #f30ab5;
    stroke-linecap: round;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.wrap .center-text {
    font: bold 17px Arial;
    fill: #aaa;
    dominant-baseline: middle;
    text-anchor: middle;
}



#flipbook {
    /*background-image: url(../../images/spine.png);
    background-repeat: repeat-y;
    background-position: 479px 0;
    z-index: 0;*/
   position: absolute;
    transform: scale(1);
    transform-origin:center center;
    transition: transform .5s ease-in-out;
}

    #flipbook .page {
        background-color: #f0f0f0 !important; /* 單頁背景色 */
    }

    #flipbook img {
        border: solid 1px #aaa;
        user-select: none;
    }


.shadow {
    -webkit-transition: -webkit-box-shadow 0.5s;
        -moz-transition: -moz-box-shadow 0.5s;
        -o-transition: -webkit-box-shadow 0.5s;
        -ms-transition: -ms-box-shadow 0.5s;
        -webkit-box-shadow: 0 0 10px #999;
        -moz-box-shadow: 0 0 10px #999;
        -ms-box-shadow: 0 0 10px #999;
        -o-box-shadow: 0 0 10px #999;
    box-shadow: 0px 0px 10px #999;
}
/*每頁未載入前loading*/
.page img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    background: #eee url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 50 50'> <path fill='%23999' d='M43.935,25.145c0-10.318-8.364-18.682-18.682-18.682c-10.318,0-18.682, 8.364-18.682,18.682h4c0-8.094,6.588-14.682,14.682-14.682c8.094,0, 14.682,6.588,14.682,14.682H43.935z'> <animateTransform attributeType='xml' attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.6s' repeatCount='indefinite'/> </path> </svg>") center center no-repeat;
}

    .page img.lazyloaded {
        background: none; /* 載入完成移除 spinner */
    }

/*兩頁中間立體陰影*/
#flipbook .even .gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: -webkit-gradient(linear, left top, right top, color-stop(0.95, rgba(0, 0, 0, 0)), color-stop(1, rgba(0, 0, 0, 0.2)));
    background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0.2) 100%);
    background-image: -moz-linear-gradient(left, rgba(0,0,0,0) 95%, rgba(0,0,0,0.2) 100%);
    background-image: -ms-linear-gradient(left, rgba(0,0,0,0) 95%, rgba(0,0,0,0.2) 100%);
    background-image: -o-linear-gradient(left, rgba(0,0,0,0) 95%, rgba(0,0,0,0.2) 100%);
    background-image: linear-gradient(left, rgba(0,0,0,0) 95%, rgba(0,0,0,0.2) 100%);
}

#flipbook .odd .gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: -webkit-gradient(linear, right top, left top, color-stop(0.95, rgba(0, 0, 0, 0)), color-stop(1, rgba(0, 0, 0, 0.15)));
    background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0.15) 100%);
    background-image: -moz-linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.15) 100%);
    background-image: -ms-linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.15) 100%);
    background-image: -o-linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.15) 100%);
    background-image: linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.15) 100%);
}



/*翻頁時的陰影*/
#flipbook .odd {
    box-shadow: 5px 5px 10px rgba(0,0,0,.5);
    background: -webkit-gradient(linear, right top, left top, color-stop(0.95, #FFF), color-stop(1, #DADADA));
    -webkit-box-shadow: inset 0 0 5px #666;
    -moz-box-shadow: inset 0 0 5px #666;
    -o-box-shadow: inset 0 0 5px #666;
    -ms-box-shadow: inset 0 0 5px #666;
    box-shadow: inset 0 0 5px #666;
}

#flipbook .even {
    background: -webkit-gradient(linear, left top, right top, color-stop(0.95, #fff), color-stop(1, #dadada));
    -webkit-box-shadow: inset 0 0 5px #666;
    -moz-box-shadow: inset 0 0 5px #666;
    -o-box-shadow: inset 0 0 5px #666;
    -ms-box-shadow: inset 0 0 5px #666;
    box-shadow: inset 0 0 5px #666;
}

/*book 厚度*/
.page-depth {
    display: none;
    transition: .2s ease;
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: right center;
    background-image: url(../../images/pages-depth.svg);
}

.page-depth-right {
    height: 100%; /* calc(100% - 2px);*/
    position: absolute;
    right: 0;
    top: 1px;
    width: 4%;
    transition-property: right;
}

.page-depth-left {
    height: calc(100% - 2px);
    position: absolute;
    left: 0;
    top: 1px;
    width: 4%;
    transition-property: left;
    transform: rotate(180deg);
}


.first-page-ani {
    animation-name: moveLeft;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

.other-page-ani {
    animation-name: moveRight;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes moveLeft {
    from {
        right: 0;
    }

    to {
        right: 100px;
    }
}

@keyframes moveRight {
    from {
        left: 0;
    }

    to {
        left: 10px;
    }
}
.footerbar {
    display: none;
    position: absolute;
    bottom: 0;
    z-index: 50;
    width: 100%;
    background-color: var(--bar-color);
    height: var(--bar-height);
}
#title-zone {
    background-color: var(--bar-color);
    z-index: 50;
    position: relative;
    top:0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--bar-height);
    border-bottom:solid 1px #fff;
}

#toolbar-container {
    position: absolute;
    display: inline-flex;
    justify-content:center;
    align-items: center;
   padding:3px;
    background-color: var(--bar-color);
    var(--book-font-color)-space: nowrap;
    z-index: 110;
    /*height: var(--bar-height);*/
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

#main-btns {
    display: inline-flex;
    justify-content: center;
    /*margin-right: 20px;*/
}
#morebtn-container {
    color: var(--book-font-color);
    width: 40px;
    /*margin:0 10px;*/
    cursor: pointer;
    text-align: center;
    display: none;
}
#overflow-btns {
    display: flex;
    flex-direction: column;
    position: absolute;
    min-width: 150px;
    border: solid 1px #ccc;
    border-radius:8px;
    top: var(--bar-height);
    right: 10px;
    z-index: 100;
    list-style: none;
    var(--book-font-color)-space: nowrap;
    background-color: var(--book-font-color);
    margin:0;
    padding:0;
    color:black;
    
}
    #overflow-btns li {
        text-align:left;
        padding:3px 8px;
        margin:0px;
        cursor:pointer;
        display:flex;
        align-items:center;
    }
        #overflow-btns li.disabled{
            color:#ccc;
        }
        #overflow-btns li:hover{
            background-color:rgba(0, 0, 0, 0.08);
        }
        #overflow-btns li.active {
            color: var(--active-color);
        }
        #overflow-btns li:not(:last-child) {
            border-bottom: solid 1px #ccc;
        }

.jumpPage, .change-size {
    position:relative;
    border: solid 1px #328d1c;
    background-color: #fff;
    color: var(--bar-color);
    border-radius: 5px;
    padding: 0 4px;
    font-size: 1em;
    cursor: pointer;
    margin: 0 2px;
    height: 36px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    outline:unset !important;
}
    .change-size .uil-search {
        font-size: 1.7em;
    }

.change-size {
    padding: 0 8px;
    width: 40px;
}
    .change-size.disabled {
        
        color: #ccc !important;
        border-color: #ccc !important;
    }
#catalog-btn {
    padding: 5px 8px;
    width: 40px;
}
.change-size.active {
    color: var(--active-color);
    border: solid 2px var(--active-color);
}

    .jumpPage.disabled {
        background-color: #ccc !important;
    }

#catalog-btn {
    margin-left: 10px;
}

    .jumpPage:hover, .change-size:hover, #catalog-btn:hover
    {
        background-color: #2f8606 !important;
        color:white;
        border:solid 2px white;

    }
    .jumpPage:focus, .change-size:focus, #catalog-btn:focus {
        border: solid 2px black;
    }

    .jumpBtn {
        position: absolute;
        left: 0px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        font-size: 2em !important;
        color: rgba(0,0,0,.2) !important;
        background-color: transparent !important;
        border: none;
        padding: 0;
        border-radius: 10px;
        padding: 10px 0;
        width: 50px;
        cursor: pointer;
        text-align: center;
        /*display:none;*/
    }
.jumpBtn.next{
    left:unset;
    right:0px;
}
    .jumpBtn:hover {
        color: #000;
        background-color: rgba(0,0,0,.2) !important;
    }


#jump-msg {
    position: absolute;
    border-radius: 6px;
    top: 50px;
    left: 50%;
    transform: translate(-50%);
    z-index: 10;
    padding: 6px;
    background-color: rgba(255,255,255,.8);
    min-width: 120px;
    display: none;
}

.nobook {
    padding: 15px;
    text-align: center;
    font-size: 1.2em;
    background-color: var(--book-font-color);
    border: solid 1px #328d1c;
    border-radius: 8px;
    margin-top: 100px;
    box-shadow: 1px 1px 6px rgba(0,0,0,0.5);
}



#slider-container {
    width: 60%;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    var(--book-font-color)-space: nowrap;
}


#page-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 16px;
    background: #ccc;
    border-radius: 100px;
    outline: none;
    cursor: pointer;
}

    /* Chrome / Edge thumb */
    #page-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #73b94e;
        border: 2px solid #fff;
        box-shadow: 0 0 3px rgba(0,0,0,0.3);
        cursor: pointer;
        transition: transform 0.2s;
    }

        #page-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

    /* Firefox thumb */
    #page-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #73b94e;
        border: 2px solid #fff;
        box-shadow: 0 0 3px rgba(0,0,0,0.3);
        cursor: pointer;
        transition: transform 0.2s;
    }

        #page-slider::-moz-range-thumb:hover {
            transform: scale(1.2);
        }

    /* Firefox progress track */
    #page-slider::-moz-range-progress {
        background: #000;
        height: 6px;
        border-radius: 3px;
    }

    #page-slider::-moz-range-track {
        background: #ddd;
        height: 6px;
        border-radius: 3px;
    }

#page-info, #tooltip {
    /*margin-top: 5px;*/
    font-size: 0.8em;
    user-select: none;
    width: 40px;
    min-width: 40px;
    background-color: black;
    color: #dbf7c8;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    z-index: 900;
}

#page-info {
    min-width: 100px;
    margin-left: 6px;
}

#tooltip {
    position: absolute;
    display: none;
}

#catalog-container {
    position: absolute;
    width: var(--slide-width);
    top: var(--bar-height);
    left: calc(0px - var(--slide-width));
    z-index: 100;
    color: white;
    padding-bottom: 100px;
}
.catalog-title {
    background-color: #2e661e;
    color: white;
    border-radius: 0 10px 0 0;
    padding: 3px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
    .catalog-title .fa-times {
        /*color:var(--book-font-color) !important;*/
        color:white !important;
        cursor:pointer;
    }
        .catalog-title .fa-times:hover {
            color: #ccc !important;
        }

.catalog-zone {
    /*border: solid 1px #328d1c;*/
    overflow-y: auto; /* 出現垂直捲軸 */
    background-color: rgba(124,186,8,.9);
    padding: 5px 0;
    max-height: var(--slide-height);
    display: flex;
    justify-content: center;
    background-color: var(--bar-color);
    
}
    /* Chrome、Edge、Safari */
    .catalog-zone::-webkit-scrollbar {
        width: 8px; /* 捲軸寬度 */
    }

    .catalog-zone::-webkit-scrollbar-track {
        background: #e1efc1; /* 捲軸軌道顏色 */
        border-radius: 4px;
    }

    .catalog-zone::-webkit-scrollbar-thumb {
        background: #73b94e; /* 捲軸滑塊顏色 */
        border-radius: 4px;
    }

        .catalog-zone::-webkit-scrollbar-thumb:hover {
            background: #73b94e; /* 滑鼠移上去的顏色 */
        }

/* Firefox */
.catalog-zone {
    scrollbar-width: thin; /* 縮小捲軸 */
    scrollbar-color: #73b94e #e1efc1; /* 滑塊顏色 軌道顏色 */
}
.catalog {
    font-size: 0.85em;
    
    list-style: none;
    margin: 0;
    padding: 0;
}

    .catalog .fa-chevron-down {
        margin-right: 10px;
    }

    .catalog ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
        .catalog > li {
            padding: 5px 6px;
        }

    .catalog li:not(:last-child), .catalog li > ul li:not(:last-child) {
        border-bottom: solid 1px var(--book-font-color);
        margin: 0;
    }

    .catalog li > ul li {
        padding-left: 15px !important;
        background-color: #328d1c;
    }

    .catalog li.link:hover {
        background-color: #95c872;
    }

    .catalog li.link a {
        color: white;
        cursor: pointer;
        display:inline-block;
    }
        .catalog li.link a:focus{
            border:solid 2px black;
        }
        /* 鏡片 */
        #lens {
            position: absolute;
            border-radius: 50%;
            width: 180px;
            height: 180px;
            pointer-events: none;
            background-repeat: no-repeat;
            background-size: 200% 200%;
            display: none;
            z-index: 9999;
            box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25);
        }


@media (min-width:700px) and (max-width:1300px){
    #book-title-container {
        display: none;
    }
}
h4{
    font-size:1.2em;
}

@media (max-width:700px) {
    h4{
        font-size:1em;
    }
    .uil {
        font-size: 1.6em;
    }
    #toolbar-container {
        bottom: 0 !important;
        top: unset !important;
        /*width: 100%;*/
        padding: 0 10px;
    }
    
    .footerbar{
        display:block;
    }
    #morebtn-container{
        bottom:0;
        
    }
    #overflow-btns {
        top: unset !important;
        bottom: 50px;
    }
    #pagetbx{
        width:100px;
    }
    .shadow {
        box-shadow: 4px 6px 10px rgba(0, 0, 0, 0.5) !important;
    }
    #flipbook .odd .gradient, #flipbook .even .gradient {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: -webkit-gradient(linear, right top, left top, color-stop(0.95, rgba(0, 0, 0, 0)), color-stop(1, rgba(0, 0, 0, 0.15)));
        background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0.4) 100%);
        background-image: -moz-linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.4) 100%);
        background-image: -ms-linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.4) 100%);
        background-image: -o-linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.4) 100%);
        background-image: linear-gradient(right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.4) 100%);
    }
    .jumpPage, .change-size {
        padding: 3px 4px;
    }
        .jumpPage:hover, .change-size:hover, #catalog-btn:hover {
            background-color: #a5dd7a !important;
        }
    .change-size {
        padding:3px 8px;
    }
        .change-size .uil-search {
            font-size: 2em;
        }  
        #catalog-container {
            /*display: none;*/
            top: var(--bar-height);
        }
    #qrcode-container {
        right: 10px !important;
        /*right: 10px;
        bottom: 10px;*/
    }
    #logo {
        height: 50px;
        left: 10px;
        bottom: 10px;
    }
    #qrcode {
       
        padding-bottom:0 !important;
    }

    #slider-container {
        width: 95% !important;
        /*max-width: 85% !important;*/
        position: absolute;
        top: var(--bar-height) !important;
        left: 50%;
        transform: translateX(-50%);
    }

    #book-title-container {
        /*display: none;*/
    }


    #flipbook-container {
        /*top: 90px !important;*/
        /* top: calc(50% + 10px);
        left: 50%;
        transform: translate(-50%,-50%);
        z-index:10;*/
        
    }

    .jumpBtn{
        font-size:3em;
        
    }
        
        #main-btns {
            flex-grow: 1;
            text-align: center;
        }
}
