/* Header */
.main-header {
  height: 60px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  background-color: rgb(255, 255, 255);
  position: sticky;
  top: 0;
  z-index: 98;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.header-right {
  display: flex;
  gap: 16px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: #222222cc;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
  z-index: 99;
}

.sidebar-overlay.is-show {
  opacity: 1;
  visibility: visible;
}

.sidebar-open {
  overflow: hidden;
}

/* drawer */
.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(90vw, 335px);
  height: 100vh;
  background: #f7f7f7;
  transform: translateX(-100%);
  transition: transform 0.32s ease;
  z-index: 9999;
  overflow-y: auto;
}

.sidebar-drawer.is-open {
  transform: translateX(0);
}

.sidebar-inner {
  min-height: 100%;
  padding: 18px 20px 40px;
}

.sidebar-top {
  position: relative;
  padding-top: 24px;
  margin-bottom: 36px;
}

.sidebar-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user {
  padding-top: 28px;
}

.sidebar-user-avatar {
  background-color: #ededed;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-login-text {
  margin: 0;
  font-family: "Pretendard", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 140%;
  color: #999;
}

.sidebar-login-link {
  color: #999;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-login-rest {
  color: #999;
}

.sidebar-user-name {
  margin: 0 0 6px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.sidebar-user-meta {
  margin: 0;
  font-size: 14px;
  color: #b8b8b8;
}

.sidebar-user-meta span {
  margin: 0 4px;
}

.sidebar-user-meta a {
  color: #b8b8b8;
  text-decoration: none;
}

/* menu */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-group {
  border-bottom: 0;
}

.menu-row {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-size: 18px;
}

/* .menu-plus {
  font-size: 34px;
  font-weight: 300;
  color: #555;
  line-height: 1;
} */

.submenu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-6px);
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    transform 0.25s ease,
    padding 0.25s ease;
}

.menu-group.open .submenu {
  max-height: 300px;
  opacity: 1;
  padding: 6px 0 10px 18px;
  transform: translateY(0);
}
.submenu-link {
  color: var(--color-5);
  font-weight: 300;
  text-decoration: none;
  font-size: 16px;
}

.submenu-link:hover {
  color: #222;
}

.sidebar-inner {
  min-height: 100%;
  padding: 18px 20px 40px;
  display: flex;
  flex-direction: column;
}

.sidebar-top {
  position: relative;
  padding-top: 24px;
  margin-bottom: 28px;
}

.sidebar-user {
  padding-top: 28px;
}

.sidebar-divider {
  width: 100%;
  height: 1px;
  background: #ededed;
  margin: 0 0 36px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.menu-row {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-size: 18px;
}

.menu-plus {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-plus img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.submenu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-6px);
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    transform 0.25s ease,
    padding 0.25s ease;
}

.menu-group.open .submenu {
  max-height: 1000px;
  opacity: 1;
  padding: 6px 0 10px 18px;
  transform: translateY(0);
}

.submenu-link {
  color: #555;
  font-weight: 300;
  text-decoration: none;
  font-size: 16px;
}

.submenu-link:hover {
  color: #222;
}

.sidebar-footer {
  margin-top: 24px;
}

/* .sidebar-footer .sidebar-divider {
  margin: 0 0 20px;
} */

.sidebar-footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-footer-link {
  font-size: 14px;
  color: #999;
  text-decoration: none;
  font-weight: 400;
}

.sidebar-footer-link:hover {
  color: #222;
}
