/* The component catalog shares Atlas's paper, typography and navigation. */
.components-library #themes,.components-library #mobileTheme{display:none}
.component-filters{display:flex;align-items:center;gap:12px;margin-top:18px;color:var(--muted);font-size:12px}
.component-filters select{max-width:100%;border:1px solid var(--line);border-radius:8px;padding:8px 30px 8px 12px;background:transparent;color:var(--ink)}
.components-library .results-line{min-height:48px}
.component-card>.component-preview{padding:0;aspect-ratio:1.6;isolation:isolate;border-radius:16px}
.component-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;overflow:hidden;color:#a6aaa9;background:linear-gradient(145deg,#f0f0ed,#e8e9e5);transition:opacity 180ms ease}
.component-placeholder-caption{position:relative;font-size:11px;line-height:1.5;color:#7c847e}
.component-placeholder::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 20%,#ffffffb3 48%,transparent 75%);transform:translateX(-100%)}
.component-preview[data-media-state="loading"][data-in-view="true"] .component-placeholder::after{animation:component-shimmer 1.6s cubic-bezier(.4,0,.2,1) infinite}
.component-preview[data-media-state="ready"] .component-placeholder{opacity:0;visibility:hidden}
.component-preview>img{position:absolute;inset:0;object-fit:contain;background:var(--preview-mat);opacity:0;transition:opacity 180ms ease}
.component-preview>img.is-ready,.component-preview>.motion-preview.has-frame{opacity:1}
.component-preview>.motion-preview{object-fit:contain;background:var(--preview-mat);z-index:1;transition:opacity 180ms ease}
/* Neutralize the blue cast baked into React Bits video shadows; preserve midtones and highlights. */
.component-preview-filters{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.components-library:not(.favorites-mode) #grid .component-preview[data-open^="reactbits-"]>.motion-preview{background:#0d0d0d;filter:url(#component-preview-neutral)}
@keyframes component-shimmer{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){.component-placeholder::after{animation:none!important}.component-placeholder,.component-preview>img{transition:none}}
.component-preview>.overlay{z-index:2}.component-preview>.preview-label{z-index:3}
.component-detail{position:relative;padding:36px;overflow:auto;max-height:calc(100dvh - 64px);overscroll-behavior:contain}
.component-detail-heading{max-width:800px;padding-right:32px;margin-bottom:28px}
.component-detail-heading h2{font-size:30px;letter-spacing:-.8px;line-height:1.2;margin:10px 0;overflow-wrap:anywhere;font-weight:550}
#componentDescription{font-size:13px;line-height:1.8;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
.component-detail-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:30px}
.component-media{position:relative;display:grid;place-items:center;aspect-ratio:1.5;overflow:hidden;background:var(--preview-mat);border-radius:12px;color:var(--muted);text-align:center;font-size:13px}
.component-media video,.component-media img{width:100%;height:100%;max-height:380px;object-fit:contain}
.component-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
#componentLimitations,#componentDependencies,#componentLicense{overflow-wrap:anywhere;white-space:pre-wrap}
#componentSave{margin-top:14px}
.component-code-panel{min-width:0}
.component-ai{padding:24px;margin-bottom:24px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink)}
.component-ai-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.component-ai-heading h3{margin:0;font-size:18px;font-weight:600;letter-spacing:-.3px}
.component-ai-heading>span{font-size:11px;letter-spacing:.3px;color:var(--muted)}
#componentAIHint{font-size:13px;line-height:1.8;color:var(--muted);margin:10px 0 18px}
#componentAICopy{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:12px 19px;font-size:13px;line-height:1.5}
#componentAICopy svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;flex:none}
.component-ai-status{margin:12px 0 0;color:var(--muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.component-ai-status:empty{display:none}
#componentAIDetails{margin-top:16px;font-size:12px}
#componentAIDetails summary{width:fit-content;cursor:pointer;padding:6px 0;color:var(--muted)}
.component-ai :focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.component-code-panel #componentAIText{white-space:pre-wrap;overflow-wrap:anywhere;max-height:340px;margin-top:12px;font-size:11px;line-height:1.8}
@media(max-width:600px){.component-ai{padding:20px}#componentAICopy{width:100%}}
.component-code-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.component-code-toolbar label{font-size:12px;color:var(--muted)}
.component-code-toolbar select{flex:1;min-width:100px;max-width:100%;font-size:12px;border:1px solid var(--line);border-radius:8px;padding:9px;background:#fff;color:var(--ink)}
.component-code-toolbar button{padding:8px 13px;min-height:36px;font-size:12px}
.component-code-panel pre{margin:0;padding:20px;background:#f5f5f1;border:1px solid var(--line);border-radius:10px;font:12px/1.7 'Geist Mono',monospace;white-space:pre;overflow:auto;tab-size:2;max-height:470px;color:#444840}
#componentInstallWrap h3{font-size:13px;font-weight:500;margin-top:24px}
#componentInstall{white-space:pre-wrap;overflow-wrap:anywhere}
#componentCopyInstall{margin-top:10px;padding:8px 13px;min-height:36px;font-size:12px}
@media(max-width:900px){.component-detail-grid{grid-template-columns:minmax(0,1fr)}.component-media{max-height:350px}.component-code-panel pre{max-height:380px}.component-detail{padding:28px}}
@media(max-width:600px){.component-detail{max-height:calc(100dvh - 24px);padding:28px 20px}.component-detail-heading h2{font-size:26px}.component-code-toolbar label{width:100%}.component-filters{margin-top:14px}.component-detail-grid{gap:24px}.component-code-panel pre{padding:14px;font-size:11px}}

.component-code-panel [hidden]{display:none!important}
.component-access{padding:24px;border:1px solid var(--line);border-radius:12px;background:#fafaf7}
.component-access h3{font-size:18px;font-weight:550;line-height:1.4;margin:0 0 10px}
.component-access p{font-size:13px;line-height:1.8;color:var(--muted);margin:0 0 20px;overflow-wrap:anywhere}
.component-access a{display:inline-flex;align-items:center;min-height:42px}
.component-code-feedback{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:18px 0;color:var(--muted);font-size:13px;line-height:1.6}
.component-code-feedback button{min-height:40px;padding:8px 13px;font-size:12px}

.component-live-frame{display:block;border:0;background:#fff;width:100%;height:100%;position:absolute;inset:0;opacity:0;transition:opacity 160ms ease}
.component-preview .component-live-frame{pointer-events:none;width:200%;height:200%;transform:scale(.5);transform-origin:top left;z-index:1}
[data-media-state="ready"]>.component-live-frame{opacity:1}
.component-media.has-interactive-preview{aspect-ratio:auto;min-height:440px;background:#fff;border:1px solid var(--line)}
.component-media[data-media-state="ready"]>.component-placeholder{visibility:hidden}
.component-media[data-media-state="loading"] .component-placeholder::after{animation:component-shimmer 1.6s ease-in-out infinite}
.component-preview-retry{position:absolute;z-index:3;bottom:28px;display:none}
.component-media[data-media-state="error"] .component-preview-retry{display:block}
.component-media[data-media-state="error"] .component-live-frame{visibility:hidden}
@media(max-width:600px){.component-media.has-interactive-preview{min-height:380px}}
@media(prefers-reduced-motion:reduce){.component-live-frame{transition:none}}
