/* Shared presentation layer for the video generation galleries. */

body.empty-state-active .top-banner,
body.empty-state-active .top-banner .banner-text {
  color: #262626 !important;
}

body.empty-state-active .main-content > .top-banner-wrapper,
body.sidebar-collapsed.empty-state-active .main-content > .top-banner-wrapper {
  left: -12px !important;
  right: auto !important;
  width: calc(100% + 24px) !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-content.active {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  padding: 0 !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-option {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  min-height: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 4px 7px !important;
  border-radius: 10px !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-option:hover {
  background: #f7f7f8 !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-option.selected {
  background: #f1f1f2 !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-checkbox {
  width: 14px !important;
  height: 14px !important;
  margin-right: 8px !important;
  flex: 0 0 14px !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-icon {
  width: 28px !important;
  height: 28px !important;
  margin-right: 8px !important;
  border-radius: 8px !important;
  flex: 0 0 28px !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-info {
  min-width: 0 !important;
}

body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-name {
  margin: 0 !important;
  overflow: hidden !important;
  color: #262626 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (min-width: 769px) {
  body.empty-state-active .main-content {
    padding: 0 12px 16px !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
  }

  body.empty-state-active .chatbot-container.empty-state {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
    padding: 58px 18px 20px !important;
    transform: none !important;
    align-items: center !important;
    overflow: visible !important;
  }

  body.empty-state-active .chatbot-container.empty-state .center-title-container {
    display: block !important;
    width: min(880px, calc(100% - 48px)) !important;
    margin: 0 auto 52px !important;
    padding: 0 !important;
    text-align: center !important;
  }

  body.empty-state-active .chatbot-container.empty-state .center-title-main,
  body.empty-state-active .chatbot-container.empty-state .center-title-sub {
    margin: 0 !important;
    color: #171717 !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: 34px !important;
    font-weight: 850 !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
  }

  body.empty-state-active .chatbot-container.empty-state .center-title-desc {
    max-width: 760px !important;
    margin: 12px auto 0 !important;
    color: #525252 !important;
    font-size: 16px !important;
    font-weight: 650 !important;
    line-height: 1.6 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
  }

  body.empty-state-active .chatbot-container.empty-state > .chatbot,
  body.empty-state-active .chatbot-container.empty-state > .chatbot:hover {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: min(1040px, calc(100% - 96px)) !important;
    max-width: 1040px !important;
    margin: 0 auto !important;
    padding: 17px 19px 18px !important;
    transform: none !important;
    border: 1px solid rgba(23, 23, 23, 0.12) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(18px) !important;
    z-index: 10 !important;
  }

  body.empty-state-active .chatbot-container.empty-state > .video-showcase-tabs {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 236px !important;
    max-width: calc(100% - 32px) !important;
    align-self: flex-end !important;
    justify-content: stretch !important;
    margin: 78px 0 28px auto !important;
    padding: 3px !important;
    gap: 4px !important;
    border: 1px solid rgba(23, 23, 23, 0.1) !important;
    border-radius: 14px !important;
    background: rgba(235, 235, 236, 0.94) !important;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
  }

  body.empty-state-active .chatbot-container.empty-state > .video-showcase-tabs .video-showcase-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 34px !important;
    padding: 0 11px !important;
    border-radius: 10px !important;
    color: #737373 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
  }

  body.empty-state-active .chatbot-container.empty-state > .video-showcase-tabs .video-showcase-tab.is-active {
    color: #171717 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 11px rgba(0, 0, 0, 0.1) !important;
  }

  body.empty-state-active .chatbot-container.empty-state .excellent-examples-section,
  body.empty-state-active .chatbot-container.empty-state .recent-projects-section {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: calc(100vh - 250px) !important;
    margin: 0 auto 72px !important;
    padding: 0 !important;
  }

  body.empty-state-active .chatbot-container.empty-state[data-active-tab="examples"] .recent-projects-section,
  body.empty-state-active .chatbot-container.empty-state[data-active-tab="history"] .excellent-examples-section {
    display: none !important;
  }

  body.empty-state-active .chatbot-container.empty-state .examples-header,
  body.empty-state-active .chatbot-container.empty-state .recent-projects-header {
    justify-content: flex-start !important;
    margin: 0 0 18px !important;
    padding: 0 4px !important;
    text-align: left !important;
  }

  body.empty-state-active .chatbot-container.empty-state .examples-title,
  body.empty-state-active .chatbot-container.empty-state .recent-projects-title {
    color: #171717 !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
  }

  body.empty-state-active .chatbot-container.empty-state .examples-masonry,
  body.empty-state-active .chatbot-container.empty-state .recent-projects-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-content: start !important;
  }

  body.empty-state-active .chatbot-container.empty-state .masonry-item,
  body.empty-state-active .chatbot-container.empty-state .recent-project-card {
    border-radius: 16px !important;
  }

  body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-dropdown {
    top: auto !important;
    right: 0 !important;
    bottom: calc(100% + 10px) !important;
    left: auto !important;
    width: 336px !important;
    min-width: 336px !important;
    max-width: min(336px, calc(100vw - 32px)) !important;
    max-height: 190px !important;
    margin: 0 !important;
    padding: 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid rgba(23, 23, 23, 0.1) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14) !important;
    backdrop-filter: blur(18px) !important;
  }

}

@media (max-width: 1024px) and (min-width: 769px) {
  body.empty-state-active .chatbot-container.empty-state > .chatbot,
  body.empty-state-active .chatbot-container.empty-state > .chatbot:hover {
    width: calc(100% - 48px) !important;
  }

  body.empty-state-active .chatbot-container.empty-state .examples-masonry,
  body.empty-state-active .chatbot-container.empty-state .recent-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body.empty-state-active .chatbot-container.empty-state {
    padding-top: 30px !important;
  }

  body.empty-state-active .chatbot-container.empty-state .center-title-container {
    margin-bottom: 24px !important;
  }

  body.empty-state-active .chatbot-container.empty-state .center-title-main,
  body.empty-state-active .chatbot-container.empty-state .center-title-sub {
    color: #171717 !important;
    font-size: 24px !important;
    letter-spacing: 0 !important;
  }

  body.empty-state-active .chatbot-container.empty-state .center-title-desc {
    max-width: 340px !important;
    margin: 9px auto 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
  }

  body.empty-state-active .chatbot-container.empty-state > .chatbot,
  body.empty-state-active .chatbot-container.empty-state > .chatbot:hover {
    margin-bottom: 46px !important;
    border-color: #dedede !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08) !important;
  }

  body.empty-state-active .chatbot-container.empty-state > .video-showcase-tabs {
    order: initial !important;
    margin: 0 0 22px !important;
    border-color: #dedede !important;
    background: #eeeeef !important;
  }

  body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-dropdown {
    max-height: min(240px, calc(100dvh - 24px)) !important;
    padding: 10px !important;
    border-radius: 18px !important;
  }

  body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-option {
    min-height: 44px !important;
    height: 44px !important;
    padding: 5px 8px !important;
  }

  body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-checkbox {
    width: 15px !important;
    height: 15px !important;
    flex-basis: 15px !important;
  }

  body.empty-state-active .chatbot-container.empty-state .chatbot #language-selector-container .model-icon {
    width: 30px !important;
    height: 30px !important;
    flex-basis: 30px !important;
  }
}

/* Ad video pages use landscape product-video previews only. */
body.ad-video-page .examples-masonry,
body.ad-video-page .recent-projects-grid,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .examples-masonry,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-content: start !important;
}

body.ad-video-page .masonry-item,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .masonry-item {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
  overflow: hidden !important;
}

body.ad-video-page .example-video-card,
body.ad-video-page .example-video-cover,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .example-video-card,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .example-video-cover {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
  border-radius: inherit !important;
}

body.ad-video-page .recent-project-cover,
body.ad-video-page .recent-project-card.is-skeleton .recent-project-cover {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
}

body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-project-card {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
  overflow: hidden !important;
}

body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-project-cover,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-project-card.is-skeleton .recent-project-cover {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

body.ad-video-page .example-video-cover img,
body.ad-video-page .example-video-cover video,
body.ad-video-page .recent-project-cover img,
body.ad-video-page .recent-project-cover video,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .example-video-cover img,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .example-video-cover video,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-project-cover img,
body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-project-cover video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 1180px) {
  body.ad-video-page .examples-masonry,
  body.ad-video-page .recent-projects-grid,
  body.ad-video-page.empty-state-active .chatbot-container.empty-state .examples-masonry,
  body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body.ad-video-page .examples-masonry,
  body.ad-video-page .recent-projects-grid,
  body.ad-video-page.empty-state-active .chatbot-container.empty-state .examples-masonry,
  body.ad-video-page.empty-state-active .chatbot-container.empty-state .recent-projects-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

body.ad-video-page .video-result-dialog[data-ratio="16:9"],
body.ad-video-page .video-result-dialog[data-ratio="4:3"],
body.ad-video-page .video-result-dialog[data-ratio="3:2"],
body.ad-video-page .video-result-dialog[data-ratio="21:9"] {
  width: min(1420px, calc(100vw - 96px)) !important;
  height: auto !important;
  max-height: calc(100vh - 96px) !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr) !important;
  align-items: center !important;
}

body.ad-video-page .video-result-dialog[data-ratio="16:9"] .video-result-preview,
body.ad-video-page .video-result-dialog[data-ratio="4:3"] .video-result-preview,
body.ad-video-page .video-result-dialog[data-ratio="3:2"] .video-result-preview,
body.ad-video-page .video-result-dialog[data-ratio="21:9"] .video-result-preview {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
  align-self: center !important;
  background: #111827 !important;
}

body.ad-video-page .video-result-dialog[data-ratio="16:9"] .video-result-preview video,
body.ad-video-page .video-result-dialog[data-ratio="4:3"] .video-result-preview video,
body.ad-video-page .video-result-dialog[data-ratio="3:2"] .video-result-preview video,
body.ad-video-page .video-result-dialog[data-ratio="21:9"] .video-result-preview video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body.ad-video-page .video-result-dialog[data-ratio="16:9"] .video-result-panel,
body.ad-video-page .video-result-dialog[data-ratio="4:3"] .video-result-panel,
body.ad-video-page .video-result-dialog[data-ratio="3:2"] .video-result-panel,
body.ad-video-page .video-result-dialog[data-ratio="21:9"] .video-result-panel {
  height: auto !important;
  max-height: min(720px, calc(100vh - 96px)) !important;
}

body.ad-video-page .example-detail-dialog[data-ratio="16:9"],
body.ad-video-page .example-detail-dialog[data-ratio="4:3"],
body.ad-video-page .example-detail-dialog[data-ratio="3:2"],
body.ad-video-page .example-detail-dialog[data-ratio="21:9"] {
  width: min(1420px, calc(100vw - 72px)) !important;
  height: auto !important;
  max-height: calc(100vh - 44px) !important;
}

body.ad-video-page .example-detail-dialog[data-ratio="16:9"] .video-example-layout,
body.ad-video-page .example-detail-dialog[data-ratio="4:3"] .video-example-layout,
body.ad-video-page .example-detail-dialog[data-ratio="3:2"] .video-example-layout,
body.ad-video-page .example-detail-dialog[data-ratio="21:9"] .video-example-layout {
  --example-detail-height: auto;
  --example-detail-video-width: auto;
  width: 100% !important;
  height: auto !important;
  max-height: calc(100vh - 44px) !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr) !important;
  align-items: center !important;
}

body.ad-video-page .example-detail-dialog[data-ratio="16:9"] .example-detail-stage.video-stage,
body.ad-video-page .example-detail-dialog[data-ratio="4:3"] .example-detail-stage.video-stage,
body.ad-video-page .example-detail-dialog[data-ratio="3:2"] .example-detail-stage.video-stage,
body.ad-video-page .example-detail-dialog[data-ratio="21:9"] .example-detail-stage.video-stage {
  width: auto !important;
  height: auto !important;
  align-self: center !important;
  background: #111827 !important;
}

body.ad-video-page .example-detail-dialog[data-ratio="16:9"] .example-detail-video-box,
body.ad-video-page .example-detail-dialog[data-ratio="4:3"] .example-detail-video-box,
body.ad-video-page .example-detail-dialog[data-ratio="3:2"] .example-detail-video-box,
body.ad-video-page .example-detail-dialog[data-ratio="21:9"] .example-detail-video-box {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
  background: #111827 !important;
}

body.ad-video-page .example-detail-dialog[data-ratio="16:9"] .example-detail-video-box video,
body.ad-video-page .example-detail-dialog[data-ratio="4:3"] .example-detail-video-box video,
body.ad-video-page .example-detail-dialog[data-ratio="3:2"] .example-detail-video-box video,
body.ad-video-page .example-detail-dialog[data-ratio="21:9"] .example-detail-video-box video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body.ad-video-page .example-detail-dialog[data-ratio="16:9"] .example-detail-stage.script-stage,
body.ad-video-page .example-detail-dialog[data-ratio="4:3"] .example-detail-stage.script-stage,
body.ad-video-page .example-detail-dialog[data-ratio="3:2"] .example-detail-stage.script-stage,
body.ad-video-page .example-detail-dialog[data-ratio="21:9"] .example-detail-stage.script-stage {
  height: auto !important;
  max-height: min(720px, calc(100vh - 44px)) !important;
}

@media (max-width: 900px) {
  body.ad-video-page .video-result-dialog[data-ratio],
  body.ad-video-page .example-detail-dialog[data-ratio] {
    width: min(560px, calc(100vw - 48px)) !important;
    height: auto !important;
    max-height: calc(100vh - 48px) !important;
    overflow: auto !important;
  }

  body.ad-video-page .video-result-dialog[data-ratio] {
    grid-template-columns: 1fr !important;
  }

  body.ad-video-page .example-detail-dialog[data-ratio] .video-example-layout {
    grid-template-columns: 1fr !important;
    max-height: none !important;
  }

  body.ad-video-page .video-result-dialog[data-ratio] .video-result-preview,
  body.ad-video-page .example-detail-dialog[data-ratio] .example-detail-video-box {
    height: auto !important;
    aspect-ratio: var(--video-card-aspect-ratio, 16 / 9) !important;
  }

  body.ad-video-page .video-result-dialog[data-ratio] .video-result-panel,
  body.ad-video-page .example-detail-dialog[data-ratio] .example-detail-stage.script-stage {
    max-height: none !important;
  }
}
