/* Shared sidebar styles for all main/editor pages */

.sidebar,
.sidebar * {
  box-sizing: border-box;
}

.sidebar {
  position: fixed;
  z-index: 10;
  display: flex;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10vw;
  min-width: 120px;
  max-width: 220px;
  border-right: 1px solid #c7cdd4;
  gap: 10px;
  padding: 16px 12px;
  background: #e3e6ea;
  flex-direction: column;
}

.sb-title {
  align-items: center;
  color: #1f2d3b;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
  width: 100%;
  cursor: default;
  user-select: none;
}

.sb-title * {
  cursor: inherit;
}

.sb-title-logo {
  display: block;
  width: min(112px, 100%);
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.sb-title-eye {
  fill: currentColor;
  stroke: none;
}

.sb-title-eye-glint {
  fill: #fff;
  stroke: none;
}

.sb-title-name {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3em;
  line-height: 1;
  padding-left: .3em;
}

.sb-menu {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-direction: column;
}

.sidebar-nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 16px;
  color: #64707c;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  flex-direction: row;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  text-align: left;
  text-decoration: none;
  transition: background-color .2s, color .2s, transform .2s;
  width: 100%;
}

.sidebar-nav-item:hover {
  background: #f3f4f6;
  color: #18181b;
}

.sidebar-nav-item:active {
  transform: scale(.96);
}

.sidebar-nav-item.active {
  background: #fff;
  color: #18181b;
  box-shadow: 0 5px 18px rgba(31, 45, 59, .09);
}

.sidebar-nav-icon {
  flex: 0 0 auto;
  height: 20px;
  transition: transform .2s;
  width: 20px;
}

.sidebar-nav-item:hover .sidebar-nav-icon {
  transform: scale(1.1);
}

.sidebar-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-user {
  color: #425566;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sb-user-button {
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  padding: 7px 9px;
  transition: background-color .2s, color .2s, transform .2s;
}

.sb-user-button:hover {
  background: #f3f4f6;
  color: #18181b;
}

.sb-user-button:active {
  transform: scale(.96);
}

.sb-project-relation {
  color: #425566;
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  justify-content: flex-end;
  margin-left: auto;
  white-space: nowrap;
}

.sb-project-relation:empty {
  display: none;
}

.sb-user-row {
  align-items: center;
  border-top: 1px solid #c7cdd4;
  display: flex;
  flex-direction: row;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 12px;
}

.sb-user-menu {
  background: #fff;
  border: 1px solid #c7cdd4;
  border-radius: 12px;
  bottom: 80%;
  box-shadow: 0 12px 30px rgba(31, 45, 59, .18);
  left: -5%;
  padding: 12px;
  position: absolute;
  width: 130%;
  z-index: 2;
}

.sb-user-menu[hidden] {
  display: none;
}

.sb-user-menu-name {
  color: #1f2d3b;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-user-menu-id {
  color: #6c7a87;
  font-size: 11px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.sb-logout-button {
  background: #fff1f0;
  border: 1px solid #f2b8b5;
  border-radius: 8px;
  color: #c5312d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
  padding: 7px 10px;
  width: 100%;
}

.sb-logout-button:hover {
  background: #ffe4e2;
}

.project-readonly-control,
.project-readonly-control:hover {
  cursor: not-allowed !important;
  filter: grayscale(1) !important;
  opacity: .55 !important;
}

.sb-bottom {
  display: flex;
  margin-top: auto;
  gap: 10px;
  flex-direction: column;
  position: relative;
}

.status {
  position: sticky;
  z-index: 100;
  display: flex;
  bottom: 0;
  min-height: 34px;
  border-top: 1px solid var(--episode-status-border, #c7cdd4);
  color: var(--episode-status-color, #3f5b72);
  padding: 7px 14px;
  margin: auto -14px -14px;
  background: var(--episode-status-bg, rgba(244, 247, 249, .96));
  align-items: center;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 20px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sb-editor-nav,
.sb-editor-links {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.sb-editor-nav button {
  align-items: center;
  display: flex;
  gap: 10px;
  width: 100%;
  border: 1px solid #93a4b5;
  border-radius: 8px;
  color: #233b50;
  padding: 4px 6px;
  background: #eef2f6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  transition: background-color .2s, color .2s, transform .2s;
}

.nav-editor-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  transition: transform .2s;
  width: 32px;
}

.nav-editor-icon svg {
  display: block;
  height: 32px;
  width: 32px;
}

.nav-editor-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-editor-nav button:hover {
  transform: none;
  background: #e2eaf1;
}

.sb-editor-nav button:hover .nav-editor-icon {
  transform: scale(1.1);
}

.sb-editor-nav button:active {
  transform: scale(.96);
}

.sb-editor-nav button.active {
  --nav-editor-card-fill: #deebf7;
  border-color: #2f7fb8;
  color: #1f547a;
  background: #deebf7;
}

[data-hidden-for-short-film][hidden] {
  display: none !important;
}

.sb-back-row {
  border-top: 1px solid #b8c1cb;
  padding-top: 10px;
}

.main {
  min-height: 100vh;
  margin-left: clamp(120px, 10vw, 220px);
}
