/**
 * Skeleton Loading for Contract Generators
 * Shows a shimmer animation while React/Babel loads
 * Gets replaced when ReactDOM.createRoot() renders into #generator-root
 */

.cg-skeleton {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.cg-skeleton-layout {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(400px, 1.2fr);
  gap: 24px;
  min-height: 600px;
  align-items: start;
}

@media (max-width: 1080px) {
  .cg-skeleton-layout {
    grid-template-columns: 1fr;
  }
}

.cg-skeleton-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cg-skeleton-bar {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: cg-shimmer 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 16px;
}

.cg-skeleton-bar.title { width: 60%; height: 28px; margin-bottom: 24px; }
.cg-skeleton-bar.label { width: 35%; height: 14px; margin-bottom: 8px; }
.cg-skeleton-bar.input { width: 100%; height: 42px; }
.cg-skeleton-bar.textarea { width: 100%; height: 90px; }
.cg-skeleton-bar.button { width: 140px; height: 42px; border-radius: 8px; margin-top: 8px; }
.cg-skeleton-bar.line { width: 90%; height: 12px; }
.cg-skeleton-bar.line-short { width: 65%; height: 12px; }
.cg-skeleton-bar.line-med { width: 80%; height: 12px; }
.cg-skeleton-bar.doc-title { width: 50%; height: 22px; margin: 24px auto; }
.cg-skeleton-bar.doc-line { width: 95%; height: 11px; margin: 0 auto 10px; }
.cg-skeleton-bar.doc-line-short { width: 70%; height: 11px; margin: 0 auto 10px; }

.cg-skeleton-group { margin-bottom: 20px; }

.cg-skeleton-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
}

.cg-skeleton-tab {
  width: 80px;
  height: 32px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: cg-shimmer 1.5s infinite;
  border-radius: 6px;
}

.cg-skeleton-tab:first-child { background: #eef2ff; animation: none; }

.cg-skeleton-doc-header {
  text-align: center;
  padding: 20px 0 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.cg-skeleton-noscript {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 0.95rem;
}

@keyframes cg-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
