/* ==========================================================================
   post-card.css — a single feed post card (.b-post)
   Loads after base.css. Tokens, the box-sizing reset, .g-icon and the
   .g-btn system all come from base.css and are never redefined here.
   Every value below came from getComputedStyle() on the live page.
   ========================================================================== */

/* ---------- card shell ---------- */
.b-post.m-card-appearance {
  background-color: #fff;
  border-radius: 6px;
  box-shadow: var(--of-card-shadow);
  padding: 14px 16px 0;
  margin: 0 0 32px;
  /* clips .post_media's negative side margins back to the 6px radius */
  overflow: hidden;
}

/* ---------- header ---------- */
.b-post__header {
  position: relative;
  min-height: 54px;
  /* 60px left gutter reserves room for the absolutely positioned avatar */
  padding: 3px 0 0 60px;
  margin: 0 0 8px;
}

.b-post__avatar {
  position: absolute;
  top: 3px;
  left: 2px;
  width: 48px;
  height: 48px;
}

.g-avatar {
  display: block;
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 1000px;
  background-color: #fff;
}

.g-avatar__img-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 1000px;
  overflow: hidden;
}

.g-avatar img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 1000px;
}

/* ---------- username row ---------- */
.b-username-row {
  display: flex;
  align-items: center;
}

.b-username-row.m-gap-lg {
  height: 24px;
  margin: 0 0 3px;
}

a.b-username {
  color: var(--of-text);
  text-decoration: none;
}

.g-user-name {
  position: relative;
  font: 500 16px/24px var(--of-font);
  color: var(--of-text);
  white-space: nowrap;
  overflow: hidden;
}

/* the verified badge sits in the padding-right reserve */
.g-user-name.m-verified {
  padding-right: 20px;
}

.g-user-name.m-verified .g-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.b-username:hover .g-user-name,
.g-user-name:hover {
  text-decoration: underline;
}

/* date — margin-left:auto pushes it to the right edge at every width */
.b-post__profile-details {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-left: 10px;
  white-space: nowrap;
}

a.b-post__date {
  font: 400 14px/18.6676px var(--of-font);
  color: var(--of-muted);
  text-align: right;
  text-decoration: none;
}

/* ---------- handle ---------- */
.g-user-realname__wrapper {
  display: flex;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
}

.g-user-username {
  max-width: 100%;
  font: 400 14px/20px var(--of-font);
  color: var(--of-muted);
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- body text ---------- */
.b-post__content.m-type-post {
  margin: 0 0 12px;
}

.b-post__text,
.b-post__text .g-truncated-text,
.b-post__text p {
  font: 400 16px/24px var(--of-font);
  color: var(--of-text);
}

.b-post__text p {
  margin: 0;
}

.b-post__text a {
  color: var(--of-blue);
}

/* ---------- media holder ---------- */
.post_media.b-post-media-holder {
  position: relative;
  /* bleeds past the card's 16px side padding to the full card width */
  margin: 0 -16px;
  overflow: hidden;
  text-align: center;
}

/* intrinsic-ratio box; the 56.25% padding-top is an inline style, as on the original */
.b-post-media-size-area {
  position: relative;
}

.b-post__media__item-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
}

.video-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: #000;
  overflow: hidden;
}

/* fill layer — the same image, blown out past every edge and cropped */
.b-post__media-bg {
  position: absolute;
  top: -75px;
  right: -75px;
  bottom: -75px;
  left: -75px;
  z-index: 0;
}

.b-post__media-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* foreground layer — the same image again, letterboxed inside the frame */
img.b-post__media__img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* ---------- play button (decorative) ---------- */
.vjs-big-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 1000px;
  border: none;
  background-color: rgba(0, 0, 0, .4);
  opacity: .7;
  color: #fff;
  cursor: pointer;
  transition: background-color var(--of-t-media) ease,
              opacity var(--of-t-media) ease;
}

/* play triangle, nudged ~3px right so it reads as optically centred */
.vjs-big-play-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin-left: 3px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent currentColor;
}

.video-wrapper:hover .vjs-big-play-button {
  opacity: 1;
  background-color: var(--of-blue-hover);
}

.vjs-big-play-button:focus-visible {
  outline: 2px solid var(--of-blue-hover);
  outline-offset: 2px;
}

/* visually hidden label */
.vjs-control-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- responsive ---------- */
@media (max-width: 1003.98px) {
  .b-post.m-card-appearance { padding: 12px 16px 0; }
}

/* ---------- truncated post text ("Read more") ----------
   Only card 8 exceeds the limit on this snapshot. The original collapses the
   text to 80px and fades the last 2px out with a mask, then offers a link.
   --mask-size is set inline on the element, exactly as the site does it. */
.g-truncated-text.m-collapsed {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 2px, #fff var(--mask-size, 80px));
          mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 2px, #fff var(--mask-size, 80px));
}

/* the link inherits font/colour/padding from .g-btn.m-flat.m-default-font-weight */
.link-trunc {
  margin: 5px 0 0;
}
