/* The case browser lives outside the scaled showcase so its toolbar stays
   at the specified CSS-pixel size and can stick to the viewport. */
.case-browser {
  position: relative;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  background: #000;
  container: cases / inline-size;
}
.case-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 80px;
  padding: 20px var(--content-right-gap, 32px) 20px 34px;
  background: #000;
}
.case-tablist { display: flex; align-items: center; gap: 12px; }
.case-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 98px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a1a1a1;
  font: 400 18px/1 var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
}
.case-tab[aria-selected="true"] {
  width: 148px;
  background: linear-gradient(90deg, #6fbcf1, #2a70e3);
  color: #fff;
}
.case-tab:hover { color: #fff; }
.case-tab-icon { display: none; flex: none; width: 30px; height: 30px; filter: brightness(0) invert(1); }
.case-tab[aria-selected="true"] .case-tab-icon { display: block; }
.case-search-group { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 0; }
.case-search-copy { margin: 0; color: transparent; background: linear-gradient(90deg, #f9cd7e, #d49f58); background-clip: text; -webkit-background-clip: text; font: 400 18px/26px var(--font-ui); white-space: nowrap; }
.case-search {
  position: relative;
  display: flex;
  flex: 0 0 350px;
  align-items: center;
  gap: 9px;
  width: 350px;
  height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #85888b;
  border-radius: 10px;
  background: #13181d;
}
.case-search > img { flex: none; width: 22px; height: 22px; filter: brightness(0) invert(.65); }
.case-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #eee;
  font: 400 18px/1 var(--font-ui);
}
.case-search input::placeholder { color: #999c9f; opacity: 1; }
.case-search input::-webkit-search-cancel-button { display: none; }
.case-search:focus-within { border-color: #6fbcf1; box-shadow: 0 0 0 2px #6fbcf126; }
.case-search-clear { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #aeb3b8; font-size: 22px; line-height: 1; cursor: pointer; }
.case-tab:focus-visible, .case-search-clear:focus-visible, .case-result:focus-visible { outline: 2px solid #6fbcf1; outline-offset: 4px; }
.case-panel { outline: none; scroll-margin-top: 92px; }
.case-panel-frame, .case-footer-frame { position: relative; width: 100%; overflow: hidden; }
.case-panel-frame { min-height: calc(100svh - 80px); }
.case-panel-canvas, .case-footer-canvas { position: absolute; top: 0; left: 0; width: 1920px; transform-origin: top left; }
.case-panel-canvas { display: flex; flex-direction: column; gap: 60px; padding: 32px 0 60px; }
.case-panel-canvas > section, .case-panel-canvas > .motion-heading { position: relative; top: auto; flex: none; transform: none; }
.case-panel-canvas > .scene-section { height: 1222px; }
.case-panel-canvas > .photoreal-section { height: 824px; }
.case-panel-canvas > .shortform-section { height: 914px; }
.case-panel-canvas :is(.scene-gallery, .photoreal-gallery, .shortform-collage) { top: 0; }
.case-create-actions {
  position: fixed;
  z-index: 9;
  right: calc(var(--content-right-gap, 32px) + 60px);
  bottom: 60px;
}
.case-create-actions > .lime-button { box-shadow: 0 6px 24px #0005; }
.case-create-actions[hidden], .case-create-actions > [hidden] { display: none; }
.case-create-actions > .lime-button:focus-visible { outline: 2px solid #6fbcf1; outline-offset: 4px; }
.case-panel-canvas .photo-track { animation-play-state: paused; }
.case-panel:not([hidden]) .photo-track { animation-play-state: running; }
.case-panel .photo-row:hover .photo-track { animation-play-state: paused; }
.case-panel [id] { scroll-margin-top: 110px; }
.case-panel[hidden], .case-panel-frame[hidden], .case-results[hidden], .case-feedback[hidden], .case-search-clear[hidden] { display: none; }
.case-feedback { min-height: 54px; margin: 0; padding: 18px 34px; color: #999fa7; font-size: 14px; }
.case-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; min-height: calc(100svh - 134px); align-content: start; padding: 12px 34px 48px; }
.case-result { display: block; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: #15171b; color: #d8dadd; text-align: left; cursor: pointer; }
.case-result img, .case-result video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #1c2027; }
.case-result span { display: block; padding: 12px; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.case-result:hover { background: #20252c; }
body.case-tabs-pinned .case-toolbar { padding-right: max(240px, calc(var(--content-right-gap, 32px) + 210px)); }
body.case-tabs-pinned .account-actions { top: 20px; }
body.sidebar-layout:is(.projects-view-active, .assets-view-active, .account-view-active) .case-browser { display: none; }
@container cases (max-width: 1350px) {
  .case-toolbar { grid-template-columns: minmax(0, 1fr); gap: 24px; min-height: 140px; }
  body.case-tabs-pinned .case-toolbar { padding-right: var(--content-right-gap, 32px); }
  .case-tablist { padding-right: 210px; }
  .case-search-group { justify-content: flex-end; }
  .case-panel-frame { min-height: calc(100svh - 140px); }
  .case-panel { scroll-margin-top: 152px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-panel:not([hidden]) .photo-track { animation-play-state: paused; }
}

.case-browser :is(.photo-tile, .case-result) { position: relative; }
.case-browser .case-remix-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(16px * var(--case-remix-scale, 1));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #2a70e3;
  color: #fff;
  font: 500 14px/1 var(--font-ui);
  white-space: nowrap;
  box-shadow: 0 3px 12px #0003;
  transform: translateX(-50%) scale(var(--case-remix-scale, 1));
  transform-origin: center bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  cursor: pointer;
}
.case-browser .case-result > .case-remix-button { bottom: 16px; transform: translateX(-50%); }
.case-browser :is(.scene-tile, .photo-tile, .portrait-tile, .shortform-tile, .shortform-feature, .case-result):is(:hover, :focus-within) > .case-remix-button {
  opacity: 1;
  pointer-events: auto;
}
.case-browser .case-remix-button:hover { background: #347df1; }
.case-browser .case-remix-button:focus-visible { outline: 2px solid #b8e9f2; outline-offset: 3px; }
.case-browser .portrait-tile > .lime-button { display: none; }
.case-composer {
  position: fixed;
  z-index: 120;
  left: calc(50% + var(--sidebar-width) / 2);
  bottom: 40px;
  width: min(940px, calc(100vw - var(--sidebar-width) - 48px));
  height: var(--case-composer-height, 180px);
  transform: translateX(-50%);
  pointer-events: none;
}
.case-composer[hidden] { display: none; }
.case-composer .creator-bridge-loading { pointer-events: auto; border: 3px solid #3b3d43; border-radius: 10px; background: #202126; }
body.sidebar-layout #creatorBridgeFrame.is-case-composer { z-index: 121; }
body.case-composer-open .case-create-actions { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .case-browser .case-remix-button { transition: none; } }

