#banner {
	border-bottom: 1px solid var(--border-color);
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
}

#banner-background-container {
    position:fixed;
    z-index: 4;
    top: 0;
    left: 21px;
    right: 21px;
    height: 110px;
	box-shadow: 0px 8px 16px 0px var(--box-shadow-color);
    border-radius: 10px;
}


body {
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0px;
    padding: 0px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;    
}

a {
	color: var(--text-color);
	text-decoration: none;
	outline: none;
}

a img {
	border: none;
}

a, input, button {
    border-color: var(--border-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

a:hover, input:hover, button:hover {
    color: var(--hover-color);
}

.nav-button {
    border: none;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: 'Times New Roman';
    font-size: 18px;
    margin: 4px 2px;
    cursor: pointer;
    text-shadow: 5px 5px 5px color-mix(in srgb, var(--box-shadow-color) 90%, transparent);
}

.nav-button:hover {
    color: var(--hover-color);
}

#nav_frame {
    display: flex;
    position:fixed;
    margin-top: 109px;
    z-index:4;
}

#nav_section {
    display:flex;
    width: auto;
    top: 109px;
    left: 18px;
    right: 16px;
    font-family: 'Times New Roman';
    font-size: 14px;
    position: fixed;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--background-color);
    border: 1px var(--border-color) solid;
    box-shadow: 0px 8px 16px 0px var(--box-shadow-color);
    border-radius: 10px;
    
}

#nav_section nav ul {
    padding: 0;
    margin: 0;
    text-align: left;
    list-style-type: none;
}

#nav_section nav ul li {
    position: relative;
    display: inline-block;
}

#nav_section nav ul li a {
    display: inline-block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
}

#nav_section nav ul li a:hover {
    background-color: var(--background-color);
    border-radius: 10pxs;
}

#nav_section nav ul li:not(#hide_chevron)::after {
    position: absolute;
    top: 23px;
    right: 0px;
    width: 10px;
    height: 10px;
    content: "";
    background-image: url('/theme/common/chevron.svg');
    filter: var(--svg-color);
    background-repeat: no-repeat;
    background-size: 100%;
}

#nav_section nav ul ul {
    display: none;
    position: absolute;
    margin-top: 1px;
    top: 100%;
    left: 0;
    min-inline-size: 155px;
    transform: translateY(-5px);
    opacity: 0.9;
    transition: opacity 0.3s ease,
                transform 0.3s ease,
                display 0s linear 0.3s;
}    

#nav_section nav ul ul li {
    width: 80%;
    display: inline-block;
    color: var(--text-color);
    background-color: var(--background-color);
    box-shadow: 0px 8px 16px 0px var(--box-shadow-color);
}

#nav_section nav ul ul li:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#nav_section nav ul ul li:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#nav_section nav ul ul li a:hover {
    color: var(--hover-color);  
}

#nav_section nav ul ul li a:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#nav_section nav ul ul li a:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#nav_section nav ul li:hover > ul {
    display: inline-block;
}

#message {
	color: #444444;
	font-family: "Arial";
	font-size: 16px;
}

#group {
	display: inline-block;
	margin-top: 150px;
}

.groupcontainer {
	display: inline-flex;
}

.cellcontainer {
    display:inline-flex;
    flex-wrap: wrap;
}

.cell {
	float: left;
	width: 200px;
	height: 320px;
	margin: 20px auto;
}

.iframe-loader {
    display: none;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%); 
    z-index: 2;
    justify-content: center;
}

.iframe-loader img {
    position: absolute;
    width: 50px;
    height: 50px;
}

.loader-text {
    position: absolute;
    margin-top: 70px;
    color: var(--text-color);
    width: max-content;
}

#iframeTitleFrame {
    display: block;
    padding: 5px;
    margin-top: 20px;
    margin-bottom: 10px;
    background-color: var(--background-color);
    color: inherit;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family:"New Times Roman";
    font-size: 25px;
    font-weight: bold;
    text-align: left;
    box-shadow: 3px 3px 5px var(--box-shadow-color);
}

#iframeTitle {
    text-shadow: 5px 5px 5px color-mix(in srgb, var(--box-shadow-color) 90%, transparent);    
}

#iframeTitle a {
    margin-left: 5px;
}

#iframeTitleLink a {
    text-decoration: none;
    color: var(--text-color);
}

#iframeTitleLink a:hover {
    color: var(--hover-color);
}

#group iframe {
    display: flex;
    border: 0;
    height: 350px;
    transition: opacity 0.3s ease-in-out;
}

#popupContainer {
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 50%; 
    max-width: 600px; 
    border: 1px solid; 
    height: fit-content; 
    max-height: 600px; 
    font-size: 14px; 
    padding: 20px; 
    background-color: var(--background-color); 
    z-index: 99; 
    border-radius: 10px; 
    color: var(--text-color); 
    text-align: center; 
    overflow-y: auto; 
    display: none;
}

.category-title {
	position:relative;
	display: inline-block;
	color: grey;
	font-size: 24px;
	font-weight:bold;
	text-align: center;
	margin-bottom: 10px;
    text-shadow: 1px 1px 1px var(--box-shadow-color);
}

.category-title .tooltip {
  visibility: hidden;
  width: 140px;
  background-color: grey;
  color: #fff;
  font-size: 16px;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;

  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -70px;

  opacity: 0;
  transition: opacity 0.3s;
}

.category-title .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: grey transparent transparent transparent;
}

.category-title:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.category {
	display: inline-block;
	background-color: var(--background-color); 
	box-shadow:  3px 3px var(--box-shadow-color), inset 0 0 0 6px var(--circle-borders);
	width: 140px;
	height: 140px;
	border-radius: 50%;
	
	background-repeat: no-repeat;
	background-position: center;
	background-size: 90px 90px;
}

.category-latest {
	box-shadow: 3px 3px var(--box-shadow-color), inset 0 0 0 6px var(--circle-borders);
	position:relative;
	display: inline-flex;
    justify-content: center;
    align-items: center;
	background-color: var(--background-color);
    color: grey;
	width: 84px;
	height: 84px;
	top: -15px;
	left: -10px;
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 60px 60px;
    text-shadow: 1px 1px 1px var(--box-shadow-color);
    font-size: 16px;
}

.category-random {
	box-shadow: 3px 3px var(--box-shadow-color), inset 0 0 0 6px var(--circle-borders);
	position:relative;
	display: inline-flex;
    justify-content: center;
    align-items: center;
	background-color: var(--background-color);
    color: grey;
    width: 84px;
	height: 84px;
	top: -15px;
	left: 13px;
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 60px 60px;
    text-shadow: 1px 1px 1px var(--box-shadow-color);
    font-size: 16px;
}

.category-series {
	box-shadow: 3px 3px var(--box-shadow-color), inset 0 0 0 6px var(--circle-borders);
	position:relative;
	display: inline-flex;
    justify-content: center;
    align-items: center;
	background-color: var(--background-color);
    color:grey;
	width: 84px;
	height: 84px;
	top: -37px;
	left: 1px;
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 60px 60px;
    text-shadow: 1px 1px 1px var(--box-shadow-color);
    font-size: 16px;
}

#comics {
	background-image: url('/theme/home/comics.png');
}

#books {
	background-image: url('/theme/home/books.png');
}

#magazines {
	background-image: url('/theme/home/magazines.png');
}

#documents {
	background-image: url('/theme/home/documents.png');
}

#others {
	background-image: url('/theme/home/others.png');
}

#audiobooks {
	background-image: url('/theme/home/audiobooks.png');
}

#files {
	background-image: url('/theme/home/files.png');
}

#pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    gap: 10px;
}

.pagination-button {
    width: 12px;
    height: 12px;
    background-image: url(/theme/home/nav_bullet_unselected.png);
    background-repeat: no-repeat;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: -1px -2px var(--pagination-box-color);
}

.pagination-button.active {
    background-image: url(/theme/home/nav_bullet_selected.png);
    background-repeat: no-repeat;
}

.slider-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 350px; 
    margin: 0 auto;
}

.slider-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; 
    height: 100%; 
    max-width: fit-content;
    box-shadow: 0 3px var(--slider-box-shadow-topleft-color), 0 -3px var(--slider-box-shadow-color), -3px 0 var(--slider-box-shadow-color), 3px 0 var(--slider-box-shadow-topleft-color);    
    border-radius: 5px;
}

.slider-button {
    position: absolute; 
    top: -3px; 
    bottom: 0; 
    font-size: 30px;
    background-color: var(--slider-button-background);
    color: var(--text-color);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-button:hover {
    color: var(--background-color);
}

.slider-button.disabled {
    background-color: var(--slider-button-background-active);
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.prev-button {
    border-radius: 5px;
    box-shadow: var(--slider-button);
}

.prev-button:active, .next-button:active {
    background-color: var(--slider-button-background-active);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.next-button {
    border-radius: 5px;
    box-shadow: var(--slider-button);
}

#dimoverlay {
	visibility:hidden;
	z-index:6;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;  
	width: 100%;
	text-align: center;
	background-image:url('/theme/library/dimoverlay.png');
	display: block;    
}

#progressbar {
    position:relative;
    top:131px;
    border: 0;
    background: url('/theme/library/progressbar.gif');
    background-repeat:no-repeat;
    margin:auto;
    width:48px;
    height:48px;
}

#bookdetails {
    display:none;
    width:580px;
    background-color: var(--background-color);
}

#details {
    font-family:"Arial";
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 20px;
}

#details_upper_row {
    display: flex;
    flex-direction: row;
}

#details_cover_progress {
    display: flex;
    flex-direction: column;
    margin: 5px;
}

#details_info_panel {
    display: flex;
    flex-direction: column;
    margin: 5px 10px 5px 10px;
}

#details_button_row {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    background-color: var(--background-color);
    padding: 2px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.details_message {
    font-size: 10px;
    color: red;
    margin-top: 5px;
    text-align: right;
    width: 100%;
    position: absolute;
    bottom: -20px;
    margin-top:-5px;
}


#details_right_col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding-right: 2px;
    overflow-wrap: anywhere;
}

#details_close {
    position: absolute;
    top:5px;
	right: 5px;
	width:24px;
	height:24px;
	background-image:url('/theme/library/close.svg');
    
    filter:none;
    background-color: #c40115;
    color: var(--text-color);

	background-repeat:no-repeat;
	border: 1px solid var(--background-color);
    border-radius: 5px;
    box-shadow: 2px 2px 5px var(--box-shadow-color);
}

#details_cover {
    width: var(--cover-width);
    height: var(--cover-height) + 34px;
}

#details_progress {
    float:left;
    width: var(--cover-width);
    height: 34px;
}

#details_cover img {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0px 8px 16px 0px var(--box-shadow-color);
}

#details_title {
    font-size:18px;
    font-weight:bold;
    text-align:left;
}

#details_authors {
    margin-top:0.3rem;
    font-size:16px;
    font-weight:bold;
    text-align:left;
    color: var(--text-color);
}

#details_series {
    margin-top:0.3rem;
    font-size:16px;
    text-align:left;
}

#details_series::before {
    width: 1rem;
    height: 1rem;
    content:url('/theme/library/series.svg');
    filter: var(--svg-color);    
    display: inline-block;
    margin-right: 10px;
    vertical-align: text-bottom;
    opacity: 0.5;
}

#details_tags {
    margin-top: 1rem;
    font-size:16px;
    text-align:left;
    font-style:italic
}

#details_tags::before {
    width: 1rem;
    height: 1rem;
    content:url('/theme/library/tag.svg');
    filter: var(--svg-color);
    display: inline-block;
    margin-right: 10px;
    vertical-align: text-bottom;
    opacity: 0.5;
}

#details_language {
    margin-top:0.2rem;
    font-size:16px;
    text-align:left;
}

#details_language::before {
    width: 1rem;
    height: 1rem;
    content:url('/theme/library/language.svg');
    filter: var(--svg-color);
    display: inline-block;
    margin-right: 10px;
    vertical-align: text-bottom;
    opacity: 0.5;
}

#details_file {
    margin-top:0.2rem;
    font-size:16px;
    text-align:left;
}

#details_file::before {
    width: 1rem;
    height: 1rem;
    content:url('/theme/library/file.svg');
    filter: var(--svg-color);
    display: inline-block;
    margin-right: 10px;
    vertical-align: text-bottom;
    opacity: 0.5;
}

#details_publication {
    margin-top:0.2rem;
    font-size:16px;
    text-align:left;
    font-style: italic;
}

.details_rating {
    float:left;
    margin-top:0.2rem;
    text-align:left;
    font-size:22px;
}

#details_description {
    clear: both;
    text-align:left;
    overflow-y:auto;
    color: var(--text-color);
    background-color: var(--background-color);
    padding:15px;
    margin-top: 10px;
}

#details_description a {
    text-decoration: underline;
}

.details_button {
    font-size: 12px;
    align-items: left;
    width: 80px;
}

#details_download {
    width:42px;
    height:42px;
    background-image:url('/theme/library/download.svg');
    filter: var(--svg-color);
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
}

#details_read {
    width:42px;
    height:42px;
    background-image:url('/theme/library/read.svg');
    filter: var(--svg-color);
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
}

#details_mark_unread {
    width:42px;
    height:42px;
    background-image:url('/theme/library/mark-unread.svg');
    filter: var(--svg-color);
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
}

#details_mark_finished {
    width:42px;
    height:42px;
    background-image:url('/theme/library/mark-finished.svg');
    filter: var(--svg-color);
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
}

#details_bookmark {
    width: 42px;
    height: 42px;
    background-image: url('/theme/library/bookmark.svg'); 
    filter: var(--svg-color);
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
    align-content: end;
}

.cover_progress_bar {
    --prog_fg:  #e0e0e0;
    position: relative;
    bottom: 1.2rem;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    background-color: var(--prog_fg);
    padding: 1px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
}

.cover_progress_bar_fill {
    --prog_bg: #A61F22;
    display: block;
    height: 3px;
    background-color: var(--prog_bg);
    width: var(--value);
}

.details_progress_bar {
    --prog_fg: #e0e0e0;
    width: 80%;
    background-color: var(--prog_fg);
    padding: 3px;
    border-radius: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
    margin-left:auto;
    margin-right: auto;
}

.details_progress_bar_fill {
    --prog_bg: #A61F22;
    display: block;
    height: 6px;
    border-radius: 3px;
    background-color: var(--prog_bg);
    width: var(--value);
}

.status_unread {
    visibility: hidden;
}

.status_finished .cover_progress_bar {
    --prog_fg: #1b7500;
    border: 1px solid #e0e0e0;
}

.status_finished .cover_progress_bar_fill {
    --prog_bg: #1b7500;
}

.status_finished .details_progress_bar {
    --prog_fg: #1b7500;
    border: 1px solid #e0e0e0;
}

.status_finished .details_progress_bar_fill {
    --prog_bg: #1b7500;
}
