.post-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  background: var(--postcard-bg);
  border-radius: var(--radius);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);

  .post-card__header {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: .5rem;
    background: var(--postcard-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid var(--border);
    padding: .625rem;

    .post-card__image {
      border-radius: 50%;
    }

    .post-card__author {
      display: flex;
      flex-direction: column;
      p {
        font-size: .875rem;
        font-weight: 600;
      }
      div {
        display: flex;
        align-items: center;
        gap: .3125rem;
        time, span {
          font-size: .75rem;
          color: var(--muted);
        }
        time::after {
          content: "";
          display: inline-flex;
          width: .25rem;
          height: .25rem;
          border-radius: 50%;
          background: var(--muted);
          margin: 0 0 0 .3125rem;
          vertical-align: middle;
        }
      }
    }

    .post-card__promoted {
      position: absolute;
      top: 1rem;
      right: .625rem;
      z-index: 10;
      svg {
        color: var(--muted);
        fill: var(--muted);
      }
    }
  }

  .post-card__media-link {
    display: block;
    position: relative;
    text-decoration: none;
    background: none;
    padding: 0;
    border-radius: 0px;
    border: none;
    overflow: hidden;
    img {
      transition: .3s ease;
    }
    span {
      position: absolute;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, .3);
      top: 0;
      left: 0;
      z-index: 10;
      svg {
        color: var(--white);
      }
    }
    &:hover {
      text-decoration: none;
      img {
        transform: scale(1.05);
      }
    }
  }

  .post-card__body {
    padding: .625rem;

    .post-card__content {
      font-size: .875rem;
    }
    .post-card__tag {
      font-size: .75rem;
      &.post-card__tag--hashtags {
        color: var(--accent);
      }
      &.post-card__tag--mentions {
        color: var(--brand);
      }
      &.post-card__tag--location {
        display: flex;
        align-items: center;
        gap: .3125rem;
        font-weight: 500;
        color: var(--muted);
      }
    }
  }

  .post-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .625rem;
    border-top: 1px solid var(--border);
    span {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      gap: 3px;
      font-size: .75rem;
      svg {
        color: var(--muted);
      }
      &.likes {
        svg {
          color: var(--red);
        }
      }
    }
  }

  &:hover {
    .post-card__header .post-card__source svg {
      opacity: .3;
    }
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  .lightbox__inner {
    position: relative;
    max-width: 90vw;
    max-height: 60vh;
  }
  .lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
  .lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    padding: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    svg {
      color: var(--white);
    }
    &:hover {
      background: none;
    }
  }
}
