/* crm-preview.css — the card under a link in a message. See crm-preview.js. */

.crm-lp {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  /* Inside a bubble the card has to read as part of it, not as a second
     message: a tint of the ground it sits on, never a white card on colour. */
  background: rgba(0, 0, 0, .10);
  border: 1px solid rgba(0, 0, 0, .08);
  text-decoration: none !important;
  color: inherit !important;
  max-width: 100%;
  overflow: hidden;
}

.crm-lp:hover { background: rgba(0, 0, 0, .16); }

:root.dark .crm-lp,
.dark .crm-lp,
[data-theme="dark"] .crm-lp {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .10);
}

:root.dark .crm-lp:hover,
.dark .crm-lp:hover,
[data-theme="dark"] .crm-lp:hover { background: rgba(255, 255, 255, .12); }

.crm-lp__shot {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, .18);
}

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

.crm-lp__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  justify-content: center;
}

.crm-lp__site {
  font-size: 10.5px;
  font-weight: 700;
  opacity: .7;
}

/* Two lines of title, one of description: enough to know what it is, never
   enough to become the message. */
.crm-lp__title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crm-lp__desc {
  font-size: 11.5px;
  line-height: 1.4;
  opacity: .78;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
