/* Civic feed presentation. Shared feed behavior remains in connections-feed.js. */

.connections-feed-post[data-post-layout="microblog"] {
  border-color: rgb(28 60 72 / 16%);
  border-radius: 18px;
  box-shadow: 0 10px 34px rgb(20 44 52 / 6%);
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-post-header {
  align-items: flex-start;
  padding: 18px 20px 0;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-author {
  align-items: flex-start;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-avatar {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgb(41 76 68 / 18%);
  background: #edf3f1;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-avatar img,
.connections-feed-post[data-post-layout="poll"] .connections-feed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-profile {
  gap: 1px;
  padding-top: 2px;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-profile strong {
  color: #142f39;
  font-size: 1rem;
  line-height: 1.25;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-author-handle {
  color: #6b7c82;
  font-size: .82rem;
  line-height: 1.35;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-topic {
  max-width: 30%;
  padding: 4px 8px;
  color: #486871;
  background: #edf4f4;
  font-size: .72rem;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-post-content {
  padding: 16px 20px 18px 77px;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-post-copy p {
  color: #1f343b;
  font-size: 1rem;
  line-height: 1.6;
}

.connections-feed-link-figure,
.connections-feed-photo {
  min-width: 0;
  margin: 18px 0 0;
}

.connections-feed-link-card {
  display: grid;
  overflow: hidden;
  border: 1px solid #d7dfdf;
  border-radius: 15px;
  color: inherit;
  background: #f9fbfa;
  text-decoration: none;
}

a.connections-feed-link-card:hover {
  border-color: #aebfc0;
  background: #fff;
}

a.connections-feed-link-card:focus-visible {
  outline: 3px solid #c7a96b;
  outline-offset: 3px;
}

.connections-feed-link-card .connections-feed-article-image,
.connections-feed-photo .connections-feed-article-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #d7dfdf;
  object-fit: cover;
  background: #e5ebea;
}

.connections-feed-link-copy {
  display: grid;
  gap: 7px;
  padding: 15px 16px 16px;
}

.connections-feed-link-copy strong {
  color: #18353d;
  font-size: 1rem;
  line-height: 1.35;
}

.connections-feed-link-copy p {
  display: -webkit-box;
  overflow: hidden;
  color: #57696e;
  font-size: .88rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.connections-feed-image-credit {
  margin: 6px 4px 0;
  color: #738086;
  font-size: .75rem;
  line-height: 1.4;
}

.connections-feed-image-credit a {
  color: #486871;
  text-underline-offset: 2px;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-engagement {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 11px;
  border-top-color: #e5eaea;
}

.connections-feed-metric {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #66797e;
  font-size: .78rem;
  font-weight: 600;
}

.connections-feed-metric svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.connections-feed-metric-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-comments {
  margin-left: 66px;
  padding: 15px 20px 20px 11px;
  border-left: 2px solid #dce6e4;
  background: #fbfcfb;
}

.connections-feed-post[data-post-layout="microblog"] .connections-feed-comment {
  padding: 11px 12px;
  border: 1px solid #e1e8e5;
  background: #f5f8f7;
}

.connections-feed-post[data-post-layout="poll"] {
  border-color: rgb(42 58 92 / 17%);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 42px rgb(26 42 69 / 7%);
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-post-header {
  padding: 20px 21px 0;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-post-content {
  padding: 18px 21px 21px;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-post-copy p {
  color: #26384c;
  line-height: 1.62;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-attachment:has(.connections-feed-poll-options),
.connections-feed-post[data-post-layout="poll"] .connections-feed-closed-poll {
  gap: 14px;
  padding: 18px;
  border-color: #cfd9e7;
  background: linear-gradient(145deg, #f8faff, #eef3f9);
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-attachment:has(.connections-feed-poll-options) > strong,
.connections-feed-post[data-post-layout="poll"] .connections-feed-closed-poll > strong {
  color: #152c46;
  font: 650 1.2rem/1.35 Manrope, Inter, Arial, sans-serif;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-poll-options {
  gap: 10px;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-poll-option {
  position: relative;
  gap: 7px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid #d2dce8;
  border-radius: 11px;
  background: rgb(255 255 255 / 85%);
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-poll-option > span:first-child {
  position: relative;
  z-index: 1;
  color: #20364e;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.35;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-poll-option em {
  color: #526a84;
  font-weight: 700;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-poll-bar {
  height: 5px;
  background: #e2e8f0;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-poll-bar::before {
  background: linear-gradient(90deg, #395f89, #527ba6);
}

.connections-feed-poll-total {
  margin: 0;
  color: #687a8f;
  font-size: .78rem;
  font-weight: 650;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-engagement {
  gap: 12px 20px;
  border-top-color: #e3e8ee;
}

.connections-feed-post[data-post-layout="poll"] .connections-feed-comments {
  border-top: 1px solid #e4e9ef;
  background: #f8fafc;
}

@media (max-width: 600px) {
  .connections-feed-post[data-post-layout="microblog"] .connections-feed-post-header {
    padding-right: 15px;
    padding-left: 15px;
  }

  .connections-feed-post[data-post-layout="microblog"] .connections-feed-post-content {
    padding: 15px 15px 17px;
  }

  .connections-feed-post[data-post-layout="microblog"] .connections-feed-comments {
    margin-left: 15px;
    padding-right: 15px;
    padding-left: 12px;
  }

  .connections-feed-post[data-post-layout="microblog"] .connections-feed-topic {
    display: none;
  }

  .connections-feed-post[data-post-layout="microblog"] .connections-feed-engagement {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
  }

  .connections-feed-link-copy {
    padding: 13px 14px 15px;
  }

  .connections-feed-link-card .connections-feed-article-image,
  .connections-feed-photo .connections-feed-article-image {
    aspect-ratio: 16 / 9;
  }

  .connections-feed-post[data-post-layout="poll"] .connections-feed-post-header,
  .connections-feed-post[data-post-layout="poll"] .connections-feed-post-content {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .connections-feed-post[data-post-layout="microblog"] *,
  .connections-feed-post[data-post-layout="poll"] * {
    transition: none !important;
  }
}
