/* One document (artifact-detail.html). The head, photo mosaic, story beside the Details column, subscribe card and
   card rows come from brand-page.css and components.css; this file holds only what a document adds. */

.doc-letters {
  padding-top: 8px;
}

.doc-page .brand-head {
  margin-bottom: 20px;
}

/* Scans are pages, mostly upright: shown whole, on white in the light theme and black in the dark one, instead of
   trimmed to the 16:9 tile like photos. The blurred previews for visitors stay trimmed. */
.doc-page .mosaic:not(.mosaic--locked) .mosaic__img {
  object-fit: contain;
  object-position: 50% 50%;
  background-color: var(--poster-bg);
}

/* With no story beside it (a subscriber, a document without a description) the Details are a table in the middle of
   the page: one row per item, the label on the left and the value on the right, a thin line between the rows. Full
   width on mobile. */
.doc-page .brand-body--single .brand-side {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}

.doc-page .brand-body--single .doc-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 0;
  border-top: 0;
  border-bottom: 0;
}

.doc-page .brand-body--single .doc-details > div + div {
  border-top: 1px solid var(--border);
}

.doc-page .brand-body--single .doc-details dt {
  flex: none;
}

.doc-page .brand-body--single .doc-details dd {
  justify-content: flex-end;
  text-align: right;
}

.doc-details .brand-details__text {
  overflow-wrap: anywhere;
}

/* Type, format and language are labels, not links. */
.doc-details span.chip:hover {
  border-color: var(--control-border);
  color: var(--text);
}

.doc-tick {
  width: 18px;
  height: 18px;
  color: var(--link);
}

/* Similar documents: a subscriber's cover scan shows whole in the 16:9 frame, on the same white or black as the photo
   mosaic above (the brand logos fill the frame as on the brand cards), and a long name stops after two lines. */
.doc-similar .card__img--scan {
  object-fit: contain;
  object-position: 50% 50%;
  background-color: var(--poster-bg);
}

/* Everyone else gets the brand logo whole and as large as fits, with a small even inset, on a white plate in both
   themes: logos are made for light backgrounds. */
.doc-similar .card__media--plate {
  background-color: #ffffff;
}

.doc-similar .card__img--logo {
  position: absolute;
  inset: 0;
  width: 90%;
  height: 90%;
  margin: auto;
  object-fit: contain;
  object-position: 50% 50%;
}

.doc-similar .card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.doc-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background-color: var(--accent);
  color: #ffffff;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}

.doc-download:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.doc-download svg {
  flex: none;
}

.doc-download--locked {
  position: relative;
  border: 1px solid var(--control-border);
  background-color: var(--surface);
  color: var(--text-muted);
  cursor: not-allowed;
}

.doc-download--locked:hover {
  background-color: var(--surface);
  color: var(--text-muted);
}

.doc-download--locked[data-tooltip]::after {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 10;
  padding: 4px 10px;
  border-radius: var(--radius);
  background-color: var(--text);
  color: var(--bg);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  content: attr(data-tooltip);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .15s ease;
}

.doc-download--locked[data-tooltip]:hover::after {
  opacity: 1;
}
