/* ================================================================
   DAV STRAINS WORKROOM — books.css  v1.0
   Styles for: chapter list, lazy-load states, skeleton,
   story grid, reader panel enhancements.
   Upload to: assets/css/books.css
   ================================================================ */

/* ── Chapter index list ── */
.dav-chapter-index {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.dav-chapter-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid rgba(8,21,39,.09);
  border-radius: 20px;
  padding: 18px 22px;
  box-shadow: 0 8px 26px rgba(8,21,39,.05);
  transition: box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  cursor: default;
}
.dav-chapter-card:hover {
  box-shadow: 0 14px 38px rgba(8,21,39,.09);
  border-color: rgba(8,21,39,.15);
}

.dav-chapter-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff8ed, #f5ede0);
  border: 1px solid rgba(210,160,59,.22);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 950;
  color: #d2a03b;
  flex-shrink: 0;
  font-family: Georgia, serif;
}

.dav-chapter-info { min-width: 0; }
.dav-chapter-info h3 {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dav-chapter-info p {
  font-size: 13px;
  color: #667090;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dav-chapter-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.dav-status-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 99px;
}
.dav-status-badge--free {
  background: rgba(34,197,94,.10);
  color: #15803d;
  border: 1px solid rgba(34,197,94,.20);
}
.dav-status-badge--locked {
  background: rgba(210,160,59,.10);
  color: #d2a03b;
  border: 1px solid rgba(210,160,59,.22);
}
.dav-status-badge--coming {
  background: rgba(100,116,139,.10);
  color: #64748b;
  border: 1px solid rgba(100,116,139,.18);
}
.dav-chapter-read-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  background: #111827;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .15s ease;
}
.dav-chapter-read-btn:hover { background: #1e293b; }
.dav-chapter-read-btn--gold {
  background: linear-gradient(135deg, #f0c46c, #fff0c9);
  color: #0c1422;
}
.dav-chapter-read-btn--gold:hover { opacity: .92; }

/* ── Reader: free preview + gate zone ── */
.dav-preview-zone {
  /* Free content shown inline — no special styles needed */
}

.dav-content-zone {
  margin-top: 28px;
  min-height: 60px;
}

.dav-read-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 32px 0 0;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid rgba(8,21,39,.10);
  background: linear-gradient(180deg, transparent, rgba(249,241,226,.60));
  border-radius: 0 0 24px 24px;
}

.dav-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease;
  border: none;
}
.dav-read-btn--primary {
  background: linear-gradient(135deg, #f0c46c, #fff0c9);
  color: #0c1422;
  box-shadow: 0 8px 24px rgba(240,196,108,.20);
}
.dav-read-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(240,196,108,.28); }
.dav-read-btn--ghost {
  background: #fff;
  color: #111827;
  border: 1px solid rgba(8,21,39,.14);
}
.dav-read-btn--ghost:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(8,21,39,.08); }

.dav-read-trigger small {
  font-size: 12px;
  color: #667090;
  line-height: 1.6;
}

/* ── Skeleton loading ── */
.dav-skeleton {
  padding: 4px 0;
}
.dav-skeleton__line {
  height: 18px;
  background: linear-gradient(90deg, rgba(8,21,39,.06) 25%, rgba(8,21,39,.10) 50%, rgba(8,21,39,.06) 75%);
  background-size: 200% 100%;
  animation: dav-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 14px;
}
.dav-skeleton__spacer { height: 28px; }
@keyframes dav-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Loaded content fade-in handled inline by books.js ── */
.dav-content--loaded { }

/* ── Inline gate card ── */
.dav-inline-gate {
  margin-top: 0;
}

/* ── Short stories grid ── */
.dav-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.dav-story-card {
  background: #fff;
  border: 1px solid rgba(8,21,39,.09);
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 26px rgba(8,21,39,.05);
  transition: box-shadow .2s ease;
}
.dav-story-card:hover { box-shadow: 0 16px 40px rgba(8,21,39,.09); }

.dav-story-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  align-self: flex-start;
}
.dav-story-label--free {
  background: rgba(34,197,94,.10);
  color: #15803d;
  border: 1px solid rgba(34,197,94,.18);
}
.dav-story-label--sub {
  background: rgba(240,196,108,.14);
  color: #d2a03b;
  border: 1px solid rgba(240,196,108,.28);
}

.dav-story-title {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  margin: 0;
  line-height: 1.3;
}
.dav-story-excerpt {
  font-size: 14px;
  color: #4d5b6a;
  line-height: 1.68;
  margin: 0;
  flex: 1;
}
.dav-story-action {
  margin-top: 8px;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .dav-chapter-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 14px 16px;
  }
  .dav-chapter-status { display: none; }
  .dav-chapter-card::after {
    content: '→';
    color: #d2a03b;
    font-weight: 700;
    position: absolute;
    right: 16px;
  }
  .dav-chapter-card { position: relative; }
  .dav-stories-grid { grid-template-columns: 1fr; }
  .dav-chapter-num  { width: 40px; height: 40px; font-size: 12px; }
}
