﻿body.ic-project-view {
  background: #fff;
}

@media (max-width: 800px), (min-width: 801px) {
  body.ic-project-view .ic-header,
  body.ic-project-view .ic-footer,
  body.ic-project-view .ic-tabbar {
    display: none !important;
  }
}

.ic-pjv {
  min-height: 100dvh;
  background: #fff;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* Web RTL: row (not row-reverse) — close/right, spacer/left; mirrors ProjectScreen. */
.ic-pjv-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 16px 10px;
  background: #fff;
  direction: rtl;
}

.ic-pjv-head-space,
.ic-pjv-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.ic-pjv-close {
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
}

.ic-pjv-close img {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(52%) sepia(66%) saturate(661%) hue-rotate(182deg) brightness(97%) contrast(92%);
}

.ic-pjv-circuit,
.ic-pjv-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: #4e91e6;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-pjv-loading,
.ic-pjv-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 240px;
  padding: 24px;
  text-align: center;
  color: #6a81a9;
  font-size: 13px;
}

.ic-pjv-body[hidden],
.ic-pjv-error[hidden],
.ic-pjv-loading[hidden],
.ic-pjv-media-wrap[hidden],
.ic-pjv-owner[hidden] {
  display: none !important;
}

.ic-pjv-media-wrap {
  position: relative;
  width: 100%;
  padding: 8px 0 0;
  background: #fff;
}

.ic-pjv-media-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ic-pjv-media-track::-webkit-scrollbar {
  display: none;
}

.ic-pjv-media-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  border: 0;
  padding: 0 16px;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.ic-pjv-media-frame {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: #ececec;
}

.ic-pjv-media-slide img,
.ic-pjv-media-slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-pjv-media-slide .ic-play {
  border-radius: 16px;
}

.ic-pjv-media-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 12px 0 0;
}

.ic-pjv-media-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5e5ea;
}

.ic-pjv-media-dot.is-active {
  background: #4e91e6;
}

.ic-pjv-owner {
  padding: 0;
}

.ic-pjv-owner-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 20px 0 16px;
  direction: rtl;
}

.ic-pjv-owner-avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  margin: 5.5px 0 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #ececec;
  cursor: pointer;
}

.ic-pjv-owner-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-pjv-owner-text {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.ic-pjv-owner-name {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 4px;
  direction: rtl;
}

.ic-pjv-owner-name .ic-cmt-author {
  font-size: 11.2px;
  font-weight: 700;
  color: #2d3a4a;
}

.ic-pjv-owner-name .ic-cmt-owner-tag {
  font-size: 10.2px;
  color: #919aaf;
}

.ic-pjv-owner-name .ic-cmt-badge--main {
  margin-top: 1px;
}

.ic-pjv-owner-caption {
  margin: 0;
  font-size: 11px;
  line-height: 22px;
  color: #4a5a6a;
  white-space: pre-wrap;
  word-break: break-word;
}

/* کامنت‌های پروژه — همان مقیاس circuit (ic-cmt--circuit روی thread) */
.ic-pjv .ic-cmt--circuit .ic-cmt-text {
  font-size: 11.1px;
}

.ic-pjv .ic-cmt--circuit .ic-cmt-support-text {
  font-size: 11.1px;
}

.ic-pjv-owner-time {
  display: block;
  margin-top: 4px;
  font-size: 10.2px;
  color: #919aaf;
  text-align: right;
}

.ic-pjv-owner-time .ic-cmt-time {
  font-size: inherit;
  color: inherit;
}

.ic-pjv-divider {
  height: 1px;
  margin: 8px 24px 16px;
  background: rgba(145, 154, 175, 0.15);
}

body.ic-project-view .ic-cmt--circuit {
  padding: 0 16px 4px;
}

body.ic-project-view .ic-cmt--circuit .ic-cmt-item {
  padding-left: 6px;
  padding-right: 6px;
}
