.chattz-feed {
  position: relative;
  width: min(560px, 100%);
  height: 100dvh;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  background: var(--background-color);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.chattz-feed::-webkit-scrollbar {
  display: none;
}

.chattz-feed-card {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--topbar-height));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--surface-soft);
}

.chattz-feed-media-shell,
.chattz-feed-media-single,
.chattz-feed-media-carousel,
.chattz-feed-media-track,
.chattz-feed-media-slide {
  width: 100%;
  height: 100%;
}

.chattz-feed-media-single img,
.chattz-feed-media-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface-soft);
}

.chattz-feed-media-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x pan-y;
}

.chattz-feed-media-track::-webkit-scrollbar {
  display: none;
}

.chattz-feed-media-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.chattz-feed-media-dots {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 6px;
}

.chattz-feed-media-nav {
  z-index: 4;
}

.chattz-feed-media-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--text-color) 30%, transparent);
  padding: 0;
}

.chattz-feed-media-dot.is-active {
  background: var(--primary-color);
}

.chattz-feed-gradient {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, transparent, black);
  pointer-events: none;
}

.chattz-feed-no-media {
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, var(--surface-soft) 0%, color-mix(in srgb, var(--surface-soft) 65%, #dbeafe) 100%);
}

.chattz-feed-content {
  position: absolute;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  gap: 14px;
  width: 100%;
  height: 40%;
}

.chattz-feed-meta {
  max-width: min(74%, 430px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
}

.chattz-feed-author {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
}

.chattz-feed-author img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, #ffffff 38%, transparent);
}

.chattz-feed-title,
.chattz-feed-description {
  border: 0;
  background: transparent;
  color: #ffffff;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.chattz-feed-title {
  font-size: clamp(19px, 2.6vw, 25px);
  font-weight: 700;
  line-height: 1.15;
}

.chattz-feed-description {
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
}

.chattz-feed-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.chattz-feed-action {
  border: none;
  background: none;
  color: #ffffff;
  padding: var(--padding-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.chattz-feed-action:hover,
.chattz-feed-action:focus-visible {
  background: none;
}

.chattz-feed-loading,
.chattz-feed-empty,
.chattz-feed-error,
.chattz-feed-hint {
  position: absolute;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  background: color-mix(in srgb, #0f172a 62%, transparent);
}

.chattz-feed-error {
  color: #ffd1d1;
}

.entry-content.alignfull.wp-block-post-content.has-global-padding.is-layout-constrained.wp-block-post-content-is-layout-constrained:has( > .chattz-feed) {
  margin: 0;
  margin-top: var(--topbar-height);
  height: calc(100dvh - var(--topbar-height));
  padding: 0;
}

@media (max-width: 700px) {
  .chattz-feed {
    width: 100%;
  }

  .chattz-feed-content {
    padding: 18px 12px calc(16px + env(safe-area-inset-bottom));
  }

  .chattz-feed-action {
    width: 56px;
    min-height: 56px;
  }

  .entry-content.alignfull.wp-block-post-content.has-global-padding.is-layout-constrained.wp-block-post-content-is-layout-constrained:has( > .chattz-feed),
  .chattz-feed,
  .chattz-feed-card {
    height: calc(100dvh - 62px);
    margin-top: 0;
  }
}