/* Malavia Stage 8.5 — entity navigation */

.mlv-entity-head {
  padding: 1rem 0 1.1rem;
  border-bottom: 1px solid var(--color-primary-line);
}

.mlv-entity-showcase {
  height: 6rem;
  display: flex;
  gap: .3rem;
  direction: ltr;
  overflow: hidden;
  margin-bottom: .8rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.mlv-entity-showcase img {
  width: 4.1rem;
  height: 6rem;
  object-fit: cover;
  border-radius: .45rem;
  opacity: .68;
  filter: saturate(.82);
}

.mlv-entity-showcase img:nth-child(2) {
  opacity: .94;
  transform: translateY(-.18rem);
}

.mlv-entity-head-main {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
}

.mlv-entity-mark {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border: 1px solid rgb(244 174 43 / 22%);
  border-radius: 1rem;
  background: radial-gradient(circle at 35% 30%, rgb(244 174 43 / 22%), rgb(244 174 43 / 4.5%));
  color: #ffd876;
  font-size: 1.4rem;
  font-weight: 950;
}

.mlv-entity-copy { min-width: 0; }
.mlv-entity-copy h1 {
  margin: .05rem 0 .15rem;
  font-size: clamp(1.75rem, 7vw, 3rem);
  line-height: 1.18;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.mlv-entity-en {
  direction: ltr;
  text-align: right;
  color: #9199a2;
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.mlv-entity-context {
  max-width: 42rem;
  margin: .35rem 0 .55rem;
  color: var(--color-text-muted);
  font-size: .78rem;
}

.mlv-entity-meta,
.mlv-entity-role-tabs {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.mlv-entity-count {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  color: #c9c1b7;
}
.mlv-entity-count b { color: #ffd876; font-size: 1.1rem; }
.mlv-entity-count small { font-size: .66rem; }

.mlv-entity-role-tabs { margin-top: .8rem; }
.mlv-entity-role-tabs .mlv-pill {
  min-height: 2.35rem;
  text-decoration: none;
}
.mlv-entity-role-tabs .mlv-pill.is-active {
  border-color: var(--color-primary-line);
  background: var(--color-primary-soft);
  color: #ffd876;
}

.mlv-entity-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 1px solid rgb(255 255 255 / 5.5%);
}

.mlv-entity-search { margin: 0; }
.mlv-entity-select {
  width: 100%;
  min-height: 3rem;
  padding: .55rem .7rem;
  border: 1px solid var(--color-border);
  border-radius: .7rem;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
.mlv-entity-select:focus {
  outline: 3px solid rgb(244 174 43 / 16%);
  border-color: var(--color-primary-line);
}

.mlv-entity-results { margin-top: 1.6rem; }
.mlv-entity-results .mlv-section-head h2 { margin: .1rem 0 0; }
.mlv-entity-grid { margin-top: .85rem; }

.mlv-entity-pill {
  color: #d8d1c7;
  text-decoration: none;
}
.mlv-entity-pill:hover {
  border-color: var(--color-primary-line);
  background: var(--color-primary-soft);
  color: #ffd876;
}

.mlv-work-facts {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.mlv-work-facts h2 {
  margin: .15rem 0 .7rem;
  font-size: 1.05rem;
}
.mlv-facts-grid { display: grid; }
.mlv-fact-row {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: .65rem;
  padding: .65rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 5%);
}
.mlv-fact-label {
  color: var(--color-text-muted);
  font-size: .7rem;
  font-weight: 850;
}
.mlv-fact-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .55rem;
  min-width: 0;
}
.mlv-entity-text-link {
  color: #e2ddd5;
  text-decoration: none;
  font-size: .76rem;
  overflow-wrap: anywhere;
}
.mlv-entity-text-link:hover { color: #ffd876; }

@media (min-width: 43.75rem) {
  .mlv-entity-tools {
    grid-template-columns: minmax(16rem, 1fr) 11rem 11rem auto;
    align-items: center;
  }
  .mlv-entity-tools .button { min-height: 3rem; }
}

@media (min-width: 51.25rem) {
  .mlv-entity-head { padding-top: 1.4rem; }
  .mlv-entity-head-main {
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: .9rem;
  }
  .mlv-entity-mark { width: 4.2rem; height: 4.2rem; font-size: 1.7rem; }
  .mlv-entity-showcase { height: 7rem; }
  .mlv-entity-showcase img { width: 4.8rem; height: 7rem; }
  .mlv-entity-context { font-size: .84rem; }
  .mlv-fact-row { grid-template-columns: 7.5rem minmax(0, 1fr); }
}
