/* ================================
   Library Page
   ================================ */

.success-banner {
  background: var(--accent);
  color: var(--bg);
  padding: 1.25rem 0;
  font-size: 0.95rem;
  animation: slideDown 0.4s var(--ease);
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.library-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.library-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 1.25rem;
}

.library-section {
  padding: 4rem 0 8rem;
}

.state-msg {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-mute);
  text-align: center;
  padding: 4rem 0;
}

.empty-state {
  text-align: center;
  padding: 5rem 0;
  max-width: 480px;
  margin: 0 auto;
}

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.empty-state p {
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.library-content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.lib-product {
  border: 1px solid var(--line);
  overflow: hidden;
}

.lib-product-header {
  background: var(--ink);
  color: var(--bg);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.lib-product-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lib-product-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(250, 250, 247, 0.5);
}

.lib-items {
  display: grid;
  grid-template-columns: 1fr;
}

.lib-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem 2.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}

.lib-item:last-child {
  border-bottom: none;
}

.lib-item:hover {
  background: var(--bg-alt);
}

.lib-item-info {
  flex: 1;
  min-width: 0;
}

.lib-item-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
}

.lib-item-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.lib-item-desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.lib-item .btn {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .lib-product-header {
    padding: 1.5rem;
  }
  .lib-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
  }
  .lib-item .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Verification banner */
.verify-banner {
  background: #fff3d4;
  border-bottom: 1px solid #e5c97a;
  padding: 0.85rem 0;
  font-size: 0.9rem;
  color: #6b5a1d;
}

.verify-banner .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.verify-banner a {
  color: #8a6500;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
}

#resendStatus {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Invoice link in product header */
.invoice-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(250, 250, 247, 0.8);
  border: 1px solid rgba(250, 250, 247, 0.2);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s var(--ease);
}

.invoice-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
