/* VELU GAME FACTORY NAVIGATION V0.3 */

html.velu-factory-v03-active #game-factory {
  --v03-side: 290px;
  --v03-gap: 16px;
}

.velu-factory-v03-shell {
  display: grid;
  grid-template-columns: var(--v03-side) minmax(0, 1fr);
  gap: var(--v03-gap);
  align-items: start;
  margin-top: 14px;
}

.velu-v03-sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid rgba(98, 255, 192, .18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(6, 19, 22, .98), rgba(5, 12, 22, .97));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .24);
}

.velu-v03-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.velu-v03-sidebar-head strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.velu-v03-project-count {
  min-width: 30px;
  padding: 4px 8px;
  text-align: center;
  border: 1px solid rgba(98, 255, 192, .24);
  border-radius: 999px;
  background: rgba(98, 255, 192, .08);
  font-size: 12px;
  font-weight: 800;
}

.velu-v03-projects-host {
  max-height: calc(100vh - 130px);
  overflow: auto;
  padding: 8px;
}

.velu-v03-projects-host #velu-engine-projects {
  display: grid;
  gap: 7px;
  margin: 0;
}

.velu-v03-projects-host [data-project-id] {
  width: 100%;
  text-align: left;
}

.velu-v03-sidebar-tools {
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.velu-v03-sidebar-tools #velu-engine-refresh {
  width: 100%;
}

.velu-v03-main {
  min-width: 0;
}

.velu-v03-tabs {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
  padding: 7px;
  border: 1px solid rgba(116, 176, 255, .16);
  border-radius: 15px;
  background: rgba(5, 12, 22, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
}

.velu-v03-tabs button {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.velu-v03-tabs button > span:first-child {
  grid-row: 1 / 3;
  font-size: 17px;
  opacity: .68;
}

.velu-v03-tabs button > span:nth-child(2) {
  font-size: 12px;
  font-weight: 800;
}

.velu-v03-tabs button small {
  font-size: 10px;
  opacity: .52;
}

.velu-v03-tabs button:hover,
.velu-v03-tabs button.is-active {
  border-color: rgba(98, 255, 192, .22);
  background: rgba(98, 255, 192, .07);
}

.velu-v03-tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #62ffc0, #4fc3ff);
}

.velu-v03-section[hidden] {
  display: none !important;
}

.velu-v03-section {
  min-width: 0;
}

.velu-v03-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 4px 2px;
}

.velu-v03-section-head h2 {
  margin: 3px 0 5px;
  font-size: clamp(20px, 2.5vw, 30px);
}

.velu-v03-section-head p {
  margin: 0;
  max-width: 800px;
  opacity: .68;
}

.velu-v03-selected-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(98, 255, 192, .2);
  border-radius: 999px;
  background: rgba(98, 255, 192, .06);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.velu-v03-section [data-v03-dashboard-host] > *,
.velu-v03-section [data-v03-router-host] > *,
.velu-v03-section [data-v03-live-host] > *,
.velu-v03-section [data-v03-quality-host] > *,
.velu-v03-section [data-v03-review-host] > * {
  margin-top: 0;
  margin-bottom: 12px;
}

.velu-v03-create-card {
  margin-top: 12px;
}

.velu-v03-card-title {
  margin-bottom: 12px;
}

.velu-v03-card-title h3 {
  margin: 4px 0 0;
}

.velu-v03-project-detail-card {
  margin-top: 12px;
}

.velu-v03-project-detail-card #velu-engine-detail {
  margin: 0;
}

.velu-v03-project-detail-card #velu-engine-detail > h3,
.velu-v03-project-detail-card #velu-engine-detail > .velu-engine-status {
  display: none;
}

html.velu-factory-v03-active #velu-factory-live-workspace,
html.velu-factory-v03-active #velu-engine-user-review {
  margin-top: 0;
}

html.velu-factory-v03-active .velu-project-quality .velu-project-quality-grid {
  max-height: none;
  overflow: visible;
}

html.velu-factory-v03-active .velu-v03-origin.is-v03-empty {
  display: none !important;
}

.velu-v03-muted {
  display: block;
  padding: 12px;
  font-size: 12px;
  opacity: .52;
}

@media (max-width: 1050px) {
  .velu-factory-v03-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .velu-v03-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .velu-factory-v03-shell {
    display: block;
  }

  .velu-v03-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    margin-bottom: 12px;
  }

  .velu-v03-projects-host {
    max-height: 240px;
  }

  .velu-v03-tabs {
    position: sticky;
    top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .velu-v03-section-head {
    display: block;
  }

  .velu-v03-selected-status {
    display: inline-block;
    margin-top: 8px;
  }
}
