/* ═══════════════════════════════════════════════════════════════════════════
   Link-in-Bio Preview Styles
   Mirrors the public page CSS for inline preview in the editor
   All classes prefixed with lib- to avoid conflicts
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Preview page wrapper ───────────────────────────────────────────────── */

.lib-preview-page {
  min-height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--lib-gap, 12px);
  font-family: var(--lib-font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: var(--lib-text, #111827);
  background: var(--lib-bg, #ffffff);
}

/* ─── Block card ─────────────────────────────────────────────────────────── */

.lib-block {
  background: var(--lib-card-bg, #f9fafb);
  border-radius: var(--lib-radius, 12px);
  box-shadow: var(--lib-shadow, 0 1px 3px rgba(0,0,0,0.1));
  padding: var(--lib-padding, 16px);
  overflow: hidden;
}

.lib-block-transparent {
  padding: var(--lib-padding, 16px);
}

/* ─── Header / Hero ──────────────────────────────────────────────────────── */

.lib-hero {
  text-align: center;
  padding: 20px 16px;
}

.lib-hero.lib-hero-left {
  text-align: left;
}

.lib-hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--lib-accent, #7c3aed);
  margin-bottom: 12px;
}

.lib-hero-name {
  font-family: var(--lib-font-heading, inherit);
  font-size: 22px;
  font-weight: 800;
  color: var(--lib-text, #111827);
  margin: 0 0 4px;
  line-height: 1.2;
}

.lib-hero-bio {
  font-size: 14px;
  color: var(--lib-text-secondary, #6b7280);
  line-height: 1.5;
  margin: 0;
}

.lib-hero-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--lib-text-secondary, #6b7280);
  margin-top: 8px;
}

.lib-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #3B82F6;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ─── Links ──────────────────────────────────────────────────────────────── */

.lib-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lib-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}

/* Button fills */
.lib-link-btn-solid {
  background: var(--lib-primary, #7c3aed);
  color: #fff;
  border: 2px solid var(--lib-primary, #7c3aed);
}

.lib-link-btn-outline {
  background: transparent;
  color: var(--lib-primary, #7c3aed);
  border: 2px solid var(--lib-primary, #7c3aed);
}

.lib-link-btn-ghost {
  background: transparent;
  color: var(--lib-text, #111827);
  border: 2px solid transparent;
}

/* Button shapes */
.lib-link-btn-pill { border-radius: 100px; }
.lib-link-btn-rounded { border-radius: 12px; }
.lib-link-btn-square { border-radius: 4px; }
.lib-link-btn-squircle { border-radius: 20px; }

/* ─── Social Icons ───────────────────────────────────────────────────────── */

.lib-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.lib-social-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
}

.lib-social-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--lib-radius, 12px);
  background: var(--lib-card-bg, #f9fafb);
  border: 1px solid rgba(0,0,0,0.06);
  flex: 1;
  min-width: 140px;
}

.lib-social-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.lib-social-card-info {
  flex: 1;
}

.lib-social-card-handle {
  font-size: 13px;
  font-weight: 600;
  color: var(--lib-text, #111827);
}

.lib-social-card-followers {
  font-size: 11px;
  color: var(--lib-text-secondary, #6b7280);
}

/* ─── Recent Posts Grid ──────────────────────────────────────────────────── */

.lib-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: var(--lib-radius, 12px);
  overflow: hidden;
}

.lib-post-thumb {
  aspect-ratio: 1;
  background: #e5e7eb;
  overflow: hidden;
}

.lib-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Rate Card ──────────────────────────────────────────────────────────── */

.lib-rates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.lib-rate-box {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--lib-radius, 12px);
  background: rgba(124, 58, 237, 0.06);
}

.lib-rate-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-text-secondary, #6b7280);
  margin-bottom: 2px;
}

.lib-rate-price {
  font-family: var(--lib-font-heading, inherit);
  font-size: 16px;
  font-weight: 800;
  color: var(--lib-text, #111827);
}

.lib-rate-negotiable {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 8px;
}

/* ─── Bio ────────────────────────────────────────────────────────────────── */

.lib-bio-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--lib-text, #111827);
  white-space: pre-line;
}

/* ─── Categories ─────────────────────────────────────────────────────────── */

.lib-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.lib-category-chip {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.1);
  color: var(--lib-accent, #7c3aed);
}

/* ─── Stats ──────────────────────────────────────────────────────────────── */

.lib-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
  text-align: center;
}

.lib-stat {
  padding: 8px 4px;
}

.lib-stat-value {
  font-family: var(--lib-font-heading, inherit);
  font-size: 18px;
  font-weight: 800;
  color: var(--lib-text, #111827);
  line-height: 1.2;
}

.lib-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--lib-text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ─── AI Insights ────────────────────────────────────────────────────────── */

.lib-ai-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.lib-ai-card {
  padding: 12px;
  border-radius: var(--lib-radius, 12px);
  background: var(--lib-card-bg, #f9fafb);
  border: 1px solid rgba(0,0,0,0.05);
  text-align: center;
}

.lib-ai-score {
  font-family: var(--lib-font-heading, inherit);
  font-size: 24px;
  font-weight: 800;
  color: var(--lib-accent, #7c3aed);
}

.lib-ai-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--lib-text-secondary, #6b7280);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ─── Testimonials ───────────────────────────────────────────────────────── */

.lib-testimonial {
  padding: 14px;
  border-left: 3px solid var(--lib-accent, #7c3aed);
  background: var(--lib-card-bg, #f9fafb);
  border-radius: 0 var(--lib-radius, 12px) var(--lib-radius, 12px) 0;
  margin-bottom: 8px;
}

.lib-testimonial-text {
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--lib-text, #111827);
  margin-bottom: 8px;
}

.lib-testimonial-author {
  font-weight: 600;
  font-size: 12px;
  color: var(--lib-text-secondary, #6b7280);
}

/* ─── Contact CTA ────────────────────────────────────────────────────────── */

.lib-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Divider ────────────────────────────────────────────────────────────── */

.lib-divider-line {
  height: 1px;
  background: rgba(0,0,0,0.1);
}

.lib-divider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.lib-divider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lib-text-secondary, #6b7280);
}

/* ─── Gallery ────────────────────────────────────────────────────────────── */

.lib-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  border-radius: var(--lib-radius, 12px);
  overflow: hidden;
}

.lib-gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
}

.lib-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Embed placeholders ─────────────────────────────────────────────────── */

.lib-embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px;
  border-radius: var(--lib-radius, 12px);
  background: var(--lib-card-bg, #f9fafb);
  border: 1px dashed rgba(0,0,0,0.15);
  color: var(--lib-text-secondary, #6b7280);
}

.lib-embed-placeholder i {
  font-size: 28px;
}

.lib-embed-placeholder span {
  font-size: 12px;
  font-weight: 600;
}

/* ─── Custom HTML ────────────────────────────────────────────────────────── */

.lib-custom-html {
  font-size: 14px;
  line-height: 1.6;
  color: var(--lib-text, #111827);
}

.lib-custom-html a {
  color: var(--lib-accent, #7c3aed);
}

/* ─── Branding ───────────────────────────────────────────────────────────── */

.lib-branding {
  text-align: center;
  padding: 16px 0;
  font-size: 11px;
  color: var(--lib-text-secondary, #6b7280);
}

.lib-branding a {
  color: var(--lib-accent, #7c3aed);
  text-decoration: none;
  font-weight: 600;
}

/* ─── Section headers in preview ─────────────────────────────────────────── */

.lib-block-header {
  font-family: var(--lib-font-heading, inherit);
  font-size: 14px;
  font-weight: 700;
  color: var(--lib-text, #111827);
  margin-bottom: 10px;
}

/* ─── Stickers ───────────────────────────────────────────────────────────── */

.lib-sticker {
  position: absolute;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}
