/* ─── PWA Feed — Custom styles (Bootstrap 5 dark theme base) ── */

/* ── Post card image ─────────────────────────────────────────── */
.post-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-detail-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.post-title-link {
  text-decoration: none;
  color: inherit;
}

.post-title-link:hover h5 {
  color: var(--bs-primary);
}

.post-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--bs-body-color);
}

.post-content p {
  margin-bottom: 1em;
}

.post-content img {
  border-radius: .5rem;
  max-width: 100%;
  margin: 1em 0;
}

/* ── Reaction summary badges ─────────────────────────────────── */
.reaction-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .5rem;
}

.reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .15rem .55rem;
  border-radius: 20px;
  font-size: .85rem;
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
  user-select: none;
}

.reaction-badge strong {
  font-size: .78rem;
  font-weight: 700;
  color: var(--bs-secondary-color);
}

.reaction-badge.active {
  border-color: var(--bs-primary);
  background: rgba(13, 110, 253, .12);
}

.reaction-badge.active strong {
  color: var(--bs-primary);
}

/* ── Reaction picker popup ───────────────────────────────────── */
.reaction-picker-popup {
  display: flex;
  gap: .2rem;
  padding: .45rem .55rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  position: fixed;
  z-index: 9000;
  animation: picker-in .14s ease;
}

@keyframes picker-in {
  from {
    opacity: 0;
    transform: scale(.82) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.picker-emoji {
  font-size: 1.5rem;
  padding: .2rem .25rem;
  border-radius: 50%;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 100ms ease, background 100ms;
  position: relative;
}

.picker-emoji:hover {
  transform: scale(1.35);
  background: var(--bs-secondary-bg);
}

.picker-emoji.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bs-primary);
}

/* ── Share modal (Bootstrap modal override) ──────────────────── */
.share-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: .6rem;
  margin-bottom: 1.25rem;
}

.share-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .65rem .4rem;
  border-radius: .5rem;
  border: 1px solid var(--bs-border-color);
  font-size: .78rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
  text-align: center;
  transition: border-color .15s, color .15s, background .15s;
}

.share-platform:hover {
  border-color: var(--bs-primary);
  color: var(--bs-body-color);
  background: var(--bs-secondary-bg);
  text-decoration: none;
}

.share-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
}

.facebook-icon {
  background: #1877f2;
  color: #fff;
}

.twitter-icon {
  background: #000;
  color: #fff;
}

.whatsapp-icon {
  background: #25d366;
  color: #fff;
  font-size: 1.35rem;
}

.telegram-icon {
  background: #2aabee;
  color: #fff;
}

.email-icon {
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
}

/* ── Toast (Bootstrap toast with custom colours) ─────────────── */
.toast-pwa {
  min-width: 260px;
}

/* ── Offline badge ───────────────────────────────────────────── */
#push-toggle-btn.push-active {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

/* ── Loading screen flash prevention ────────────────────────── */
#app-main {
  min-height: 60vh;
}

/* ── Misc ────────────────────────────────────────────────────── */
.back-link {
  text-decoration: none;
}

/* ── Post card back-navigation highlight ─────────────────────── */
@keyframes card-highlight {
  0% {
    box-shadow: 0 0 0 3px var(--bs-primary);
  }

  70% {
    box-shadow: 0 0 0 3px var(--bs-primary);
  }

  100% {
    box-shadow: none;
  }
}

.post-card-highlight {
  animation: card-highlight 1.5s ease forwards;
}