/*-------------------------------------------------
 Literature Library 專屬樣式 (Table Format)
--------------------------------------------------*/
.literature-section {
  margin-top: 40px;
  margin-bottom: 60px;
}

.literature-section-title {
  font-size: var(--fs-xl);
  color: #444;
  margin-bottom: 40px;
  font-weight: var(--fw-bold);
  position: relative;
  display: inline-block;
}

.literature-section-title::after {
  content: "";
  display: block;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, #8FC31F 0%, transparent 100%);
  margin-top: 8px;
  border-radius: 2px;
}

.literature-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  background: #fff;
  margin-bottom: 40px;
}

.literature-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 600px;
}

.literature-table thead th {
  background: #f8fafc; /* Ultra Light Slate */
  color: #475569; /* Slate 600 */
  font-weight: var(--fw-bold);
  text-align: left;
  padding: 16px 24px;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid #8FC31F; /* Brand Lime Green */
  border-top: 1px solid #e2e8f0;
}

.literature-table tbody tr {
  background: #fff;
  transition: all 0.2s ease;
}

.literature-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.literature-table tbody tr:hover {
  background: #f9fdf5; /* Light Green tint */
  box-shadow: 0 4px 12px rgba(143, 195, 31, 0.15);
  z-index: 10;
  position: relative;
}

.literature-table tbody td {
  padding: 20px 24px;
  font-size: var(--fs-base);
  color: #555;
  border-bottom: 1px solid #f1f5f9;
}

.literature-title-cell {
  vertical-align: middle;
}

.literature-flex {
  display: flex;
  align-items: center;
  gap: 20px;
}

.literature-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 110px;
  background-color: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border: 1px solid #eee;
}

.literature-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.literature-info-text {
  flex: 1;
}

.literature-title {
  font-weight: var(--fw-bold);
  color: #333;
  font-size: var(--fs-base);
  margin-bottom: 4px;
  line-height: 1.4;
}

.literature-version {
  font-size: var(--fs-sm);
  color: #777;
  font-weight: var(--fw-regular);
}

.literature-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background-color: transparent;
  color: #7D7D7D;
  border: 1px solid #7D7D7D;
  border-radius: 6px;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  transition: all 0.2s;
  white-space: nowrap;
}

.literature-btn:hover {
  background-color: #8FC31F; /* Brand Lime Green */
  color: #fff;
  border-color: #8FC31F;
  box-shadow: 0 4px 12px rgba(143, 195, 31, 0.3);
}

/* 欄位對齊優化 */
.literature-table thead th:last-child,
.literature-table tbody td:last-child {
  text-align: right;
  width: 150px;
}

@media (max-width: 768px) {
  .literature-section {
    margin-top: 24px;
    margin-bottom: 40px;
  }

  .literature-section-title {
    font-size: var(--fs-lg);
    margin-bottom: 20px;
  }

  .literature-table-wrapper {
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    overflow-x: visible;
    margin-bottom: 24px;
  }

  .literature-table {
    min-width: 0;
    border-collapse: collapse;
    border-spacing: 0;
  }

  .literature-table thead {
    display: none;
  }

  .literature-table tbody tr {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
  }

  .literature-table tbody tr:nth-child(even) {
    background: transparent;
  }

  .literature-table tbody tr:hover {
    box-shadow: none;
    background: transparent;
  }

  .literature-table tbody td {
    display: block;
    padding: 0;
    border-bottom: none;
  }

  .literature-table tbody td.literature-title-cell {
    flex: 1;
    min-width: 0;
  }

  .literature-table tbody td.literature-action {
    flex-shrink: 0;
  }

  .literature-flex {
    gap: 12px;
  }

  .literature-thumbnail {
    width: 52px;
    height: 70px;
  }

  .literature-title {
    font-size: var(--fs-sm);
    line-height: 1.3;
  }

  .literature-version {
    font-size: var(--fs-xs);
  }

  .literature-btn {
    padding: 6px 12px;
    font-size: var(--fs-xs);
    gap: 5px;
  }

  .literature-table thead th:last-child,
  .literature-table tbody td:last-child {
    text-align: center;
    width: auto;
  }
}
