/* Smile #75410: lightbox 附件评价 — 收起浮钮 + 展开面板 */

/* 与收藏共用浮条：flex 并排，宽度变化也不重叠 */
.fancybox-float-dock {
  position: absolute;
  top: 56px;
  right: 14px;
  z-index: 100021;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.fancybox-float-dock > * {
  pointer-events: auto;
}
.fancybox-float-dock .fancybox-heart-float,
.fancybox-float-dock .fancybox-review-float {
  position: static;
  top: auto;
  right: auto;
  left: auto;
}

.fancybox-review-float {
  position: absolute;
  top: 56px;
  right: 108px; /* 无 dock 时兜底；入 dock 后由 flex 排 */
  z-index: 100021;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  color: #fff;
  background: rgba(30, 30, 30, 0.78);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  line-height: 1;
}
.fancybox-review-float:hover {
  background: rgba(50, 50, 50, 0.92);
}
.fancybox-review-float.is-rated {
  color: #ffc107;
  background: rgba(30, 30, 30, 0.9);
}
.fancybox-review-float.is-open {
  background: rgba(50, 50, 50, 0.95);
}
.fancybox-review-float-icon {
  font-size: 16px;
  line-height: 1;
}
.fancybox-review-float-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fancybox-review-panel {
  position: absolute;
  top: 104px;
  right: 14px;
  z-index: 100022;
  display: block;
  width: 320px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 12px 14px 14px;
  border-radius: 10px;
  background: rgba(30, 30, 30, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
}
.fancybox-review-panel[hidden] {
  display: none !important;
}
.fancybox-review-title {
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.fancybox-review-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}
.fancybox-review-star {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  padding: 0 1px;
  line-height: 1;
}
.fancybox-review-star.is-on {
  color: #ffc107;
}
.fancybox-review-clear {
  border: 0;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  margin-left: 4px;
  font-size: 14px;
}
.fancybox-review-tags,
.fancybox-review-note {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
}
.fancybox-review-tags {
  min-height: 40px;
}
.fancybox-review-note {
  min-height: 110px;
}
.fancybox-review-tags::placeholder,
.fancybox-review-note::placeholder {
  color: #999;
}
.fancybox-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}
.fancybox-review-status {
  font-size: 11px;
  color: #ccc;
}
.fancybox-review-status.is-ok {
  color: #8fdf8f;
}
.fancybox-review-status.is-err {
  color: #ff8a8a;
}

@media (max-width: 700px) {
  .fancybox-float-dock {
    top: 56px;
    right: 14px;
  }
  .fancybox-review-float {
    top: 56px;
  }
  .fancybox-review-panel {
    width: min(320px, calc(100vw - 28px));
    top: auto;
    bottom: 56px;
    right: 14px;
    max-height: 40vh;
  }
}

/* ---------- 0.1.9+：正文大图角标 + 页面评价弹层 ---------- */
/* 0.1.11：右上并排；未评/未藏 = 半透明空心星/空心爱心 */
/* 0.1.12：shell 必须贴合图片实际显示宽（fit-content），否则 right:6px 贴到整行最右 */
/* 0.1.15：未评/未藏加暗底，浅色图上也看得见（仍弱于已评/已藏） */

.smile-att-img-shell {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
  vertical-align: middle;
  /* 避免被父级 a/block 拉满整行 */
  box-sizing: border-box;
}
.smile-att-img-shell > img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}
.smile-att-badge-dock {
  position: absolute;
  z-index: 20;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}
.smile-att-badge {
  position: relative;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 28px;
  min-width: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  pointer-events: auto;
  opacity: 0.82;
  filter: none;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.smile-att-badge:hover {
  opacity: 1;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
}
.smile-att-ico {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}
/* 默认：只显示空心；激活：只显示实心 */
.smile-att-badge .smile-att-ico-fill { display: none; }
.smile-att-badge .smile-att-ico-out { display: block; }
.smile-att-badge.is-rated .smile-att-ico-fill,
.smile-att-badge.is-hearted .smile-att-ico-fill { display: block; }
.smile-att-badge.is-rated .smile-att-ico-out,
.smile-att-badge.is-hearted .smile-att-ico-out { display: none; }

.smile-att-badge-label {
  font-size: 11px;
  font-weight: 700;
  min-width: 0.7em;
}
.smile-att-badge-label[hidden] {
  display: none !important;
}

.smile-att-badge-review.is-rated {
  opacity: 1;
  color: #ffc107;
  background: rgba(20, 20, 20, 0.55);
}
.smile-att-badge-heart.is-hearted {
  opacity: 1;
  color: #fbbf24;
  background: rgba(20, 20, 20, 0.55);
}

.smile-review-popover {
  position: absolute;
  z-index: 100050;
  display: block;
  width: 320px;
  max-height: min(70vh, 480px);
  overflow: auto;
  padding: 12px 14px 14px;
  border-radius: 10px;
  background: rgba(30, 30, 30, 0.94);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
}
.smile-review-popover[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .smile-review-popover {
    width: min(320px, calc(100vw - 24px));
  }
  .smile-att-badge {
    height: 26px;
    min-width: 26px;
    padding: 0 3px;
  }
  .smile-att-ico {
    width: 15px;
    height: 15px;
  }
}

/* 0.1.17：/attachments/:id 顶栏评分（下载旁） */
#content > .contextual > a.smile-att-show-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  margin-left: 6px;
  border: 1px solid #d8dde3;
  border-radius: 4px;
  background: #fff;
  color: #94a3b8;
  text-decoration: none !important;
  vertical-align: middle;
  box-sizing: border-box;
  line-height: 1;
}
#content > .contextual > a.smile-att-show-review:hover {
  background: #f3f5f8;
  border-color: #c5ccd5;
  color: #64748b;
}
#content > .contextual > a.smile-att-show-review.is-rated {
  color: #b45309;
  border-color: #f5d78e;
  background: #fffbeb;
}
#content > .contextual > a.smile-att-show-review .smile-att-ico {
  width: 14px;
  height: 14px;
}
#content > .contextual > a.smile-att-show-review .smile-att-ico-fill { display: none; }
#content > .contextual > a.smile-att-show-review .smile-att-ico-out { display: block; }
#content > .contextual > a.smile-att-show-review.is-rated .smile-att-ico-fill { display: block; }
#content > .contextual > a.smile-att-show-review.is-rated .smile-att-ico-out { display: none; }
#content > .contextual > a.smile-att-show-review .smile-att-show-label {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#content > .contextual > a.smile-att-show-review .smile-att-show-label[hidden] {
  display: none !important;
}
