/*
 * AST client runtime base styles. Every rule that sets a default look uses :where() (zero specificity), so node CSS
 * (`.s-<id>`) and state variants always win. Only `hidden` is forced. Loaded together with astRuntime.js.
 */
[data-cn][hidden],
[data-site-tab-panel][hidden] { display: none !important; }

:where([data-cn-popover]) { position: relative; display: inline-block; }
:where([data-cn-popover-content]) { position: absolute; top: 100%; left: 0; z-index: 50; margin-top: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }

:where([data-cn-tooltip]) { position: relative; display: inline-block; }
:where([data-cn="TooltipContent"]) { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 6px; z-index: 50; padding: 4px 8px; border-radius: 6px; background: #111827; color: #fff; font-size: 12px; white-space: nowrap; }

:where([data-cn-dialog-overlay]) { position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, .5); }
:where([data-cn-dialog-content]) { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000; width: min(90vw, 480px); max-height: 85vh; overflow: auto; box-sizing: border-box; padding: 24px; border-radius: 12px; background: #fff; }

:where([data-cn="NavigationMenuContent"]) { position: absolute; z-index: 50; }
:where([data-cn="NavigationMenuItem"]) { position: relative; }
:where([data-cn="SelectContent"]) { position: absolute; top: 100%; left: 0; z-index: 50; min-width: 100%; margin-top: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
:where([data-cn="SelectItem"]) { cursor: pointer; padding: 6px 8px; border-radius: 4px; }
:where([data-cn="SelectItem"]:focus) { outline: 2px solid #3b82f6; outline-offset: -2px; }

:where([data-cn-carousel-viewport]) { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
:where([data-cn-carousel-viewport])::-webkit-scrollbar { display: none; }
:where([data-cn="CarouselSlide"]) { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
:where([data-cn="CarouselDots"]) { display: flex; gap: 6px; justify-content: center; }

:where([data-cn-compare]) { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; }

:where([data-cn="VimeoSpinner"]) { position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: cn-spin .8s linear infinite; }
@keyframes cn-spin { to { transform: rotate(360deg); } }

:where([data-cn-anim]) { transition: opacity .6s ease, transform .6s ease; transition-delay: var(--cn-delay, 0ms); }
[data-cn-anim][data-cn-pending] { opacity: 0; }
[data-cn-anim="slide-up"][data-cn-pending] { transform: translateY(24px); }
[data-cn-anim="slide-left"][data-cn-pending] { transform: translateX(24px); }
[data-cn-anim="zoom"][data-cn-pending] { transform: scale(.95); }

@media (prefers-reduced-motion: reduce) {
    :where([data-cn-anim]) { transition: none; }
    [data-cn-anim][data-cn-pending] { opacity: 1; transform: none; }
    :where([data-cn="VimeoSpinner"]) { animation: none; }
    :where([data-cn-carousel-viewport]) { scroll-behavior: auto; }
}
