@import "../../../../themes/page.scss";

.page-scroll__container {
  flex: 0 1 auto;
  height: var(--page-container-safeHeight, 100vh);
  background: #f7f8fa;
  padding-bottom: 140rpx;
}

.evaluate-container {
  background: #fff;
  margin: 24rpx;
  border-radius: 16rpx;
  padding: 32rpx;
}

.product-card {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 32rpx;
  margin-bottom: 24rpx;
  border-bottom: 1rpx solid #eee;
}

.product-img {
  width: 120rpx;
  height: 120rpx;
  border-radius: 12rpx;
  background: #f5f5f5;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  margin-left: 24rpx;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8rpx;
}

.product-name {
  font-size: 30rpx;
  color: #333;
  font-weight: 500;
}

.product-divider {
  font-size: 28rpx;
  color: #dcdcdc;
  margin: 0 30rpx;
}

.product-spec {
  font-size: 26rpx;
  color: #999;
}

.product-close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 16rpx;
  z-index: 1;
}

.rate-row {
  display: flex;
  align-items: center;
  // justify-content: space-between;
  margin-bottom: 32rpx;
}

.rate-label {
  font-size: 30rpx;
  color: #333;
  margin-right: 20px;
}

.rate-wrap {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.rate-score {
  font-size: 28rpx;
  color: #333;
  min-width: 56rpx;
  margin-left: 20px;
}

.comment-section {
  position: relative;
  margin-bottom: 32rpx;
}

.comment-display {
  width: 100%;
  min-height: 120rpx;
  padding: 24rpx;
  font-size: 28rpx;
  color: #333;
  background: #f7f8fa;
  border-radius: 12rpx;
  box-sizing: border-box;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.comment-input {
  width: 100%;
  min-height: 200rpx;
  padding: 24rpx;
  font-size: 28rpx;
  color: #333;
  background: #f7f8fa;
  border-radius: 12rpx;
  box-sizing: border-box;
}

.comment-placeholder {
  color: #999;
}

.comment-count {
  position: absolute;
  top: 24rpx;
  right: 24rpx;
  font-size: 24rpx;
  color: #999;
}

.upload-section {
  margin-bottom: 24rpx;
}

.upload-section .empty-media {
  font-size: 26rpx;
  color: #999;
  margin-top: 8rpx;
  display: block;
}

.section-label {
  font-size: 28rpx;
  color: #666;
  margin-bottom: 16rpx;
}

.upload-row {
  display: flex;
  gap: 20rpx;
  flex-wrap: wrap;
}

.upload-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160rpx;
  height: 160rpx;
  border-radius: 12rpx;
  border: 2rpx dashed #ddd;
}

.upload-trigger--image {
  background: #f2f2f2;
}

.upload-trigger--video {
  background: #4a4a4a;
  border-color: #333;
}

.upload-label {
  font-size: 26rpx;
  color: #999;
  margin-top: 12rpx;
}

.upload-label--light {
  color: rgba(255, 255, 255, 0.9);
}

.upload-trigger .t-icon {
  display: block;
}

/* 一行 4 个，与评价页一致 */
.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24rpx;
}

.media-list--readonly .media-item {
  .media-delete {
    display: none;
  }
}

.media-item {
  position: relative;
  width: 140rpx;
  height: 140rpx;
  flex-shrink: 0;
  border-radius: 12rpx;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 10px;
}

.media-thumb {
  width: 100%;
  height: 100%;
  display: block;
}

.media-item-video {
  position: relative;
  width: 100%;
  height: 100%;
  .media-thumb {
    display: block;
  }
}

.media-item-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.media-delete {
  position: absolute;
  top: 0;
  right: 0;
  width: 48rpx;
  height: 48rpx;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 12rpx 0 12rpx;
}

.publish-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 20rpx 32rpx;
  box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);
  z-index: 100;
}

.publish-btn {
  height: 88rpx;
  line-height: 88rpx;
  text-align: center;
  font-size: 32rpx;
  font-weight: 500;
  color: #fff;
  background: #1976d2;
  border-radius: 44rpx;
}

.publish-btn.disabled {
  background: #e8e8e8;
  color: #999;
}

/* 全屏轮播层：图片+视频一起，轮播到视频自动播放 */
.media-carousel-overlay {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #000;
}

.media-carousel-swiper {
  width: 100%;
  height: 100%;
}

.media-carousel-item {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-carousel-image-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-carousel-image {
  width: 100%;
  height: 100%;
  display: block;
  object-position: center;
}

.media-carousel-video-wrap {
  width: 100%;
  height: 100%;
}

.media-carousel-video {
  width: 100%;
  height: 100%;
  display: block;
}

.media-carousel-close {
  position: absolute;
  top: calc(var(--status-bar-height, 0px) + 24rpx);
  right: 24rpx;
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
