@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

* {
    font-family: 'IBM Plex Mono', monospace;
    box-sizing: border-box;
}
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    background: #000;

    overflow: hidden;
}
canvas {
    max-width: 100vw;
    max-height: 100vh;
    z-index: 0;
}
#stats {
    position: absolute;
    bottom: 8px;
    left: 8px;
    /* right: 0; */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 8px;

    background: #000;
    border: 1px solid #222;

    font-size: 11px;
    text-transform: uppercase;
    color: #fff;

    z-index: 1;
}

#galleryMode {
    color: #ff9900;
}

#states {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  pointer-events:none;

  color: #fff;

  transition: all .1s ease-in-out;

  z-index: 2;
}

#menu {
  margin: auto;
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  max-height: calc(100vh - 56px);
  width: calc(100vw - 16px);
  padding: 16px;
  background: #000000fa;
  border: 1px solid #222;

  pointer-events:all;
}

#menu svg {
  margin: 0 0 16px 0;

  /* width: 100%; */

  font-weight: 400;
  font-size:14px;
  text-transform: uppercase;
}

#menu p {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 18px;
  color: #555;
}

#menu h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

#menu h2 {
  margin: 4px 0 0 0;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  color: #fff9;
}

.visible-paths {
  flex: 1;
  width: 100%;

  max-height: calc(100vh - 160px);

  overflow: auto;

  z-index: 2;
}

#states.active .visible-paths {
  display: block;
}

#index_top {
  padding: 0 0 16px 0;
  display: flex;
  gap: 16px;

  border-bottom: 2px dashed #222;
}

#visible-paths {
  margin: 16px 0 0 0;
  width: 100%;
  gap: 0;
  border-collapse: collapse;
  background: transparent;
}

#visible-paths th {
  padding: 8px;
    
  border-bottom: 1px solid #222;
  
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  text-transform: uppercase;
  color: #ccc;
}

.path-item {
  width: 100%;
  border-bottom: 1px solid #222;
  text-align: left;
  cursor: pointer;
  background: transparent;

  font-size: 11px;

  &:hover {
    background: #1114;
  }
}

.path-item td {
  padding: 8px;
}


table thead th:nth-child(1), .path-item td:nth-child(1) {
  width: 48px;
}
table thead th:nth-child(2), .path-item td:nth-child(2) {
  width: 120px;
}
table thead th:nth-child(4), .path-item td:nth-child(4) {
  width: 250px;
}

.visible-paths .path-item:last-child {
  border-bottom: 0;
}

.path-item .asset {
  flex: 1;
  padding: 0 16px;
  height: 100px;

  pointer-events: none;
}

.path-item .asset .text {
  display: block;
  overflow: hidden;
  max-height: 100%;
  
  font-size: 10px;
}

.path-item .content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
}

.path-item .table__coords span {
  color: #999;
}

.path-item .path-count {
  display: flex;
  align-items: center;
  gap: 8px;
}

.path-item .asset-colors {
  display: flex;
  align-items: center;
  gap: 1px;
}

.path-item .asset-colors > div {
  width: 10px;
  height: 10px;
}

.path-item .meta {
  flex: 1;
}

.path-item .creator {
  flex: 1;
  min-width: 0;
  color: #aaa;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  
  font-size: 10px;
}

input[type="color"] {
  padding: 0;
  border: 0;
}

#visible-paths,
#visible-paths * {
  pointer-events: auto !important;
}

#visible-paths svg {
  max-width: 100%;
  max-height: 60px;
  margin: 0 0 8px 0;
}

#states.active > div {
  z-index:2;      
}

.works-header {
  line-height: 50px;
  font-size: 100px;
  height: 50px;

  text-transform: uppercase;
  color: #333;
}

.content {
  padding: 64px;
}

h1 {
  margin: 0 0 32px 0;

  font-size: 128px;
  text-transform: uppercase;
  color: #fff;
}

h2 {
  margin: 0 0 24px 4px;

  font-size: 24px;
  text-transform: uppercase;
  color: #777;
}

h3 {
  margin: 24px 0;

  font-size: 24px;
  text-transform: uppercase;
  color: #fff;
}

p {
  margin: 0 0 24px 0;

  max-width: 720px;
  line-height: 28px;
  text-transform: uppercase;
  color: #bbb;
}

hr {
  margin: 52px 0;
  height: 1px;
  background: #555;
  border: 0;
}

#visible-paths-count {
  display: none;
  padding: 8px;

  font-size: 11px;
  text-transform: uppercase;
  color: #999;
}

.path-detail {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 250px;
  max-width: 25%;

  background: #050505;
  border: 1px solid #222;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2000;
}

.path-detail.visible {
  opacity: 1;
  pointer-events: auto;
}

.path-detail-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.path-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  align-self: flex-end;
  opacity: 0.7;
}

.path-detail-close:hover {
  opacity: 1;
}

.path-detail-preview {
  background: #000;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;

  border-bottom: 1px solid #222;
}

.path-detail-preview svg {
  max-width: 80%;
  max-height: 120px;
}

.path-detail-meta {
    padding: 16px;
  font-size: 12px;
  line-height: 1.4;
  color: #ddd;
}

.path-detail-meta .label {
  font-weight: 600;
  margin-bottom: 4px;
}

.path-detail-meta .creator {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  opacity: 0.8;
  word-break: break-all;
}

.path-detail-meta .extra {
  margin-top: 16px;
  font-size: 9px;
  opacity: 0.8;
}

.group-grid .gthumb:last-child .gthumb-preview {
    border-bottom: 0;
}

.gthumb-preview {
    padding: 8px 0;

    text-align: center;
    border-bottom: 1px dashed #333;
}

.gthumb-preview > * {
     pointer-events: none;
}

.gthumb-preview .text {
    text-align: left;
}

/* ====================== */
/* ===== PLACEMENT ====== */
/* ====================== */
#pl__tooltip {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 16px;
    top: 16px;
    padding: 8px 8px 0 8px;
    width: 320px;
    background: #000;
    color: #fff;
    text-transform: uppercase;
    line-height: 18px;
    border: 1px solid #333;
    z-index: 999999;
    white-space: pre;
    max-width: 60vw;
}

#pl__tooltip h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

#pl__tooltip h2 {
    margin: 8px 0;
    font-size: 11px;
    font-weight: 700;
    color: #555;
}

#pl__tooltip-title {
}

#pl__tooltip-status {
    padding: 0 0 8px 0;
    font-size: 10px;
    color: #999;
}

#pl__tooltip-paths {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#pl__tooltip-paths input {
    padding: 2px 4px;
    width: 64px;
    background: #050505;
    border: 1px solid #222;

    font-size: 11px;
    color: #fff;
}

div#pl__tooltip-paths-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 8px 0;
}

#pl__tooltip-paths-row {
    width: 100%;

    font-size: 11px;
}

h2#pl__tooltip-keys-title {
    display: block;
    margin: 8px -8px 0 -8px;
    padding: 10px 8px 8px 8px;
    background: #111;
    border-top: 1px solid #333;
}

#pl__tooltip-keys {
    margin: 0 -8px;
    padding: 0 8px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;

    background: #111;
}

#pl__tooltip-keys > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed #222;
}

#pl__tooltip-keys > div:last-child {
    border-bottom: 0;
}

#pl__tooltip-keys > div label {
    width: 100%;

    font-size: 10px;
    color: #999;
}

#pl__tooltip-keys > div span {
    width: 100px;
    font-size: 10px;
    color: #ddd;
}

#pl__tooltip-position {
    display: flex;
    margin-top: 16px;
}

#pl__tooltip-position div {
    display: flex;
    flex: 1;

    font-size: 12px;
    color: #aaa;
}

#pl__tooltip-position span, #pl__tooltip-rotation span {
    min-width: 40px;
    display: inline-block;

    font-size: 11px;
    font-weight: 500;
    color: #555;
}

#pl__tooltip-rotation {
    margin: 8px 0 0 0;
    display: flex;
}

#pl__tooltip-rotation div {
    display: flex;
    flex: 1;

    font-size: 12px;
    color: #aaa;
}

#pl__tooltip-position, #pl__tooltip-rotation {
    color: #555;
}

#pl__step_buttons_container {
    margin: 8px 0 0 0;
    padding: 8px;
    display: flex;
    width: 100%;
    justify-content: center;
}

#pl__btn_finalize {
    padding: 4px 8px;
    border-radius: 0;
    border: 0;

    font-size: 12px;
}

#pl__table {
    border-collapse: collapse;
}

#pl__table th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: #bbb;
}

#pl__table td, #pl__table th {
    padding: 2px 4px;
    text-align: left;

    border-bottom: 1px solid #111;
}

#pl__table tr td:nth-child(2) input {
    position: relative;
    width: 100%;

    -webkit-appearance: none;
    appearance: none;
    background: #555;
    height: 2px;
    border: 0;
    padding: 0;
}

#pl__tooltip-range-container {
    background-image: 
        linear-gradient(90deg, transparent 0%, transparent calc(100% - 2px), #555 calc(100% - 2px),#555 calc(100% + 1px)),
        linear-gradient(90deg, transparent 0%, transparent calc(100% - 2px), #555 calc(100% - 2px),#555 calc(100% + 1px));
    background-repeat: repeat-x;
    background-position: 0 0, 0 6px;
    background-size: calc(100% / 4) 12px, calc(100% / 16) 6px;
}

#pl__table tr td:nth-child(2) {
    padding-bottom: 6px;
}

#pl__table tr td:nth-child(2) input[type="range"]::-webkit-slider-runnable-track, #pl__table tr td:nth-child(2) input[type="range"]::-moz-range-track {
  height: 10px;
}
#pl__table tr td:nth-child(2) input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -4px;
    background-color: #fff;
    height: 22px;
    width: 6px;
}

#pl__table tr td:last-child {
    width: 50px;
}

#pl__table tr td:last-child input {
    width: 40px;
}

#pl__wallet_container {
    margin: 0;
    padding: 0 0 10px 0;
}

#pl__wallet_title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

#pl__wallet_polaroid_container {
  padding: 8px 0;
  font-size: 11px;

  border-bottom: 1px solid #222;
}

#pl__wallet_polaroid_container label {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

#pl__wallet_polaroid_container span {
  display: flex;
  flex-direction: column;
}

#pl__wallet_polaroid_container span span {
  font-size: 9px;
  color: #999;
}

#pl__wallet_select_container {
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

#pl__wallet_label {
    font-size: 11px;
}

#pl__wallet_picker {
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;

    border-top: 1px solid #333;
}

.pl__wallet_item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 8px;
    flex: 1;

    cursor: pointer;
}

.pl__wallet_item:hover {
    background: #111;
}

.pl__wallet_item img {
    margin: 0 8px 0 0;
}

.pl__wallet_fallback {
    font-size: 12px;
}

.pl__wallet_item[data-active="1"] {
    background: #222;
}

.pl__wallet_item img {
    height: 24px;

    opacity: .25;
}

.pl__wallet_item[data-active="1"] img {
    opacity: 1;
}

#pl__wallet_buttons_container {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

#pl__wallet_buttons_connect {
    flex: 1;
    width: 100%;
    font-size: 12px;
    padding: 6px 8px;
    cursor: pointer;
} 

#pl__wallet_buttons_post {
    flex: 1;
    font-size: 12px;
    padding: 6px 8px;
    cursor: pointer;
}

#pl__wallet_buttons_post[disabled] {
    display: none;
}

#pl__wallet_status {
    font-size: 9px;
    color: #bbb;
}

#pl__wallet_status ul {
    margin: 0;
    padding: 0;
}

#pl__wallet_status ul li {
    margin: 0;
    padding: 0;

    list-style-type: none;
}

#pl__wallet_groupname_container {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 11px;
}

#pl__wallet_groupname {
    padding: 4px 8px;
    background: #111;
    border: 1px solid #333;

    color: #fff;
}

#pl__wallet_price_container {
  padding: 8px 0;
  display: flex;

  font-size: 11px;
}

#pl__wallet_price_label {
  flex: 1;
}

#pl__wallet_tx_note {
  width: 100%;

  font-size: 10px;
  color: #999;
}

button {
    cursor: pointer;
}

/* General UI */

#states.active #menu {
  display: flex;
  flex-direction: column;
}
#states.active #menu.index-panel.hidden { display: none; }

#index-toggle {
  position: absolute;
  top: 8px;
  left: 8px;

  padding: 8px;
  background: #000;
  border: 1px solid #222;
  font-size: 11px;
  text-transform: uppercase;
  color: #fff;

  pointer-events: all;

  z-index: 2;
}