/* 小红书预览弹窗样式 - xhs-modal.css */

.xhs-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.xhs-modal-content {
  background-color: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  /* 供关闭按钮绝对定位参考（需求 11.5） */
  position: relative;
}

.xhs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.xhs-image-swiper {
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
}

.xhs-image-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.xhs-image-track img {
  flex-shrink: 0;
  width: 100%;
  scroll-snap-align: start;
}

.xhs-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.xhs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #FFD0DE;
  transition: background-color 0.3s;
}

.xhs-dot.active {
  background-color: #FF85A1;
}

.xhs-caption-box {
  background-color: #FFF5F7;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.xhs-copy-btn {
  background-color: #FF85A1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
}

.xhs-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xhs-btn-save,
.xhs-btn-open {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.xhs-btn-save {
  background-color: #FF85A1;
  color: white;
  border: none;
}

.xhs-btn-open {
  background-color: white;
  color: #FF85A1;
  border: 2px solid #FF85A1;
}

.xhs-btn-save:hover,
.xhs-btn-open:hover {
  opacity: 0.9;
}

.xhs-tip {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
}

/* 关闭按钮：绝对定位右上角，最小点击区域 44×44px（需求 11.5） */
.xhs-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.xhs-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

