/* lit-engine.css — Interactive Recitation, Chhanda Scansion & Word X-Ray for Nepali Literature */

.lit-lab-section {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--surface-1, #fbf9f6);
  border: 1px solid var(--border-color, #e5ded6);
  border-radius: 8px;
}

html[data-theme="dark"] .lit-lab-section {
  background: var(--surface-1, #1e1b18);
  border-color: var(--border-color, #38332e);
}

.lit-lab-header {
  margin-bottom: 1.5rem;
}

.lit-lab-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text, #2a241f);
  margin: 0 0 0.5rem 0;
}

.lit-lab-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted, #665d54);
  margin: 0;
  line-height: 1.5;
}

.lit-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
}

.lit-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface-0, #ffffff);
  border: 1px solid var(--border-color, #e8e2da);
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] .lit-card {
  background: var(--surface-0, #25211d);
  border-color: var(--border-color, #3d3630);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.lit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lit-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.lit-card-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color, #e0d8cf);
  flex-shrink: 0;
}

.lit-card-meta {
  flex-grow: 1;
  min-width: 0;
}

.lit-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #222);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lit-work-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary, #8a4e23);
  margin: 0.15rem 0 0 0;
}

html[data-theme="dark"] .lit-work-title {
  color: var(--primary, #d48a52);
}

.lit-era-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--badge-bg, #f0eae1);
  color: var(--badge-text, #5c4a38);
  font-weight: 500;
  margin-top: 0.2rem;
}

html[data-theme="dark"] .lit-era-badge {
  background: #332b24;
  color: #c4b4a3;
}

.lit-verse-box {
  background: var(--verse-bg, #f9f7f4);
  border-left: 3px solid var(--accent, #9e5b2d);
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 0.85rem 0;
  font-family: var(--font-deva, 'Noto Serif Devanagari', serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text, #1f1b18);
}

html[data-theme="dark"] .lit-verse-box {
  background: #1b1816;
  border-left-color: #c4763e;
  color: #f3e6d4;
}

.lit-trans-box {
  font-size: 0.86rem;
  color: var(--text-muted, #665e55);
  font-style: italic;
  margin: 0.4rem 0 0.85rem 0;
  line-height: 1.45;
}
html[data-theme="dark"] .lit-trans-box { color: #c9b7a4; }
html[data-theme="dark"] .lit-author-name { color: #f6ead4; }
html[data-theme="dark"] .lit-xray-table th { color: #c9b7a4; }

.lit-btn-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.lit-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color, #cfc5b8);
  background: var(--btn-bg, #ffffff);
  color: var(--btn-text, #42362b);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

html[data-theme="dark"] .lit-pill-btn {
  background: #2a2520;
  border-color: #483f36;
  color: #dfd5ca;
}

.lit-pill-btn:hover {
  background: var(--btn-hover, #ede5da);
  border-color: #b5a695;
}

html[data-theme="dark"] .lit-pill-btn:hover {
  background: #38312b;
  border-color: #63574c;
}

.lit-pill-btn.primary {
  background: #8a4e23;
  border-color: #8a4e23;
  color: #ffffff;
}

html[data-theme="dark"] .lit-pill-btn.primary {
  background: #ab622e;
  border-color: #ab622e;
  color: #ffffff;
}

.lit-pill-btn.primary:hover {
  background: #733f1b;
  border-color: #733f1b;
}

.lit-drawer {
  display: none;
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: var(--drawer-bg, #f5f0e9);
  border: 1px solid var(--border-color, #e0d6cb);
  border-radius: 6px;
  font-size: 0.84rem;
  line-height: 1.5;
}

html[data-theme="dark"] .lit-drawer {
  background: #1c1916;
  border-color: #38312a;
}

.lit-drawer.is-open {
  display: block;
}

.lit-drawer-title {
  font-weight: 700;
  font-size: 0.86rem;
  margin: 0 0 0.4rem 0;
  color: var(--text, #222);
}

.lit-scansion-formula {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--surface-0, #fff);
  border: 1px solid var(--border-color, #ccc);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  color: #b5451d;
  margin: 0.35rem 0;
}

html[data-theme="dark"] .lit-scansion-formula {
  background: #2b2520;
  border-color: #4a3e35;
  color: #e88656;
}

.lit-xray-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

.lit-xray-table th, .lit-xray-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border-color, #e0d6cb);
  text-align: left;
}

html[data-theme="dark"] .lit-xray-table th, 
html[data-theme="dark"] .lit-xray-table td {
  border-bottom-color: #38312a;
}

.lit-xray-table th {
  font-weight: 600;
  color: var(--text-muted, #666);
}

.lit-xray-word {
  font-family: var(--font-deva, 'Noto Serif Devanagari', serif);
  font-weight: 700;
  color: var(--primary, #8a4e23);
}

html[data-theme="dark"] .lit-xray-word {
  color: var(--primary, #d48a52);
}
