/* Vue-Office preview integration and a viewport-locked file workspace. */
html:has(body.file-storage-layout-active),
body.file-storage-layout-active {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.app.file-storage-layout-active {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.app.file-storage-layout-active .sidebar,
.app.file-storage-layout-active .main-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.app.file-storage-layout-active .content {
  height: calc(100vh - 62px);
  height: calc(100dvh - 62px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.app.file-storage-layout-active .file-storage-prototype {
  height: 100%;
  min-height: 0;
  padding: 0 10px 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.app.file-storage-layout-active .file-storage-prototype .file-storage-main,
.app.file-storage-layout-active .file-storage-prototype .file-storage-panel,
.app.file-storage-layout-active .file-storage-prototype .file-storage-list {
  min-height: 0;
}

.app.file-storage-layout-active .file-storage-prototype .file-storage-main,
.app.file-storage-layout-active .file-storage-prototype .file-storage-panel {
  overflow: hidden;
}

.app.file-storage-layout-active .file-storage-prototype .file-storage-list {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* The move/copy dialog intentionally has a padded action bar with two distinct targets. */
.file-storage-prototype .fs-location-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  padding: 16px 22px 18px;
  border-top: 1px solid #e7edf1;
  background: #fff;
}

.file-storage-prototype .fs-location-dialog > footer .secondary-btn,
.file-storage-prototype .fs-location-dialog > footer .primary-btn {
  min-width: 82px;
  height: 38px;
  justify-content: center;
}

.file-storage-prototype .fs-preview-office {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f4f7f9;
}

.file-storage-prototype .fs-preview-office .vue-office-docx {
  min-height: 100%;
  padding: 24px;
  box-sizing: border-box;
}

.file-storage-prototype .fs-preview-office .docx-wrapper {
  box-shadow: 0 3px 15px rgba(37, 59, 77, .12);
}

.file-storage-prototype .fs-preview-office .vue-office-excel,
.file-storage-prototype .fs-preview-office .vue-office-excel-main,
.file-storage-prototype .fs-preview-office .vue-office-pdf {
  min-height: 100%;
  height: 100%;
}

.file-storage-prototype .fs-preview-office .vue-office-pdf {
  overflow: auto !important;
}

@media (max-width: 780px) {
  html:has(body.file-storage-layout-active),
  body.file-storage-layout-active,
  .app.file-storage-layout-active,
  .app.file-storage-layout-active .sidebar,
  .app.file-storage-layout-active .main-shell,
  .app.file-storage-layout-active .content,
  .app.file-storage-layout-active .file-storage-prototype,
  .app.file-storage-layout-active .file-storage-prototype .file-storage-main {
    height: auto;
    overflow: visible;
  }

  .file-storage-prototype .fs-location-dialog > footer {
    padding: 14px 16px;
  }
}
