/**
 * Loveful Template Thumbnail Styles
 * 模板缩略图专用样式
 */

/* 作者信息展示样式 */
.loveful-template-thumbnail-ui {
  margin: 10px 0;
  padding: 0;
}

.loveful-template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.loveful-template-author-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loveful-template-author-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.loveful-template-author-info {
  font-size: 16px;
  color: #1b1453 !important;
  font-weight: 400;
}

.loveful-template-author-name {
  color: #1a1252 !important;
  font-weight: bold;
}

/* 可点击的艺术家头像和名称链接样式 */
.loveful-template-author-avatar-link {
  text-decoration: none;
  display: block;
  transition: transform 0.2s ease;
}

.loveful-template-author-avatar-link:hover {
  transform: scale(1.1);
}

.loveful-template-author-name-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.loveful-template-author-name-link:hover .loveful-template-author-name {
  color: #0073aa !important;
  text-decoration: underline;
}

.loveful-template-id {
  font-size: 14px;
  color: #222;
  margin-left: 0;
  font-family: monospace;
  font-weight: bold;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.loveful-template-id-value {
  font-size: 14px;
  color: #222;
  font-family: monospace;
  font-weight: bold;
  letter-spacing: 0;
  line-height: 1;
  display: inline-block;
}

.loveful-template-id-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

.loveful-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  transition: background 0.2s;
  margin-bottom: 0;
  vertical-align: middle;
}

.loveful-tooltip-icon:hover {
  background: #b3b3b3;
}

.loveful-tooltip-text {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: pre-line;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  min-width: 180px;
  text-align: left;
}

.loveful-template-id-tooltip:hover .loveful-tooltip-text {
  display: block;
}

.loveful-tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #222 transparent transparent transparent;
}

.loveful-template-thumbnail-img {
  position: relative;
  width: 100%;
}

.loveful-template-thumbnail-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

/* Pendant类别产品的缩略图宽度为50% */
.loveful-template-thumbnail-ui.is-pendant .loveful-template-thumbnail-img {
  width: 50%;
  margin: 0 auto;
}

/* 作者悬浮编辑样式 */
.loveful-template-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
}

.loveful-template-thumbnail-img:hover .loveful-template-edit-overlay {
  opacity: 1;
}

.loveful-template-edit-btn {
  /* background: #4CAF50 !important; */
  border: none !important;
  border-radius: 50% !important;
  aspect-ratio: 1/1;
  height: 70% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
  padding: 0 !important;
  line-height: normal !important;
}

.loveful-template-edit-btn:hover {
  /* background: #45a049 !important; */
  transform: scale(1.1) !important;
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4) !important;
}

/* Pendant类别的编辑按钮使用固定高度，因为pendant高度较高 */
.loveful-template-thumbnail-ui.is-pendant .loveful-template-edit-btn {
  height: 48px !important;
  width: 48px !important;
}

.loveful-template-edit-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: white;
}

/* 复制功能样式 */
.loveful-copy-btn {
  cursor: pointer;
}

.loveful-copy-msg {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 999;
}

.loveful-copy-msg.show {
  opacity: 1;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .loveful-tooltip-text {
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    min-width: 120px;
    max-width: 60vw;
    font-size: 12px;
    padding: 6px 8px;
    text-align: left;
  }
  
  .loveful-tooltip-text::after {
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #222;
  }
} 