:root {
    --max-width: 1280px;
    --header-height: 60px;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header-wrap {
    max-width: var(--max-width);
    height: var(--header-height);
    margin: 0 auto;
}

@media screen and (max-width: 768px) {
    .navbar .nav-inner {
        display: none;
    }

    .navbar .nav-taggle {
        display: block;
    }

    .navbar.is-fixed .nav-inner {
        position: fixed;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(24px);
        text-align: center;
    }

    .navbar.is-fixed .nav-left,
    .navbar.is-fixed .nav-right {
        display: flex;
        flex-direction: column;
    }

    .navbar.is-fixed .nav-item {
        margin: 0;
        padding: 20px;
        font-size: 20px;
        line-height: 1.5;
        font-weight: bold;
        color: #000;
    }

    .navbar.is-fixed .close {
        display: block;
        margin-top: 20px;
        padding: 20px;
        font-size: 40px;
        line-height: 1;
        cursor: pointer;
    }
}

main {
    max-width: var(--max-width);
    margin: var(--header-height) auto 0;
    padding: 40px;
    box-sizing: border-box;
}

/* toolbar */
.toolbar {
    height: 40px;
    margin: 30px 0;
    display: flex;
    justify-content: flex-end;
    align-items: center
}

.toolbar .combo {
    position: relative;
    margin-right: 10px;
    padding: 0;
    background-color: #fff;
    border: none;
    border-radius: 4px;
    vertical-align: middle;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    -webkit-box-shadow: 0 1px 4px rgba(150, 150, 150, .3);
    box-shadow: 0 1px 4px rgba(150, 150, 150, .3);
}

.toolbar .combo .combo-text {
    padding-left: 12px;
    box-sizing: border-box;
    font-size: 14px;
}

.combo-p {
    margin-top: 4px;
    box-shadow: 0 0 12px rgba(150, 150, 150, 0.5);
    border-radius: 2px;
}

.combo-p .panel-body {
    border: none;
}

.combo-p .panel-body .combobox-item {
    padding: 4px 12px;
    font-size: 13px;
    cursor: default;
}

.toolbar .layout-setting {
    display: flex;
    align-items: center;
}

.toolbar .layout-setting .view-type {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin: 0 4px;
    background-image: url(/themes/image/view-type.png);
    cursor: pointer;
}

.view-type.type-grid {
    background-position: -18px 0;
}

.view-type.type-grid:hover,
.view-type.type-grid.active {
    background-position: 0 0;
}

.view-type.type-list {
    background-position: -18px -18px;
}

.view-type.type-list:hover,
.view-type.type-list.active {
    background-position: 0 -18px;
}

.view-type.type-mini-list {
    background-position: -18px -37px;
}

.view-type.type-mini-list:hover,
.view-type.type-mini-list.active {
    background-position: 0 -37px;
}

/* book-grid */
.book-grid {
    min-height: 40vh;
    margin-bottom: 30px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 40px;
    grid-auto-rows: max-content;
}

.book {
    position: relative;
    width: 100%;
    height: 170px;
    padding: 15px 5px;
    box-sizing: border-box;
    border-radius: 4px;
    background-color: #fff;
    -webkit-box-shadow: 0 10px 40px 0 rgba(29, 29, 31, .1);
    -moz-box-shadow: 0 10px 40px 0 rgba(29, 29, 31, .1);
    box-shadow: 0 10px 40px 0 rgba(29, 29, 31, .1);
    display: flex;
}

.book .cover {
    position: relative;
    width: 80px;
}

.book .cover img {
    position: absolute;
    top: -30px;
    left: -25px;
    width: 100px;
    height: 165px;
    object-fit: cover;
    border-radius: 4px;
    background: #fff;
    -webkit-box-shadow: 0 10px 40px 0 rgba(29, 29, 31, .1);
    -moz-box-shadow: 0 10px 40px 0 rgba(29, 29, 31, .1);
    box-shadow: 0 10px 40px 0 rgba(29, 29, 31, .1);
}

.book .info {
    flex: 1;
    padding: 0 8px;
    overflow: hidden;
}

.book .info .title {
    height: 30px;
    line-height: 30px;
    margin-bottom: 16px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book .info .introduction {
    font-size: 14px;
    color: #7D7E8C;
    font-weight: normal;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* book-grid type!=grid */
.book-grid[data-type=list],
.book-grid[data-type=mini-list] {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
}

.book-grid[data-type=list] .book .info .introduction,
.book-grid[data-type=mini-list] .book .info .introduction {
    -webkit-line-clamp: 1;
}

/* book-grid type=mini-list */
.book-grid[data-type=mini-list] {
    padding: 0;
    padding-bottom: 20px;
    gap: 20px;
}

.book-grid[data-type=mini-list] .book {
    height: 80px;
    padding: 5px;
}

.book-grid[data-type=mini-list] .book .cover {
    width: 50px;
}

.book-grid[data-type=mini-list] .book .cover img {
    position: absolute;
    inset: 0;
    width: 50px;
    height: 70px;
}