#wrapper, .wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

:root {
  color-scheme: light;
  scrollbar-color: #C1C1C1 rgba(0, 0, 0, 0);
}

[data-bs-theme="dark"] :root {
  color-scheme: dark;
}

input[type="checkbox"],
input[type="radio"],
select {
  color-scheme: inherit;
}

::-webkit-scrollbar-track {
  background: var(--bs-body-bg, #ffffff);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bs-dark, #212529);
}

/* for left right layout */
#main {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.side-panel {
  flex: 0 0 22%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bs-body-bg);
  transition: flex 0.3s ease-in-out;
  -webkit-transition: flex 0.3s ease-in-out;
  -moz-transition: flex 0.3s ease-in-out;
}

.user-panel .side-panel-north {
  height: 49px;
}

.user-panel {
  position: relative;
}

.main-panel {
  flex: 1 0 78%;
  display: flex;
  flex-direction: column;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

@media (max-width: 767px) {
  .side-panel {
    position:fixed;
    top: 0;
    left:-300px;
    z-index: 1031;
    width: 300px;
    max-width: calc(100% - 40px);
    height:100%;
    -webkit-transition: left 0.3s ease, width 0.3s ease;
    -moz-transition: left 0.3s ease, width 0.3s ease;
    transition: left 0.3s ease, width 0.3s ease;
  }
  .side-panel.left-zero {
    left: 0;
  }
}

.side-panel-north,
.main-panel-north {
  position: relative;
  padding: .5rem 1rem;
  display: flex;
  flex-shrink: 0;
  background-color: var(--bs-header-bg);
  border-bottom: 1px solid var(--bs-border-secondary-color);
  z-index: 100;
}

.side-panel-center,
.main-panel-center {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}

.main-panel-center {
  flex-direction: row;
}

.side-panel-center,
.side-panel-footer {
  min-height: 0;
  border-right: 1px solid var(--bs-border-secondary-color);
}

.cur-view-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 0;
}

.cur-view-path {
  padding: 8px 16px;
  height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  justify-content: space-between;
  border-bottom: 1px solid var(--bs-border-secondary-color);
}

@keyframes displayDirPath {
  from {
    top: -32px;
  }
  to {
    top: 0;
  }
}

.cur-view-path .animation-children .cur-dir-path {
  position: relative;
  animation: displayDirPath .3s ease-in-out 1;
}

.cur-view-path .cur-dir-path {
  height: 32px;
}

.cur-view-path .cur-view-path-btn {
  cursor: pointer;
  font-size: 14px;
  height: 24px;
  min-width: 24px;
  width: fit-content;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.cur-view-path .cur-view-path-btn.sf3-font,
.cur-view-path .cur-view-path-btn .sf3-font {
  font-size: 16px;
  color: var(--bs-icon-color);
}

.cur-view-path .cur-view-path-btn:hover {
  background-color: var(--bs-hover-bg);
  border-radius: 3px;
}

.cur-view-path .cur-view-path-btn .sf3-font-down {
  margin-left: 2px;
}

.cur-view-path:after {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  content: '';
}

.cur-view-content {
  padding: 0rem 1rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.table-container {
  flex: 1;
  padding: 0 1rem 10rem;
  position: relative;
}

.repos-container {
  padding-bottom: 10rem;
  background-color: var(--bs-body-bg);
}

.table-drop-active::before {
  border: 1px solid rgba(69, 170, 242);
  content: '';
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  left: 0;
  z-index: -1;
}

.cur-view-content .hd {
  padding-bottom: 0;
  margin-bottom: .5em;
  height: 48px;
  padding: 9px 10px;
  background: #f0f0f0;
  border-radius: 2px;
}

.cur-view-content .tip {
  font-size: 14px;
}

/* for reach/router */
.reach-router,
div[tabindex="-1"][role="group"] {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.header {
  padding: 0.625rem;
  display: flex;
  flex-shrink:0;
  align-items: center;
  justify-content: space-between;
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-secondary-color);
  box-shadow: 0 3px 2px -2px rgba(200,200,200,.15);
}

.header .cur-file-info {
  display: flex;
  margin-left: 0.5rem;
}

.header .info-item {
  display: flex;
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 0.5rem;
  align-items: center;
  justify-content: center;
}

.header .file-copywriting {
  margin-left: 0.5rem;
  font-size: 1rem;
  font-weight: normal;
  color: var(--bs-body-secondary-color);
}

.header .file-feature {
  width: 2.9375rem;
  height: 2.9375rem;
  font-size: 1.8rem;
  background-color: #fbcb09;
  color: #fff;
}

.header .file-operation-btn {
  margin-right: 0.25rem;
}

img[src=""],img:not([src]) { /* for first loading img*/
  opacity:0;
}

.cur-view-path.share-upload-nav {
  padding: 0 1rem;
}

.cur-view-container .sf3-font-star-empty.sf3-font,
.cur-view-container .sf3-font-star.sf3-font {
  color: var(--bs-icon-tertiary-color);
}

.path-container {
  display: flex;
  align-items: center;
  word-break: keep-all;
  height: 24px;
  overflow: hidden;
}

.path-container a, .path-container span {
  max-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-container span, .path-container a {
  flex-shrink: 1;
}

.path-container span:first-child, .path-container span:last-child {
  flex-shrink: 0;
}

.path-container span.path-file-name,
.path-container span.path-repo-name {
  flex-shrink: 1;
}

.path-container .op-btn .sf3-font {
  color: #444;
}

.dir-tool {
  height: 1.5rem;
  display: flex;
  align-items: center;
  text-align: center;
}

.sf-tip-default {
  font-size: 13px;
  color: var(--bs-body-secondary-color);
}

.nav-indicator-container .nav-item {
  min-width: fit-content;
}

.nav-indicator-container .nav-item .nav-link {
  border: none;
  min-width: fit-content;
}

.nav-indicator-container::before {
  content: '';
  position: absolute;
  bottom: -2px;
  height: 2px;
  width: var(--indicator-width);
  background: #ED7109;
  border-radius: 2px;
  transition: transform 0.3s ease;
  transform: translateX(var(--indicator-offset));
}
