
/* 领养详情模块样式 */

/* 领养卡片网格 */
.adoption-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* 响应式布局 - 适配小屏幕 */
@media (max-width: 1024px) {
  /* 平板和小屏幕 */
  .adoption-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  /* 手机屏幕 */
  .adoption-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  /* 小屏手机 */
  .adoption-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
}

.adoption-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.adoption-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.adoption-card-media {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.adoption-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 视频容器样式（参考笔记卡片） */
.adoption-card-video {
  width: 100%;
  height: 100%;
  position: relative;
}

.adoption-card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 视频播放图标 */
.adoption-card-video .card-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  pointer-events: none;
}

.adoption-card-content {
  padding: 8px 2px;
  background: #fff;
}

.adoption-card-breed {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.adoption-card-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.adoption-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.adoption-tag {
  background: #FFF5F0;
  color: #FF6B35;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.adoption-card-location {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.adoption-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 卡片操作按钮样式 */
.adoption-card-action-btn {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #FF6B35;
  background: #fff;
  color: #FF6B35;
  transition: all 0.2s;
}

.adoption-card-action-btn:hover {
  background: #FF6B35;
  color: #fff;
}

.adoption-card-action-btn.following {
  background: #FFF5F0;
  border-color: #FF6B35;
  color: #FF6B35;
}

.adoption-card-publisher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.adoption-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.adoption-card-name {
  font-size: 12px;
  color: #666;
}

.adoption-card-views {
  font-size: 12px;
  color: #999;
}

.adoption-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}

/* 领养详情弹窗 */
.adoption-detail-modal .modal-content {
  max-width: 1100px;
  margin: 3% auto;
  width: 95%;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}

.adoption-detail-container {
  display: grid;
  grid-template-columns: 60% 40%;
  grid-template-rows: auto 1fr;
  height: 80vh;
  min-height: 600px;
}

.adoption-left {
  grid-column: 1;
  grid-row: 1 / span 2;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.adoption-left img, .adoption-left video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.adoption-left .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 52px;
  border: none;
  background: rgba(255,255,255,.2);
  color: white;
  font-size: 32px;
  cursor: pointer;
  border-radius: 4px;
}

.adoption-left .arrow.left { left: 10px; }
.adoption-left .arrow.right { right: 10px; }

.adoption-right-header {
  grid-column: 2;
  grid-row: 1;
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.adoption-right {
  grid-column: 2;
  grid-row: 2;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.adoption-right-header .back-btn {
  border: none;
  background: #f0f0f0;
  color: #333;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.adoption-right-header .back-btn:hover {
  background: #e0e0e0;
}

.adoption-right-header .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.adoption-right-header .user-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.adoption-right-header .header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.adoption-right-header .follow-btn {
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: white;
}

.adoption-right-header .follow-btn.following {
  background: #fff;
  color: #FF6B35;
  border: 1px solid #FF6B35;
}

.adoption-right-header .delete-btn {
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  background: #e53e3e;
  color: white;
}

.adoption-right-header .delete-btn:hover {
  background: #fc8181;
}

.adoption-right-header .edit-btn {
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  background: #FF6B35;
  color: white;
}

.adoption-right-header .edit-btn:hover {
  background: #FF8C42;
}

.adoption-right-header .close-btn {
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  background: #8b8b8b;
  color: white;
}

.adoption-right-header .close-btn:hover {
  background: #b5b5b5;
}

.adoption-favorite-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.adoption-favorite-btn svg {
  fill: none;
  stroke: #666;
  stroke-width: 2;
  transition: all 0.2s;
}

.adoption-favorite-btn.favorited svg {
  fill: #FF6B35;
  stroke: #FF6B35;
}

.adoption-favorite-btn:hover svg {
  stroke: #FF6B35;
}

.adoption-favorite-btn span {
  font-size: 14px;
  color: #666;
}

.adoption-right-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.adoption-right-content {
  padding: 16px;
}

.adoption-right-content .breed {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #333;
}

.adoption-right-content .basic-info {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.adoption-right-content .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.adoption-right-content .tag {
  background: #FFF5F0;
  color: #FF6B35;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.adoption-right-content .location {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.adoption-right-content .temperament,
.adoption-right-content .requirements,
.adoption-right-content .description,
.adoption-right-content .contact-phone {
  margin-bottom: 16px;
}

.adoption-right-content .section-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.adoption-right-content .section-content {
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  white-space: pre-wrap;
}

.adoption-right-content .meta {
  color: #999;
  font-size: 12px;
}

.adoption-detail-modal .adoption-action-buttons {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #eee;
  align-items: center;
}

.adoption-view-count {
  color: #999;
  font-size: 12px;
  white-space: nowrap;
}

.adoption-detail-modal .adoption-action-buttons .action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.adoption-detail-modal .adoption-action-buttons .contact-btn {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: white;
}

.adoption-detail-modal .adoption-action-buttons .contact-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

.adoption-detail-modal .adoption-action-buttons .share-btn {
  background: #fff;
  color: #FF6B35;
  border: 1px solid #FF6B35;
}

.adoption-detail-modal .adoption-action-buttons .share-btn:hover {
  background: #FFF5F0;
}

.adoption-detail-modal .adoption-action-buttons .delete-btn-bottom {
  background: #fff;
  color: #FF4757;
  border: 1px solid #FF4757;
  flex: none;
  min-width: 60px;
}

.adoption-detail-modal .adoption-action-buttons .delete-btn-bottom:hover {
  background: #FFF0F0;
}

.adoption-detail-modal .adoption-action-buttons .edit-btn-bottom {
  background: #fff;
  color: #FF6B35;
  border: 1px solid #FF6B35;
  flex: none;
  min-width: 60px;
}

.adoption-detail-modal .adoption-action-buttons .edit-btn-bottom:hover {
  background: #FFF5F0;
}

/* ========== 移动端响应式布局 (≤800px) ========== */
@media (max-width: 800px) {
  .adoption-detail-modal .modal-content {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .adoption-detail-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    grid-template-columns: none;
    grid-template-rows: none;
  }

  /* 顶部用户栏 - 头像/昵称/关注 */
  .adoption-right-header {
    order: 1;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    padding: 10px 16px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .adoption-right-header .user-avatar {
    width: 36px;
    height: 36px;
  }

  .adoption-right-header .user-name {
    font-size: 14px;
    flex: 1;
  }

  .adoption-right-header .follow-btn,
  .adoption-right-header .delete-btn,
  .adoption-right-header .edit-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  /* 返回按钮移动端调整 */
  .adoption-right-header .back-btn {
    font-size: 13px;
    padding: 5px 12px;
    margin-right: 10px;
  }

  /* 媒体区 - 图片/视频 */
  .adoption-left {
    order: 2;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    height: 45vh;
    min-height: 280px;
    flex-shrink: 0;
  }

  .adoption-left .media-wrap {
    width: 100%;
    height: 100%;
  }

  .adoption-left img,
  .adoption-left video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .adoption-left .arrow {
    width: 32px;
    height: 44px;
    font-size: 24px;
  }

  .adoption-left .arrow.left { left: 8px; }
  .adoption-left .arrow.right { right: 8px; }

  /* 信息区 */
  .adoption-right {
    order: 3;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .adoption-right-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .adoption-right-content {
    padding: 12px 16px;
  }

  .adoption-right-content .breed {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .adoption-right-content .basic-info {
    font-size: 13px;
    gap: 12px;
    margin-bottom: 10px;
  }

  .adoption-right-content .tags {
    margin-bottom: 12px;
  }

  .adoption-right-content .tag {
    padding: 3px 8px;
    font-size: 12px;
  }

  .adoption-right-content .location {
    font-size: 13px;
    margin-bottom: 12px;
  }

  /* 性格、领养要求、其他说明、联系电话 - 标签和内容同一行 */
  .adoption-right-content .temperament,
  .adoption-right-content .requirements,
  .adoption-right-content .description,
  .adoption-right-content .contact-phone {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .adoption-right-content .temperament .section-label,
  .adoption-right-content .requirements .section-label,
  .adoption-right-content .contact-phone .section-label {
    flex-shrink: 0;
    margin-right: 10px;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    padding-top: 0;
  }

  .adoption-right-content .description .section-label {
    flex-shrink: 0;
    margin-right: 10px;
    padding-top: 0;
  }

  .adoption-right-content .temperament .section-content,
  .adoption-right-content .requirements .section-content,
  .adoption-right-content .description .section-content,
  .adoption-right-content .contact-phone .section-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 0;
  }

  .adoption-right-content .section-label {
    font-size: 13px;
  }

  .adoption-right-content .section-content {
    font-size: 13px;
    line-height: 1.6;
  }

  .adoption-right-content .meta {
    font-size: 11px;
  }

  /* 底部操作按钮 */
  .adoption-detail-modal .adoption-action-buttons {
    padding: 10px 16px;
    flex-shrink: 0;
    gap: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    align-items: center;
  }

  .adoption-view-count {
    font-size: 11px;
    margin-right: 4px;
  }

  .adoption-detail-modal .adoption-action-buttons .action-btn {
    padding: 10px;
    font-size: 14px;
    border-radius: 22px;
  }

  .adoption-detail-modal .adoption-action-buttons .delete-btn-bottom,
  .adoption-detail-modal .adoption-action-buttons .edit-btn-bottom {
    padding: 10px 14px;
    font-size: 13px;
    min-width: auto;
  }

  .adoption-favorite-btn {
    margin-right: 10px !important;
  }

  .adoption-favorite-btn svg {
    width: 22px;
    height: 22px;
  }

  .adoption-favorite-btn span {
    font-size: 13px;
  }
}

/* 小屏手机优化 (≤480px) */
@media (max-width: 480px) {
  .adoption-left {
    height: 40vh;
    min-height: 240px;
  }

  .adoption-right-content .breed {
    font-size: 16px;
  }

  .adoption-right-content .basic-info {
    font-size: 12px;
    gap: 8px;
  }

  .adoption-right-content .section-content {
    font-size: 12px;
  }
}
