

/* Compact editor library: shared row rhythm with Selected, Page and Site.
   This is editor UI only; previews, template content and published sites keep
   their own typography, layout and authored corner radii. */
#site-editor-add-content-panel {
  --library-ink: #0f172a;
  --library-muted: #64748b;
  --library-line: #e2e8f0;
  --library-panel: #fff;
  --library-soft: #f5f8fa;
  --library-hover: #f0f9ff;
  --library-accent: #0e7490;
  width: min(320px, calc(100vw - 16px)) !important;
  min-width: 0;
}
.dark #site-editor-add-content-panel {
  --library-ink: #f1f5f9;
  --library-muted: #a1afbf;
  --library-line: #233342;
  --library-panel: #07111d;
  --library-soft: #0e1a26;
  --library-hover: #142b38;
  --library-accent: #a5f3fc;
}
#site-editor-add-content-panel > [data-slot="tabs"] > .shrink-0 { padding: 8px; }
#site-editor-add-content-panel [data-editor-library-tabs] {
  gap: 2px; padding: 3px; border-radius: 7px;
  border-color: var(--library-line); background: var(--library-soft);
}
#site-editor-add-content-panel [data-editor-library-tabs] > [role="tab"] {
  flex-direction: row; gap: 4px; height: 34px; min-height: 34px;
  min-width: 0; padding: 4px; border-radius: 4px;
  font-size: 10px; font-weight: 600; line-height: 1.2;
}
#site-editor-add-content-panel [data-editor-library-tabs] > [role="tab"] > svg { width: 13px; height: 13px; flex-shrink: 0; }
#site-editor-add-content-panel [data-editor-library-scroll] {
  min-width: 0; overflow-x: hidden; scrollbar-width: thin;
  scrollbar-color: #8da1b355 transparent; overscroll-behavior: contain;
}
#site-editor-add-content-panel [data-editor-library-scroll] > [role="tabpanel"] {
  margin: 0; padding: 8px; min-width: 0;
}
#site-editor-add-content-panel [data-editor-library-scroll] > [role="tabpanel"] > :not([hidden]) ~ :not([hidden]) { margin-top: 8px; }
#site-editor-add-content-panel [data-editor-library-scroll] > [role="tabpanel"] > .editor-template-library { padding: 0; }
#site-editor-add-content-panel :is([data-editor-catalog-search-input], input[placeholder^="Search text"]) {
  min-height: 36px; height: 36px; font-size: 11px;
}
#site-editor-add-content-panel .editor-library-navigator {
  --eln-panel: var(--library-panel); --eln-row: var(--library-panel);
  --eln-hover: var(--library-hover); --eln-border: var(--library-line);
  --eln-text: var(--library-ink); --eln-muted: var(--library-muted);
  --eln-accent: var(--library-accent); --eln-tint: var(--library-soft);
}
#site-editor-add-content-panel .eln-overview {
  display: block; border: 0; border-radius: 0; animation: none;
  overflow: hidden; background: transparent;
}
#site-editor-add-content-panel .eln-group { min-width: 0; border-bottom: 1px solid var(--eln-border); }
#site-editor-add-content-panel .eln-group:last-child { border-bottom: 0; }
#site-editor-add-content-panel .eln-group-heading { margin: 0; padding: 0; font: inherit; }
#site-editor-add-content-panel .eln-category {
  min-height: 36px; gap: 7px; padding: 6px 9px; border: 0;
  border-radius: 0; background: transparent;
}
#site-editor-add-content-panel .eln-category:is(:hover, [aria-expanded="true"]) {
  background: var(--eln-hover); color: var(--eln-text);
}
#site-editor-add-content-panel .eln-category-icon {
  width: 16px; height: 16px; flex-basis: 16px;
  border: 0; border-radius: 0; background: transparent; color: var(--eln-muted);
}
#site-editor-add-content-panel .eln-category-icon svg { width: 13px; height: 13px; }
#site-editor-add-content-panel .eln-category-title { font-size: 11px; font-weight: 600; line-height: 1.4; }
#site-editor-add-content-panel .eln-category-badge {
  min-width: 18px; min-height: 18px; padding: 1px 4px;
  border: 0; border-radius: 4px; background: var(--eln-tint);
  font-size: 9px; font-variant-numeric: tabular-nums;
}
#site-editor-add-content-panel .eln-category-chevron {
  width: 11px; height: 11px; flex-basis: 11px; transform: none;
  transition: transform 100ms ease;
}
#site-editor-add-content-panel .eln-category[aria-expanded="true"] .eln-category-chevron { transform: rotate(90deg); }
#site-editor-add-content-panel .eln-category[aria-expanded="true"] .eln-category-icon { color: var(--eln-accent); }
#site-editor-add-content-panel .eln-panel { animation: none; }
#site-editor-add-content-panel .eln-content { padding: 8px; min-width: 0; }
#site-editor-add-content-panel .eln-content .eln-overview { border: 0; border-radius: 0; }
#site-editor-add-content-panel .eln-content .eln-content { padding: 8px 0 0; }
#site-editor-add-content-panel [data-editor-library-collection] { border-color: var(--library-line); }
#site-editor-add-content-panel [data-editor-library-collection-trigger] {
  min-height: 36px; gap: 7px; padding: 6px 9px; font-size: 11px;
}
#site-editor-add-content-panel [data-editor-library-collection-trigger] > span:first-child {
  width: 16px; height: 16px; border-radius: 0; background: transparent;
}
#site-editor-add-content-panel [data-editor-library-collection-trigger]:hover,
#site-editor-add-content-panel [data-editor-library-collection][open] > summary {
  background: var(--library-hover); color: var(--library-ink);
}
/* An expanded group has the same surface as hover, in every inspector tab. */
[data-site-editor-root] [data-editor-inspector-panel] .inspector-section-heading:hover,
[data-site-editor-root] [data-editor-inspector-panel] [data-expanded="true"] > .inspector-section-heading {
  background: var(--site-inspector-focus-hover);
}
[data-site-editor-root] [data-editor-inspector-panel] [data-expanded="true"] > .inspector-section-heading > button:first-child > svg:not(.inspector-section-chevron) {
  color: var(--site-inspector-focus-accent);
}

/* Section layouts stay immediately available, in a compact comparison grid. */
#site-editor-add-content-panel [data-editor-layout-library] > section {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0;
}
#site-editor-add-content-panel [data-editor-layout-library] > section > div:first-child { grid-column: 1 / -1; }
#site-editor-add-content-panel [data-editor-layout-library] [data-editor-section-pattern] {
  min-width: 0; margin: 0;
}
#site-editor-add-content-panel [data-editor-layout-library] [data-editor-section-pattern] [aria-hidden="true"][class*="h-20"] {
  height: 64px; margin-bottom: 7px; padding: 6px; gap: 4px;
}

/* Shared template previews keep their full Preview / Place flow. */
#site-editor-add-content-panel .editor-template-library { padding: 0; }
#site-editor-add-content-panel .etl-filters { gap: 8px; margin-bottom: 8px; }
#site-editor-add-content-panel .etl-search { border-radius: 6px; padding-inline: 8px; }
#site-editor-add-content-panel .etl-search input { height: 36px; min-height: 36px; font-size: 11px; }
#site-editor-add-content-panel .etl-grid { gap: 8px; }
#site-editor-add-content-panel .etl-template-card { border-radius: 7px; box-shadow: none; }
#site-editor-add-content-panel .etl-card-preview { height: 112px; padding: 8px; }
#site-editor-add-content-panel .etl-card-copy { padding: 8px; }
#site-editor-add-content-panel .etl-card-copy h3 { margin-top: 4px; font-size: 11px; line-height: 1.4; }
#site-editor-add-content-panel .etl-card-copy > p { margin-top: 4px; font-size: 10px; line-height: 1.5; }
#site-editor-add-content-panel .etl-card-footer { margin-top: 6px; }
#site-editor-add-content-panel .etl-pagination { gap: 8px; margin-top: 8px; }

/* Media uses the same compact rhythm, with one continuous content scroller. */
#site-editor-add-content-panel .editor-media-sidebar {
  --ems-ink: var(--library-ink); --ems-muted: var(--library-muted);
  --ems-line: var(--library-line); --ems-panel: var(--library-panel);
  --ems-soft: var(--library-soft); --ems-accent: var(--library-accent);
  gap: 8px;
}
#site-editor-add-content-panel .ems-heading { gap: 8px; }
#site-editor-add-content-panel .ems-heading h3 { font-size: 11px; }
#site-editor-add-content-panel .ems-heading p { font-size: 10px; line-height: 1.4; }
#site-editor-add-content-panel .ems-manage { min-height: 32px; padding: 5px 8px; border-radius: 6px; font-size: 10px; }
#site-editor-add-content-panel .ems-sources { min-height: 36px; border-radius: 6px; }
#site-editor-add-content-panel .ems-sources > button { min-height: 30px; font-size: 10px; }
#site-editor-add-content-panel .ems-search { min-height: 36px; border-radius: 6px; }
#site-editor-add-content-panel .ems-search input { min-height: 34px; height: 34px; font-size: 11px; }
#site-editor-add-content-panel .ems-upload { min-height: 64px; padding: 9px; border-radius: 7px; column-gap: 8px; }
#site-editor-add-content-panel .ems-upload-group { gap: 5px; }
#site-editor-add-content-panel .eml-stock-library .eml-stock-views { min-height: 36px; }
#site-editor-add-content-panel .eml-stock-library .eml-stock-views > button { min-height: 32px; padding: 5px; font-size: 10px; }
#site-editor-add-content-panel .eml-stock-search-form input { min-height: 36px; font-size: 11px; }
#site-editor-add-content-panel .eml-stock-orientations { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 4px !important; }
#site-editor-add-content-panel .eml-stock-orientations > button { min-width: 0; padding-inline: 3px; font-size: 10px !important; }

/* Structural editor wrappers must not invent rounded authored surfaces.
   An authored inline border radius still wins over this default. */
[data-site-editor-root] [data-editor-canvas] [data-editor-section-column] { border-radius: 0; }

@media (max-width: 767px), (pointer: coarse) {
  #site-editor-add-content-panel [data-editor-library-tabs] > [role="tab"],
  #site-editor-add-content-panel .eln-category,
  #site-editor-add-content-panel [data-editor-library-collection-trigger] { min-height: 44px; height: auto; }
  #site-editor-add-content-panel :is(.ems-manage, .ems-sources > button, .ems-search, .etl-search input),
  #site-editor-add-content-panel .ems-search input,
  #site-editor-add-content-panel .eml-stock-library .eml-stock-views > button,
  #site-editor-add-content-panel .eml-stock-search-form input { min-height: 44px; height: auto; }
  #site-editor-add-content-panel :is(.ems-search input, .etl-search input, .eml-stock-search-form input) { font-size: 16px; }
  #site-editor-add-content-panel .eml-stock-orientations > button { min-height: 44px; }
  #site-editor-add-content-panel .ems-upload { min-height: 72px; }
  #site-editor-add-content-panel .ems-sources { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  #site-editor-add-content-panel .eln-category-chevron { transition: none; }
}
@media (forced-colors: active) {
  #site-editor-add-content-panel .eln-category[aria-expanded="true"],
  [data-site-editor-root] [data-expanded="true"] > .inspector-section-heading { outline: 1px solid Highlight; outline-offset: -1px; }
}

/* The existing shell pins its handle to the old 23rem library width. */
[data-site-editor-root] button[data-editor-panel-collapse-tab="library"] {
  left: min(320px, calc(100vw - 16px)) !important;
}
