/* creations page, on top of shell.css */

.category {
  display: flex;
  align-items: center;
}

.toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-muted);
}

.toggle:hover {
  background: var(--hover);
}

.toggle.on {
  color: var(--accent);
}

.toggle svg.icon {
  width: 20px;
  height: 20px;
}

.filter-name {
  margin: 4px 10px 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px 8px;
}

.tag {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--hover);
  font-size: 12px;
}

.tag.selected {
  border-color: var(--accent);
  background: var(--accent-wash);
}


/* featured + grid */

.creations {
  flex: 1;
  overflow-y: auto;
  padding: 12px 28px 40px;
}

.creations h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 2px 14px;
  font-size: 14px;
}

.creations h2 .count {
  margin-left: 0;
}

.featured {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.featured.two {
  grid-template-columns: 1fr 1fr;
}

.featured.three {
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.featured.three .feature:first-child {
  grid-row: 1 / 3;
}

.feature {
  position: relative;
  width: 100%;
  min-height: 120px;
  max-height: 340px;
  aspect-ratio: 1200 / 630;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  color: #fff;
  text-align: left;
}

.featured.three .feature {
  max-height: none;
  aspect-ratio: auto;
}

.featured.three .feature:first-child {
  aspect-ratio: 1200 / 630;
}

.feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.62));
}

.feature .byline,
.feature .title,
.feature .facts {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.feature .byline {
  top: 10px;
  font-size: 13px;
}

.feature .title {
  bottom: 36px;
  font-size: 17px;
  font-weight: 600;
}

.feature:first-child .title {
  bottom: 40px;
  font-size: 22px;
}

.feature .facts {
  bottom: 14px;
  font-size: 13px;
  opacity: 0.88;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.card {
  display: block;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: left;
}

.feature,
.card {
  transition: translate 0.15s, box-shadow 0.15s;
}

.feature:hover,
.card:hover {
  translate: 0 -3px;
  box-shadow: var(--shadow), 0 0 0 2px var(--accent);
}

.cover {
  aspect-ratio: 1200 / 630;
  background: #000;
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cover.empty {
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--accent-wash);
  font-weight: 600;
  text-align: center;
}

.card-text {
  padding: 10px 14px 14px;
}

.card-text > * {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card .title {
  font-weight: 600;
}

.card .description {
  min-height: 18px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
}

.card .facts {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.card .byline {
  min-height: 18px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent);
}

.empty-list {
  margin-top: 60px;
  font-size: 15px;
  text-align: center;
  color: var(--text-muted);
}

/* work page */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(0 0 0 / 0.18);
}

.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "main close"
    "main comments";
  gap: 14px 22px;
  width: min(1240px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.close {
  grid-area: close;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgb(230 46 56 / 0.48);
  border-radius: 999px;
  background: rgb(230 46 56 / 0.13);
  color: var(--close);
}

.close:hover {
  background: rgb(230 46 56 / 0.24);
}

.close svg.icon {
  width: 22px;
  height: 22px;
}

.work-main {
  grid-area: main;
  min-width: 0;
}

.stage {
  position: relative;
  display: block;
  width: 100%;
  max-height: 50vh;
  aspect-ratio: 1200 / 630;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}

.stage.playing {
  max-height: none;
  aspect-ratio: auto;
}

.stage img,
.stage iframe,
.stage .cover {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.play-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: var(--accent);
}

.play-disc svg.icon {
  width: 26px;
  height: 26px;
}

.work h1 {
  margin: 22px 0 6px;
  font-size: 28px;
}

.work-byline {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.work-facts {
  margin: 6px 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  text-decoration: none;
}

.button:hover {
  border-color: var(--text-muted);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.button.primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.work-description {
  margin: 0 0 20px;
  white-space: pre-wrap;
}

.about h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.about dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 13px;
}

.about dt {
  color: var(--text-muted);
}

.about dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.comments {
  grid-area: comments;
  display: flex;
  flex-direction: column;
  width: min(34vw, 420px);
  min-width: 260px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.comments-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.comments-head .button {
  height: 34px;
  margin-left: auto;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 400;
}

.comment-list {
  flex: 1;
  min-height: 120px;
  margin-top: 12px;
  overflow-y: auto;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
}

.comment-author {
  font-weight: 600;
}

.comment-date {
  margin-left: 6px;
  color: var(--text-muted);
}

.comment-text {
  margin-top: 2px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comments-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* like + comment box */

.button:disabled {
  cursor: default;
  opacity: .6;
}

.button.on {
  border-color: var(--close);
  color: var(--close);
}

.comment.own {
  flex-direction: row-reverse;
  text-align: right;
}

.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-form-row,
.comment-sign-in {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.comment-form-row .button,
.comment-sign-in .button {
  height: 36px;
  margin-left: auto;
  padding: 0 16px;
}

/* market */

.asset-cover {
  aspect-ratio: 4 / 3;
  background: var(--hover);
}

.asset-cover img {
  object-fit: cover;
}

.cover.empty svg.icon,
.stage.empty svg.icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
}

.asset-stage {
  aspect-ratio: 4 / 3;
  background: var(--hover);
}

.asset-stage.empty {
  display: grid;
  place-items: center;
}

.previews {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.previews:empty {
  display: none;
}

.previews button {
  flex: none;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hover);
}

.previews button.selected {
  border-color: var(--accent);
}

.previews img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about dd.tags {
  padding: 0;
}

.button.more {
  display: flex;
  margin: 20px auto 0;
}

/* narrow windows */

@media (max-width: 820px) {
  .creations {
    overflow: visible;
  }

  .featured.two,
  .featured.three {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .featured.three .feature {
    grid-row: auto;
    aspect-ratio: 1200 / 630;
  }

  .work {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "close" "main" "comments";
  }

  .comments {
    width: auto;
    min-width: 0;
  }
}
