/* grokbot-library.css v6: x.ai/bot hero-card outline on the video library frame. */
.video-library .main-content-wrapper {
  position: relative;
  border: 1px solid color-mix(in srgb, #252525 10%, transparent);
  border-radius: 24px;
  overflow: hidden; /* fallback */
  overflow: clip;   /* clip flush to the rounded edge without creating a scroll container */
  background: transparent !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px -12px rgba(0,0,0,.12);
  margin-top: 0 !important;
  padding: 14px !important;
}
.video-library .main-content-wrapper > #categoryFilters.category-sidebar,
.video-library .main-content-wrapper > .video-content,
.video-library .main-content-wrapper #videoDirectory,
.video-library .main-content-wrapper #videoDirectory > .category-section:first-child,
.video-library .main-content-wrapper #videoDirectory > .category-section:first-child > div {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* No fills inside the frame that would create bands */
.video-library .main-content-wrapper > #categoryFilters.category-sidebar,
.video-library .main-content-wrapper > .video-content,
.video-library .main-content-wrapper #videoDirectory,
.video-library .main-content-wrapper .category-section,
.video-library .main-content-wrapper .category-section > div {
  background: transparent !important;
}

/* Desktop: fixed-height panel under the sticky header (~12px gap); the video list
   scrolls inside it flush to the top/bottom edges, sidebar stays still. */
@media (min-width: 768px) {
  .video-library .main-content-wrapper {
    --gb-frame-gap: 12px;
    height: calc(100vh - var(--site-header-height, 64px) - var(--gb-frame-gap) * 2);
    height: calc(100dvh - var(--site-header-height, 64px) - var(--gb-frame-gap) * 2);
    scroll-margin-top: calc(var(--site-header-height, 64px) + var(--gb-frame-gap));
    align-items: stretch !important;
    padding: 0 14px !important; /* horizontal spacing only */
  }
  .video-library .main-content-wrapper::before { min-height: 0 !important; }
  .video-library .main-content-wrapper > #categoryFilters.category-sidebar {
    position: relative !important;
    top: 0 !important;
    align-self: start;
    max-height: 100% !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    box-sizing: border-box;
  }
  .video-library .main-content-wrapper > .video-content {
    height: 100%;
    min-height: 0 !important;
    padding-bottom: 0 !important;
    overflow-y: hidden;
    overscroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, #252525 18%, transparent) transparent;
  }
  .video-library .main-content-wrapper.gb-docked > .video-content { overflow-y: auto; }
  /* Spacing lives inside the scrolling content so cards clip flush at the outline */
  .video-library .main-content-wrapper #videoDirectory {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
  /* Slim WebKit scrollbar, no arrow buttons */
  .video-library .main-content-wrapper > .video-content::-webkit-scrollbar { width: 6px; }
  .video-library .main-content-wrapper > .video-content::-webkit-scrollbar-track { background: transparent; }
  .video-library .main-content-wrapper > .video-content::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  .video-library .main-content-wrapper > .video-content::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, #252525 18%, transparent); border-radius: 9999px;
  }
}
/* v7: wider filter rail so the longest labels fit on one line; wrap instead of ellipsis. */
@media (min-width: 768px) {
  .video-library {
    --filter-button-width: 15rem; /* was 13rem */
    --category-sidebar-width: calc(var(--filter-button-width) + 2 * var(--library-filter-gutter-x, 0.75rem) + var(--filter-scrollbar-size, 6px));
    --library-sidebar-total: calc(var(--filter-button-width) + 2 * var(--library-filter-gutter-x, 0.75rem) + var(--filter-scrollbar-size, 6px));
  }
  .video-library #categoryFilters .filter-link-label {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.25;
  }
}