/* Book Components CSS */
/* This file contains reusable styles for book-related components across the site */

/* ===== COMMON BOOK CARD STYLES ===== */
.book-card-base {
    display: flex;
    flex-direction: column;
    background-color: #2a2a40;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .book-card-base:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  }
  
  .book-cover-base {
    position: relative;
    overflow: hidden;
    background-color: #1a1a2e;
  }
  
  .book-cover-base img {
    width: 100%;
    transition: transform 0.5s ease;
  }
  
  .book-card-base:hover .book-cover-base img {
    transform: scale(1.05);
  }
  
  .book-info-base {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  
  .book-info-base h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #ffd700;
    line-height: 1.3;
  }
  
  .book-author-base {
    color: #e0e0ff;
    font-style: italic;
    margin-bottom: 0.25rem;
  }
  
  .book-year-base {
    color: #95a5a6;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
  
  /* ===== BOOK META DISPLAY ===== */
  .book-meta-base {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
  }
  
  .genre-badge {
    background-color: #ffd700;
    color: #1a1a2e;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-block;
  }
  
  .subgenre-badge {
    background-color: #4f3a65;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-block;
  }
  
  .theme-badge {
    background-color: #2a2a40;
    color: #e0e0ff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid #4f3a65;
  }
  
  /* ===== AWARD BADGES ===== */
  .award-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
  }
  
  /* Award winner styles */
  .hugo-badge {
    background-color: #fff;
    color: #1a1a2e;
    border: 2px solid #1a1a2e;
  }
  
  .nebula-badge {
    background-color: #ffd700;
    color: #1a1a2e;
    border: 2px solid #ffd700;
  }
  
  /* Nomination styles */
  .hugo-nomination-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px dotted #ffffff;
  }
  
  .nebula-nomination-badge {
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 2px dotted #ffd700;
  }
  
  /* Adding icons to provide additional visual distinction */
  .hugo-badge::before {
    content: "🚀";
    margin-right: 4px;
  }
  
  .nebula-badge::before {
    content: "🌌";
    margin-right: 4px;
  }
  
  .hugo-nomination-badge::before, 
  .nebula-nomination-badge::before {
    content: "📜";
    margin-right: 4px;
  }
  
  /* ===== BOOK LISTINGS ===== */
  .book-grid-base {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .book-description-base {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    max-height: 6rem; /* Approximately 4 lines */
    overflow: hidden;
    position: relative;
  }
  
  .book-description-base::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.5rem;
    background: linear-gradient(to bottom, rgba(42, 42, 64, 0), rgba(42, 42, 64, 1));
  }
  
  .book-actions-base {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin-top: auto;
  }
  
  .on-reading-list {
    background-color: #6a4c8c !important;
  }
  
  /* ===== RELATED BOOKS ===== */
  .related-books-base {
    background-color: #1a1a2e;
    padding: 3rem 0;
  }
  
  .related-grid-base {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  /* ===== RESPONSIVE ADJUSTMENTS ===== */
  @media screen and (max-width: 1199px) {
    .book-grid-base {
      grid-template-columns: repeat(3, 1fr);
      gap: 1.75rem;
    }
  }
  
  @media screen and (max-width: 767px) {
    .book-grid-base {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
    
    .book-card-base {
      display: flex;
      flex-direction: row;
      height: auto;
      align-items: stretch;
    }
    
    .book-cover-base {
      width: 120px;
      min-width: 120px;
      height: auto;
      flex-shrink: 0;
      border-radius: 8px 0 0 8px;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0.5rem;
    }
    
    .book-cover-base img {
      max-height: 160px;
      object-fit: contain;
    }
    
    .book-info-base {
      padding: 1rem;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }
  
    .related-grid-base {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media screen and (max-width: 479px) {
    .book-cover-base {
      width: 100px;
      min-width: 100px;
    }
        
    .book-info-base {
      padding: 0.75rem;
    }
        
    .book-actions-base {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .related-grid-base {
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }
  }