/* // Search results page */

.search-results-page {
    padding: 0 20px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.search-results-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 0 18px;
    font-size: 1rem;
    color: rgba(var(--rgb-primary), 0.75);
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 16px;
}

.search-results-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(var(--rgb-primary), 0.06);
    color: rgba(var(--rgb-primary), 0.7);
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.15s;
}

.search-results-back:hover {
    background: rgba(var(--rgb-primary), 0.12);
}

.search-results-book-grid {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 120px;
}

.search-results-book-grid .book-card {
    font-size: 0.9rem;
}

.search-results-book-grid .no-results {
    position: static;
    transform: none;
    padding: 40px 0;
    text-align: center;
}

.search-results-book-grid .no-results span {
    font-size: 1rem;
    color: rgba(var(--rgb-primary), 0.5);
}

/* // Filter book by type mobile */

.current-book-count{
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    background: rgba(var(--rgb-primary), .06);
    border: 1px solid rgba(var(--rgb-primary), .06);
    padding: .4em 1.5em .4em 1em;
    margin-top: .5em;
    border-radius: 100px;
}

.current-book-count > span{
    margin-left: .6em;
    font-weight: 500;
}

.books-count-ico{
    --radius: .125em;
    --size: 1.6em;
    --border: .125em;
    --color: var(--primary);
    display: flex;
    align-items: flex-end;
}

.books-count-ico span{
    position: relative;
    height: 1.6em;
    width: .5em;
    border: var(--border) solid var(--color);
    border-radius: var(--radius);
}


.books-count-ico span:first-child::after,
.books-count-ico span:last-child::after{
    content: "";
    position: absolute;
    bottom: 25%;
    left: calc(var(--border) * -1);
    right: calc(var(--border) * -1);
    height: .125em;
    border: var(--border) solid var(--color);
    border-left: 0;
    border-right: 0;
}

.books-count-ico span::after{
    content: "";
    position: absolute;
    bottom: 25%;
    left: calc(var(--border) * -1);
    right: calc(var(--border) * -1);
    height: .125em;
    border: var(--border) solid var(--color);
    border-left: 0;
    border-right: 0;
}

.books-count-ico span:first-child{
    height: 1.2em;
}

.books-count-ico span:last-child{
    height: 1.3em;
}

.mobile-filters{
    margin-bottom: 20px;
    display: none;
    width: 100%;
    overflow: auto;
}

.mobile-filters .type{
    background: rgba(var(--rgb-primary), .06);
    margin-right: 1em;
    padding: .2em 1em;
    border-radius: 100px;
    flex-shrink: 0;
    border: 1px solid rgba(var(--rgb-primary), .06);
}

.mobile-filters .type.active{
    background: var(--primary);
    color: var(--body-color);
}

.mobile-filters .type i{
    margin-right: .2em;;
    font-size: .9em;
}

.categories-holder{
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    transform: translateX(-6%);
    min-height: 32px;
}

category{
    cursor: pointer;
    animation: bounceIn .5s;
    transition: 1s;
}

.grid{
    display: grid;
    grid-template: 1fr / 1fr .25fr;
    margin-top: 78px;
    transition: 1s;
}

.book-grid{
    position: relative;
    display: flex;
    flex-wrap: wrap;
}

.book-grid .book{
    max-width: unset;
    margin-right: 30px;
    margin-bottom: 100px;
}

.book-grid .book:hover .square{
    background: rgba(var(--rgb-primary), .15);    
}

.square{
    display: inline-block;
    padding: 1.875em;
    padding-top: 0;
    background: rgba(var(--rgb-primary), .06);
    border-radius: 10px;
    transition: .3s;
    cursor: pointer;
    animation: bookApear .5s;
}

.square .cover{
    display: block;
    margin-top: -40px;
    animation: fadeIn 1s;
    animation-delay: .5s;
    animation-fill-mode: both;
    
}

.book-info{
    display: flex;
    flex-direction: column;
    max-width: 200px;
    width: 100%;
    animation: fadeIn 1s;
    animation-delay: 1s;
    animation-fill-mode: both;
}

.book-info .stars{
    margin-top: 10px;
}

/* // END */

.filter-container{
    margin-top: -40px;
    animation: fadeIn 1s;
    position: sticky;
    top: 20px;
    align-self: start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-container::-webkit-scrollbar{
    display: none;
}

.filter-container .title{
    display: inline-block;
    font-weight: 400;
    font-size: 30px;
    margin: 0;
    font-family: var(--lora);

}

.filter-container label{
    display: block;
    font-size: 1em;
    margin: 8px 0;
    margin: 20px 0 5px 0;
}

.visible{
    position: relative;
}

.visible input[type="checkbox"]{
    display: none;
}

.visible .selector{ 
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    border-radius: 6px;
    padding: 0 20px;
    background: rgba(var(--rgb-primary), .06);   
    cursor: pointer;
    margin: 0;
    border: 2px solid transparent;
    transition: .3s;

    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

.visible .selector i{
    margin-right: 5px;
    font-size: .8em;   
    transition: .3s;
}

input:checked ~ .selector{
    border: 2px solid var(--primary);
}

input:checked ~ .selector .arrow{
    transform: rotate(180deg);
    transform-origin: center center;
}

.visible .options{
    padding: 10px 0;
    background: var(--surface-3);
    margin-top: 7px;
    border-radius: 6px;
    display: none;
    overflow: hidden;
    transition: .3s;
}

input:checked ~ .selector + .options{
    display: block; 
}

.visible .options .option{
    padding: 10px 20px;
    font-size: .8em;
    cursor: pointer;
}

.visible .options .option:hover{
    background: rgba(var(--rgb-primary), .06);
}

.visible .options .option i{
    margin-right: 5px;
}

/* // Catagory */

.category{
    margin-bottom: 5px;
}

.category input{
    display: none;
}

.category input:checked + label{
    border-color: var(--primary);
}

.category label{
    margin: 0;
    border: 2px solid transparent;
    padding: 10px 20px;
    font-size: .9em;
    border-radius: 6px;
    background: rgba(var(--rgb-primary), .06);
    cursor: pointer;
    transition: .3s;

    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/* // No results */

.no-results{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
   
}

.no-results span{
    font-size: 5em;
    font-weight: bold;
    color: rgba(var(--rgb-primary), .06);
    word-wrap: nowrap;
}

@media screen and (max-width: 1900px) {
    .grid{
        grid-template: 1fr / 1fr .4fr;
    }

    .no-results{
        font-size: .7rem;
    }
}

@media screen and (max-width: 900px) {

    .book-count{
        font-size: .8em;
        border: 1px solid var(--primary);
    }

    .mobile-filters{
        display: flex;
    }

    .categories-holder{
        transform: translateX(0);
        min-height: 0;
    }

    .grid{
        grid-template: 1fr / 1fr 0;
        margin-top: 20px;
    }

    .book-grid{
        position: unset;
    }

    .book-grid .book{
        display: flex;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        font-size: .9em;
        border-radius: 4px;
        transition: 300ms;
    }

    .book-grid .book:hover{
        background: rgba(var(--rgb-primary), .06);
    }

    .square{
        background: var(--surface-raised);
        padding: 0;
    }

    .book-grid .book .cover{
        margin-top: 0;
        font-size: .7em;
    }

    .book-grid .book .book-info{
      /* background: rgba(var(--rgb-primary), .06); */
      justify-content: center;
      padding: 0 20px;
      max-width: 100%;
    }
    
    .filter-container{
        display: none;
    }

    .no-results{
        font-size: .5rem;
    }
}

/* // Collection books */
.book.collection{
    position: relative;
}

.book.collection .cover{
    transform: translateX(10px);
	cursor: pointer;
}

.book.collection .cover img{
    border: 2px solid #111;
    border-radius: 6px;
}

.book.collection .cover .blurhash-canvas{
    border-radius: 6px;
}


.book.collection .behind-book-skeleton::before,
.book.collection .behind-book-skeleton::after{
    content: "";
    position: absolute;
    top: var(--value);
    left: var(--value);
    height: 100%;
    width: 100%;
    border: 2px solid var(--primary);
    border-radius: 6px;
    transition: .5s ease-in-out;
}
/* // for items in slider */
.items .book.collection .behind-book-skeleton::before{
    background: #f1f1f1;
}
/* // end */

.book.collection .behind-book-skeleton::before{
    --value: -10px;
    background: #cfcfcf;
    z-index: -1;
}

.book.collection .behind-book-skeleton::after{
    --value: -20px;
    background: #e6e6e6;
    z-index: -2;
}

.book.collection:hover .behind-book-skeleton::before,
.book.collection:hover .behind-book-skeleton::after{
    --value: 4px;
}

.book.collection .square{
    position: relative;
}

.book.collection .square .collection-book-count{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(var(--rgb-primary), .06);
    width: 2.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    border-radius: 10px 0 0 10px;
    opacity: 0;
    transition: .5s;
}

.book.collection .square .collection-book-count i{
    font-size: .9em;
    margin-bottom: 5px;
}

.book.collection .square .collection-book-count .count{
    font-size: 1.1em;
}


.book.collection:hover .square .collection-book-count{
    opacity: 1;
}

/* // Colecton popup */
.book-collection-holder{
	background: #fff;
	position: fixed;
	top: 0;
	right: 0;
	max-width: 495px;
    height: 100vh;
    width: 100%;
	z-index: 99;
	box-shadow:0 16px 40px rgba(0,0,0,0.12);
	
	transform: translateX(100%);
	transition: cubic-bezier(0.34, 0.26, 0.54, 1.05) .5s;
;
}

.book-collection-holder.show{
	transform: translateX(0);
}

.book-collection-holder .header{
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
    height: 350px;
    max-height: 100%;
	width: 100%;
	overflow: hidden;
}

.book-collection-holder .header::after{
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	bottom: 0;
	z-index: 1;
	background: rgba(var(--rgb-primary), 0.3);
}

.book-collection-holder .header::before{
	content: '';
	position: absolute;
	top: -20vh;
	right: -20vh;
	left: -20vh;
	bottom: -20vh;
	background: var(--src);
	background-position: center;
	filter: blur(1.23em);
	z-index: 1;
    animation: rotate 150s linear infinite;
}

.book-collection-holder .header > *{
	z-index: 2;;
}

.book-collection-holder .header .close{
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	top: 20px;
	left: 20px;
	background: var(--body-color);
	border-radius: .2em;
	--size: 2.8em;
	height: var(--size);
	width: var(--size);
	translate: .5s;
	cursor: pointer;
}

.book-collection-holder .header .close:hover{
	background: var(--primary);
	color: #fff;
}

.book-collection-holder .header .close:active{
	transform: scale(.95);
}

.book-collection-holder .header .book{
	font-size: .8em;
	margin-bottom: 1.25em;
}

.book-collection-holder .header .stars{
	margin-bottom: -2.5em;
}

.book-collection-holder .header .book-count{
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	width: 90px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	color: #fff;
	background: rgba(var(--rgb-primary), .1);
}

.book-collection-holder .header .book-count i{
	margin-bottom: 10px;
	font-size: 1.1em;
}

.book-collection-holder .body{
    display: flex;
    flex-direction: column;
    height: calc(100vh - 280px);
}

.book-collection-holder .body .info-holder.book{
	max-width: unset;
}

.book-collection-holder .body .info-holder{
	padding: 0.625em 1.875em;
	border-bottom: 1px solid rgba(var(--rgb-primary), 0.06);
}

.book-collection-holder .body .cards{
    counter-reset: ord;
    padding:.5em;
    overflow: auto;
    /* height: calc(100vh - 361px); */
    /* height: calc(100vh - 55vw); */
    height: 100%;
}

.book-collection-holder .body .cards.book{
	max-width: unset;
}

.book-collection-holder .body .cards .book-card{
    grid-template: 1fr / 4em 60px 1fr;
	border: none;
}

.book-collection-holder .body .cards .book-card.read{
    position: relative;
    padding-right: 45px;
}

.book-collection-holder .body .cards .book-card.read:hover{
    position: relative;
    padding-right: 45px;
    background: rgba(var(--rgb-primary), .1);
}

.book-collection-holder .body .cards .book-card.read::after{
    --size: 20px;
    content: "\f00c";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    font-size: .8em;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    right: 20px;
    color: var(--body-color);
    width: var(--size);
    height: var(--size);
    background: var(--primary);
    border-radius: 50%;
}

.book-collection-holder .body .cards .book-card .ord-num{
    height: 100%;
    display: flex;
    font-weight: 500;
}

.book-collection-holder .body .cards .book-card .ord-num span{
    margin: auto;
    font-size: 1.5em;
    font-family: var(--lora);
}

.book-collection-holder .body .cards .book-card .ord-num span::after{
    counter-increment: ord;
    content: counter(ord) ".";
}


@media screen and (max-width: 1200px){

    .book.collection .behind-book-skeleton::before{
        --value: -5px;
    }

    .book.collection .behind-book-skeleton::after{
        --value: -10px;
    }

    .book-collection-holder .header{
        height: 280px;
    }

    .book-collection-holder .body{
        height: calc(100vh - 170px);
    }

    /* .book-collection-holder .body .cards{
        height: calc(100vh - 398px);
    } */
}

@media screen and (max-width: 900px) {
    .book.collection{
        position: unset;
    }

    .book.collection .cover{
        transform: translateX(0px);
    }

    .book.collection .square .collection-book-count{
        display: none;
    }

    .collection-holder{
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        border: 0;
        border-radius: 0;
        width: unset;
    }

    .book-collection-holder .header{
        max-height: 170px;
    }

    .book-collection-holder .body{
        height: calc(100vh - 250px);
    }

    /* .book-collection-holder .body .cards{
        height: calc(100vh - 300px);
    } */

    .book-collection-holder .header .book{
        font-size: .6em;
    }
    .book-collection-holder .header .stars{
        display: none;
    }
}

/* ////// Dark theme overrides ////// */
html[data-theme='dark'] .book.collection .cover img{
    border: 2px solid var(--hairline);
}

html[data-theme='dark'] .book.collection .behind-book-skeleton::before,
html[data-theme='dark'] .book.collection .behind-book-skeleton::after{
    border-color: var(--hairline);
}

html[data-theme='dark'] .items .book.collection .behind-book-skeleton::before{
    background: var(--surface-2);
}

html[data-theme='dark'] .book.collection .behind-book-skeleton::before{
    background: var(--surface-2);
}

html[data-theme='dark'] .book.collection .behind-book-skeleton::after{
    background: var(--surface-1);
}

html[data-theme='dark'] .book-collection-holder{
    background: var(--body-color);
    box-shadow: var(--elevated-shadow);
}

html[data-theme='dark'] .book-collection-holder .header::after{
    background: rgba(0, 0, 0, 0.45);
}

html[data-theme='dark'] .book-collection-holder .header .book-count{
    background: rgba(0, 0, 0, 0.35);
}



