/* Top-level component */

.twetch-renderer__root {
  width: 598px;
  border-radius: 6px;
  background-color: black;
  color: white;
  white-space: pre-wrap;
  overflow: hidden; /* prevents margin collapse */
  font-family: sans-serif;
  font-size: 20px;
  text-decoration: none;
  cursor: pointer;
}

.twetch-renderer__root--quoted {
  width: 100%;
  border: 1px solid #696969;
  cursor: pointer;
  position: relative;
  background: #010101;
  border-radius: 6px;
}

.twetch-renderer__loading {
  padding: 32px 0;
  text-align: center;
}

.twetch-renderer__root a {
  color: #0094ff;
  display: inline-block;
  word-break: break-word;
  text-decoration: none;
}
.twetch-renderer__root a:hover {
  text-decoration: underline;
}

.twetch-renderer__header {
  display: flex;
  padding: 16px 16px 0 16px;
  border-radius: 4px 4px 0 0;
}
.twetch-renderer__root--quoted > .twetch-renderer__header {
  padding: 8px;
  background: #696969;
}

.twetch-renderer__header--icon {
  background-position: center center;
  background-size: cover;
}

.twetch-renderer__header p {
  margin: 0;
}

.twetch-renderer__header > a {
  display: inline-block;
  position: relative;
  margin-right: 12px;
  vertical-align: top;
}

.twetch-renderer__header > a > * {
  width: 24px;
  height: 24px;
  cursor: pointer;
  border-radius: 100%;
  background-repeat: no-repeat;
}

.twetch-renderer__user {
  flex-grow: 1;
  max-width: 100%;
  width: 100%;
  display: inline-block;
}
.twetch-renderer__user > a {
  line-height: 24px;
  color: #f2f2f2;
  cursor: pointer;
  display: inline-block;
  overflow: hidden;
  font-size: 16px;
  max-width: calc(100% - 64px);
  font-weight: bold;
  line-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: top;
  text-decoration: none;
}
.twetch-renderer__user > a:hover {
  text-decoration: underline;
}

.twetch-renderer__user > p {
  line-height: 24px;
  color: #c4c4c4;
  display: inline-block;
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  margin-left: 6px;
  vertical-align: top;
}

.twetch-renderer__timestamp {
  line-height: 24px;
  color: #c4c4c4;
  display: inline-block;
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  margin-left: 6px;
  vertical-align: top;
  font-family: proxima-nova, Helvetica;
  white-space: nowrap;
}

.twetch-renderer__body {
  margin: 16px;
}

.twetch-renderer__root--quoted .twetch-renderer__body {
  margin: 8px;
}

.twetch-renderer__body > :not(:first-child) {
  margin-top: 8px;
}

.twetch-renderer__stats {
  margin: 16px;
  display: flex;
  font-weight: 300;
}
.twetch-renderer__stats > * {
  margin-right: 24px;
}
.twetch-renderer__stats > * > :first-child {
  margin-right: 2px;
  font-size: 20px;
  font-weight: 600;
}

/* Media */

.twetch-renderer__media-grid {
  display: flex;
  padding: 0;
  flex-wrap: wrap;
  list-style: none;
  overflow-y: auto;
}

.twetch-renderer__media-grid-item {
  position: relative;
  flex-shrink: 0;
  display: block;
  padding: 2px;
  box-sizing: border-box;
}

.twetch-renderer__media-grid--multi > .twetch-renderer__media-grid-item {
  height: 202px;
}

.twetch-renderer__media-grid--multi > * {
  width: 50%;
}
.twetch-renderer__media-grid--odd > :first-child {
  width: 100%;
}

.twetch-renderer__media-grid-item:first-child > * {
  border-top-left-radius: 6px;
}

.twetch-renderer__media-grid--multi > .twetch-renderer__media-grid-item:nth-child(2) > *,
.twetch-renderer__media-grid--odd > .twetch-renderer__media-grid-item:first-child > * {
  border-top-right-radius: 6px;
}

.twetch-renderer__media-grid-item > * {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.twetch-renderer__media-grid-close {
  position: fixed;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  fill: white;
  background-color: transparent;
  outline: none;
  border: none;
  z-index: 1000;
  cursor: pointer;
}

/* Twitter */

.twetch-renderer__twitter-preview {
  cursor: pointer;
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  position: relative;
  background: #022640;
  text-decoration: none;
}

.twetch-renderer__twitter-preview-media {
  width: calc(100% + 24px);
  margin: -12px 0 12px -12px;
  border-radius: 6px 6px 0 0;
}
.twetch-renderer__twitter-preview-media > * {
  margin: -1px;
}

.twetch-renderer__twitter-preview-text {
  font-size: 16px;
  line-height: 21px;
}

.twetch-renderer__twitter-preview p {
  margin: 0;

  color: #f2f2f2;
  white-space: pre-line;
  text-decoration: none;

  font-family: proxima-nova, Helvetica;
  font-weight: 400;
}

.twetch-renderer__twitter-preview > a {
  display: block;
}

.twetch-renderer__twitter-preview header {
  display: flex;
  margin-top: 10px;
}

.twetch-renderer__twitter-preview header > img {
  width: 30px;
  height: 30px;
  margin-right: 12px;
  border-radius: 100%;
}

.twetch-renderer__twitter-preview header p {
  line-height: 15px;
  font-size: 12px;
}

p.twetch-renderer__twitter-preview-username {
  font-weight: bold;
  word-break: break-word;
}

.twetch-renderer__twitter-preview-handle {
  font-weight: normal;
  margin-left: 6px;
}
