/* SCRUM-1086 — LO posts: profile layout: license header, Latest Posts, posts view, responsive */

/* State Licenses header: NMLS-verified inline to the right of the title (Figma 6749:20351) */
#licenses .lop__license-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Profile "Latest Posts" section (compact preview cards, Figma 6808:69280) ---- */
.lop__latest-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.lop__post-preview {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #d8dceb;
  border-radius: 12px;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  font-family: 'Wavehaus', Arial, Helvetica, sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lop__post-preview:hover {
  border-color: #b7bdd0;
  box-shadow: 0 8px 20px rgba(19, 21, 26, 0.06);
}

.lop__post-preview__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.lop__post-preview__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 66px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: #535766;
  word-break: break-word;
}

/* Mobile carousel scroll indicator (Figma node 6749-22144) */
.lop__latest-slider { display: none; }

.lop__post-preview__img {
  display: block;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f2f4f7;
}

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

@media (max-width: 768px) {
  .lop__latest-posts {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 78%;
    align-items: start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .lop__post-preview { scroll-snap-align: start; padding: 18px; }
  .lop__post-preview__img { height: 180px; }

  .lop__latest-posts { scrollbar-width: none; }
  .lop__latest-posts::-webkit-scrollbar { display: none; }

  .lop__latest-slider {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
  }
  .lop__latest-slider span {
    height: 11px;
    width: 11px;
    border-radius: 8px;
    background: #d8dceb;
    transition: width 0.2s ease, background 0.2s ease;
  }
  .lop__latest-slider span.is-active { width: 38px; background: #a8adbf; }
}

/* "See all" link on the profile Posts section */
.lop__section-head .lop__see-all {
  margin-left: auto;
  color: #002bc6;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.lop__section-head .lop__see-all:hover { text-decoration: underline; }

/* ---- "See all" posts view (reuses profile hero + sidebar; Figma 6749-22417) ---- */
.lop__posts-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: #13151a;
  font-family: 'Wavehaus', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.lop__posts-back:hover { color: #002bc6; }

.lop__posts-view .lop__posts-title {
  margin: 0 0 16px;
  font-family: 'Wavehaus', Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: #13151a;
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 600px) {
  .lo-post-card { padding: 14px; }
  .lo-post-card__head { gap: 12px; }
  .lo-post-card__avatar { flex-basis: 52px; width: 52px; height: 52px; font-size: 20px; }
  .lo-post-card__actions { gap: 12px 14px; flex-wrap: wrap; }
  .lo-post-card__addcomment { margin-left: auto; }

  /* Stacked composer (Figma 6749-23419): [avatar][input] on row 1, full-width "post" below */
  .lo-post-comment-form__main { gap: 10px; flex-wrap: wrap; }
  .lo-post-comment-form__avatar,
  .lo-post-comment__avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 11px; }
  .lo-post-comment-form__input { min-height: 46px; padding: 12px 14px; }
  .lo-post-comment-form__post { flex: 1 1 100%; width: 100%; height: 48px; padding: 0 16px; }
  .lo-post-comment-form__thumb,
  .lo-post-card__view-all { margin-left: 40px; }

  .lo-post-comment { gap: 12px; }
  .lo-post-comment--reply { margin-left: 24px; }
  .lo-post-comment__name { font-size: 15px; }
  .lo-post-comment__body { font-size: 15px; }

  /* Keep posts compact on mobile: collapse the 1-comment preview so the feed reads as
     a clean list; the "N comments" / "add comment" actions still open the full thread. */
  .lo-post-card__preview { display: none; }
}

