/* Dictionary search results (佛词典 / 字典).

   The explanation is the reason people search, so it is shown inline rather
   than hidden behind a 查看 link, clamped to a few lines with a toggle for
   the long entries. Clicking, not hovering: hovering does not exist on a
   phone, and these entries are read, not glanced at. */

.dict-results {
  /* Cap the measure: dictionary entries are prose, unreadable at 1700px wide */
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 10px;
  list-style: none;
}

.dict-card {
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #dcd8c4;
  border-left: 4px solid rgb(190, 113, 35);
  background-color: #fdfdf8;
}

.dict-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.dict-card__term {
  font-size: 1.25em;
  font-weight: bold;
}

.dict-card__pinyin {
  color: #6b6b5a;
}

.dict-card__source {
  padding: 1px 8px;
  border: 1px solid #d6d1b8;
  border-radius: 10px;
  background-color: #f2efe1;
  color: #6b6b5a;
  font-size: 0.8em;
  white-space: nowrap;
}

.dict-card__code {
  color: #9a9a88;
  font-size: 0.8em;
}

/* Push the external link to the end of the row, away from the term */
.dict-card__origin {
  margin-left: auto;
  font-size: 0.85em;
  white-space: nowrap;
}

.dict-card__body {
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dict-card__body.is-expanded {
  display: block;
  -webkit-line-clamp: none;
}

.dict-card__body p {
  margin: 0 0 6px;
}

.dict-card__body h3 {
  margin: 0 0 4px;
  font-size: 1em;
  color: #6b6b5a;
}

.dict-card__toggle {
  display: none;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: #1a5276;
  font-size: 0.9em;
  font-family: inherit;
  cursor: pointer;
}

.dict-card__toggle.is-needed {
  display: inline-block;
}

.dict-card__empty {
  color: #9a9a88;
}

@media screen and (max-width: 600px) {
  .dict-card__origin {
    margin-left: 0;
  }
}
