/*
 * @Description   书籍样式
 * @Author        Alex_McAvoy
 * @Date          2026-03-13 14:04:20
 */

/* ---------------------- 详情模式 ---------------------- */
.bookInfo-detail .bookList .book {
  width: 220px;
  margin: 15px;
  background: url("../images/common/bottom.png") no-repeat center bottom;
  background-size: 100% auto;
  background-color: rgba(255, 255, 255, 0.95);
  border: 2px solid #000;
  border-radius: 8px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.25);
  overflow: visible;
  float: left;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.bookInfo-detail .bookList .book::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 60px;
  height: 60px;
  background: url("../images/common/top.png") no-repeat left top;
  background-size: contain;
  pointer-events: none;
  z-index: 20;
}

.bookInfo-detail .bookList .book:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.bookInfo-detail .bookList .book .image {
  width: calc(100% - 20px);
  height: 260px;
  margin: 10px auto 0 auto;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.bookInfo-detail .bookList .book .image::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #ccc;
  z-index: 10;
}

.bookInfo-detail .bookList .book .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bookInfo-detail .bookList .book .detail {
  padding: 10px;
  font-size: 14px;
  line-height: 1.4em;
  color: #333;
  background: transparent;
}

.bookInfo-detail .bookList .book .detail .name {
  font-weight: bold;
  font-size: 18px;
  text-align: center;
  margin-bottom: 4px;
}

.bookInfo-detail .bookList .book .detail .authorNation {
  text-align: center;
  margin-bottom: 2px;
}

.bookInfo-detail .bookList .book .detail > div.media,
.bookInfo-detail .bookList .book .detail > div.category,
.bookInfo-detail .bookList .book .detail > div.date,
.bookInfo-detail .bookList .book .detail > div.publisher,
.bookInfo-detail .bookList .book .detail > div.ISBN {
  display: flex;
  margin-bottom: 4px;
  align-items: flex-start;
}

.bookInfo-detail .bookList .book .detail > div.media span:first-child,
.bookInfo-detail .bookList .book .detail > div.category span:first-child,
.bookInfo-detail .bookList .book .detail > div.date span:first-child,
.bookInfo-detail .bookList .book .detail > div.publisher span:first-child,
.bookInfo-detail .bookList .book .detail > div.ISBN span:first-child,
.bookInfo-detail .bookList .book .detail .bookFooter > div.rating span:first-child {
  flex: 0 0 75px;
  font-weight: bold;
}

.bookInfo-detail .bookList .book .detail > div.media span:last-child,
.bookInfo-detail .bookList .book .detail > div.category span:last-child,
.bookInfo-detail .bookList .book .detail > div.date span:last-child,
.bookInfo-detail .bookList .book .detail > div.publisher span:last-child,
.bookInfo-detail .bookList .book .detail > div.ISBN span:last-child {
  flex: 1;
  text-align: left;
  word-break: break-word;
}

.bookInfo-detail .bookList .book .detail .authorNation.placeholder,
.bookInfo-detail .bookList .book .detail > div.ISBN.placeholder {
  visibility: hidden;
}

.bookInfo-detail .bookList .book .comment {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 0;
  font-size: 13px;
  line-height: 1;
  flex: 0 0 auto;
}

.bookInfo-detail .bookList .book .comment > span:first-child {
  font-weight: bold;
  flex: none;
}

.bookInfo-detail .bookList .book .comment .icon {
  display: inline-block;
  color: gray;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
  flex: none;
}

.bookInfo-detail .bookList .book .comment .content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: #F8DFA4;
  border: 1px solid #aaa;
  padding: 5px;
  border-radius: 5px;
  font-size: 14px;
  color: #555;
  z-index: 10;
  text-align: justify;
  word-break: break-word;
}

.bookInfo-detail .bookList .book .comment:hover .content {
  display: block;
}

.bookInfo-detail .bookList .book .rating {
  margin-top: 0;
  margin-left: auto;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 2px;
  text-align: right;
  white-space: nowrap;
}

.bookInfo-detail .bookList .book .rating .star {
  color: #F5B943;
}

.bookInfo-detail .bookList .book .rating .hollowStar {
  color: #555;
}

.bookInfo-detail .bookList .book .detail .bookFooter {
  display: flex;
  align-items: center;
  margin-top: 8px;
  min-height: 24px;
}

/* ---------------------- 大图模式 ---------------------- */
.bookInfo-bigImage {
  margin-top: 30px;
}
.bookInfo-bigImage .bookList .book {
  width: 200px;
  height: 280px;
  margin: 0 10px 10px 0;
  float: left;
  position: relative;
  border-radius: 10px;
  overflow: visible;
}

.bookInfo-bigImage .bookList .book .image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.bookInfo-bigImage .bookList .book .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}


/* ---------------------- 小图模式 ---------------------- */
.bookInfo-smallImage {
  margin-top: 30px;
}
.bookInfo-smallImage .bookList .book {
  width: 60px;
  height: 85px;
  margin: 0 5px 5px 0;
  float: left;
  position: relative;
  border-radius: 5px;
  overflow: visible;
}


.bookInfo-smallImage .bookList .book .image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 5px;
}

.bookInfo-smallImage .bookList .book .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}


/* ---------------------- hover 弹窗 ---------------------- */
.book .info {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  display: none;
  background: #F8DFA4;
  border: 1px solid #aaa;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  z-index: 999;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
  word-break: break-word;
}

.book .info > div {
  display: flex;
  margin-bottom: 6px;
  align-items: flex-start; 
}

.book .info > div span:first-child {
  flex: 0 0 60px;
  font-weight: bold;
}

.book .info > div span:last-child {
  flex: 1;
  text-align: left;
  word-break: break-word;
}

.bookInfo-bigImage .bookList .book:hover .info:not(.hidden),
.bookInfo-smallImage .bookList .book:hover .info:not(.hidden) {
  display: block;
}