/* 继承原有的基础样式 */
@import url('/animals/animalsNew/father_styles.css');

/* 添加命名空间 */
.animals-info-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    padding: 20px;
    background: var(--bg-color);
    color: var(--text-color);
}

/* 修改所有选择器，添加命名空间前缀 */
.animals-info-container .header {
    margin-bottom: 24px;
}

.animals-info-container .search-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    max-width: 1000px; /* 限制整体最大宽度 */
}

.animals-info-container .search-input {
    flex: 2; /* 搜索框占更多空间 */
    max-width: 500px; /* 限制搜索框最大宽度 */
}

.animals-info-container .type-select,
.animals-info-container .status-select {
    width: 150px !important; /* 下拉框固定宽度 */
    flex-shrink: 0; /* 防止下拉框被压缩 */
}

/* 动物卡片特定样式 */
.animals-info-container .animal-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 的宽高比 */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f5f5f5;
}

.animals-info-container .animal-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片填充整个容器 */
}

.animals-info-container .animal-info {
    padding: 12px;
}

.animals-info-container .info-row {
    display: flex;
    align-items: center;
    gap: 12px;  /* 统一设置间距 */
    margin-bottom: 8px;
}

.animals-info-container .animal-type {
    color: var(--text-color-secondary);
    font-size: 0.9em;
}

.animals-info-container .animal-name {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-color);
}

.animals-info-container .animal-gender,
.animals-info-container .animal-age {
    color: var(--text-color-secondary);
    font-size: 0.9em;
}

/* 状态标签容器 */
.animals-info-container .status-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* 所有标签的基础样式 */
.animals-info-container .status-tag,
.animals-info-container .sponsor-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    line-height: 1.4;
    white-space: nowrap;
}

/* 移除状态标签的伪元素 */
.animals-info-container .status-tag::before,
.animals-info-container .status-tag::after {
    display: none !important;
}

/* 待领养状态 */
.animals-info-container .status-tag {
    background: rgba(103, 194, 58, 0.1);
    color: #67c23a;
}

/* 助养中标签 */
.animals-info-container .sponsor-tag {
    background: rgba(230, 162, 60, 0.1);
    color: #e6a23c;
}

/* 详情弹窗样式 */
.animals-info-container .detail-image {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.animals-info-container .detail-image img {
    max-height: 300px; /* 固定最大高度 */
    width: auto; /* 宽度自适应 */
    height: auto;
    object-fit: contain; /* 保持原始比例 */
}

.animals-info-container .character-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.animals-info-container .character-tag {
    margin: 0;
}

.animals-info-container .sponsor-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.animals-info-container .no-sponsor {
    color: var(--text-color-secondary);
    font-style: italic;
}

.animals-info-container .contact-info {
    background: var(--section-bg);
    padding: 12px;
    border-radius: 8px;
}

.animals-info-container .animal-description {
    background: var(--section-bg);
    padding: 16px;
    border-radius: 8px;
    overflow: auto;
    width: 100%;  /* 确保宽度100% */
    margin: 0;    /* 移除外边距 */
    box-sizing: border-box;  /* 确保padding不会增加总宽度 */
}

.animals-info-container .animal-description img,
.animals-info-container .animal-description video {
    max-width: 100%;
    max-height: 300px; /* 限制图片和视频的最大高度 */
    width: auto;
    height: auto;
    margin: 10px auto; /* 上下margin10px, 左右自动居中 */
    display: block; /* 块级显示以支持margin auto居中 */
    border-radius: 4px;
}

.animals-info-container .animal-description h1,
.animals-info-container .animal-description h2,
.animals-info-container .animal-description h3,
.animals-info-container .animal-description h4,
.animals-info-container .animal-description h5,
.animals-info-container .animal-description h6 {
    margin: 16px 0 8px;
    line-height: 1.4;
    font-weight: bold;
}

.animals-info-container .animal-description p {
    margin: 8px 0;
    line-height: 1.6;
}

.animals-info-container .animal-description blockquote {
    margin: 16px 0;
    padding: 8px 16px;
    border-left: 4px solid #ddd;
    background: rgba(0, 0, 0, 0.03);
}

.animals-info-container .animal-description ul,
.animals-info-container .animal-description ol {
    margin: 8px 0;
    padding-left: 24px;
}

.animals-info-container .animal-description li {
    margin: 4px 0;
}

.animals-info-container .animal-description .MsoNormal {
    margin: 0;
    line-height: inherit;
}

html.dark .animals-info-container .animal-description blockquote {
    border-left-color: #666;
    background: rgba(255, 255, 255, 0.03);
}

html.dark .animals-info-container .animal-description {
    color: var(--text-color);
}

/* 助养角标样式 */
.animals-info-container .badge.sponsor {
    background: linear-gradient(45deg, #e6a23c, #f56c6c);
}

/* 基础按钮样式 - 适用于所有设备 */
.animals-info-container .sponsor-button {
    display: inline-block;
    padding: 10px 24px;
    margin-top: 12px;
    background: #409EFF;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s;
}

.animals-info-container .sponsor-button:hover {
    background: #66b1ff;
}

.animals-info-container .no-sponsor {
    color: var(--text-color-secondary);
    text-align: center;
    padding: 12px 0;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .animals-info-container .search-bar {
        flex-direction: column;
        gap: 12px;
    }

    .animals-info-container .search-input,
    .animals-info-container .type-select,
    .animals-info-container .status-select {
        width: 100% !important;
        max-width: 100%;
    }

    .animals-info-container .animal-image {
        height: 150px;
    }

    /* 弹窗全屏显示 */
    .animals-info-container .el-dialog {
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        border-radius: 0;
    }

    .animals-info-container .el-dialog__body {
        height: calc(100vh - 53px);
        padding: 0;
        overflow-y: auto;
        /* 隐藏滚动条 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    /* 隐藏 Webkit 浏览器的滚动条 */
    .animals-info-container .el-dialog__body::-webkit-scrollbar {
        display: none;
    }

    /* 弹窗内容区域添加内边距 */
    .animals-info-container .animal-detail {
        padding: 16px 0;  /* 只移除左右内边距 */
    }

    /* 返回按钮 */
    .animals-info-container .dialog-back-btn {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        color: #909399;
        cursor: pointer;
        z-index: 10;
    }

    /* 回到顶部按钮 */
    .animals-info-container .scroll-to-top {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #409EFF;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
        transition: all 0.3s;
        z-index: 2001; /* 确保在最上层 */
    }

    .animals-info-container .scroll-to-top:hover {
        background: #66b1ff;
        transform: translateY(-2px);
    }

    .animals-info-container .scroll-to-top .el-icon {
        font-size: 20px;
    }

    /* 详情部分样式调整 */
    .animals-info-container .detail-section {
        margin-bottom: 8px;
        padding: 16px 12px;  /* 保持内边距 */
        background: var(--section-bg);  /* 恢复背景色 */
        border-radius: 8px;  /* 添加圆角 */
    }

    /* 调整动物描述区域的样式 */
    .animals-info-container .animal-description {
        padding: 16px 12px;
        border-radius: 0;  /* 移动端移除圆角 */
        background: none;  /* 移动端移除背景色 */
    }

    /* 调整动物描述中的图片 */
    .animals-info-container .animal-description img {
        width: 100%;
        height: auto;
        margin: 8px 0;
    }

    /* 调整动物描述中的段落 */
    .animals-info-container .animal-description p {
        margin: 8px 0;
        width: 100%;
    }

    /* 助养信息域调整 */
    .animals-info-container .sponsor-info,
    .animals-info-container .no-sponsor {
        padding: 16px 0;  /* 只移除左右内边距 */
    }

    /* 联系信息区域调整 */
    .animals-info-container .contact-info {
        padding: 16px 0;  /* 只移除左右内边距 */
        border-radius: 0;
    }

    /* 调整图片容器样式 */
    .animals-info-container .detail-image {
        border-radius: 0;  /* 移除圆角 */
    }

    .animals-info-container .detail-image img {
        border-radius: 0;  /* 移除圆角 */
    }

    /* 调整信息网格在手机端的显示 */
    .animals-info-container .info-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* 调整信息项为水平布局 */
    .animals-info-container .info-item {
        padding: 8px 0;
        display: flex;
        flex-direction: row;  /* 改为水平排列 */
        align-items: center;  /* 垂直居中对齐 */
        gap: 8px;  /* 标签和值之间的间距 */
    }

    /* 调整信息标签样式 */
    .animals-info-container .info-label {
        color: var(--text-color-secondary);
        font-size: 14px;
        flex-shrink: 0;  /* 防止文字换行 */
        min-width: 70px;  /* 给标签一个固定宽度 */
    }

    /* 调整信息值样式 */
    .animals-info-container .info-value {
        color: var(--text-color);
        font-size: 14px;
        flex: 1;  /* 占据剩余空间 */
        text-align: left;
    }

    /* 调整section标题样式 */
    .animals-info-container .section-title {
        font-size: 16px;
        margin-bottom: 12px;
        color: var(--text-color);
        font-weight: 500;
        text-align: left;
    }

    /* 调整弹窗的内边距 */
    .el-dialog__body {
        padding: 0 !important;
    }

    .el-dialog__header {
        padding: 12px !important;
        border-bottom: 1px solid #eee;  /* 添加一个微妙的分隔线 */
    }

    /* 调整弹窗标题区域 */
    .el-dialog__title {
        margin-left: 24px;  /* 为返回按钮留出空间 */
    }

    /* 信息网格在手机端改为单列显示 */
    .animals-info-container .info-grid {
        display: flex;  /* 改用flex布局 */
        flex-direction: column;  /* 垂直排列 */
        gap: 4px;  /* 减少项目间距 */
        width: 100%;  /* 占满宽度 */
    }

    /* 调整信息项的样式 */
    .animals-info-container .info-item {
        padding: 8px 0;
        display: flex;
        flex-direction: column;  /* 改为垂直排列 */
        align-items: flex-start;  /* 左对齐 */
        gap: 4px;
    }

    /* 调整信息标签和值样式 */
    .animals-info-container .info-label {
        color: var(--text-color-secondary);
        font-size: 14px;
        flex-shrink: 0;  /* 防止文字换行 */
        margin-right: 12px;  /* 与值保持间距 */
    }

    .animals-info-container .info-value {
        text-align: left;  /* 改为左对齐 */
        color: var(--text-color);
        font-size: 14px;
        width: 100%;
    }

    /* 助养信息区域左对齐 */
    .animals-info-container .no-sponsor {
        text-align: left;
    }

    /* 联系信息区域左对齐 */
    .animals-info-container .contact-info {
        padding: 0;
        background: none;
        display: flex;
        flex-direction: row;  /* 改为水平列 */
        align-items: center;
        gap: 8px;
    }

    /* 调整信息项布局 */
    .animals-info-container .info-item {
        display: flex;
        flex-direction: row !important;  /* 强制水平排列 */
        align-items: center;
        padding: 8px 12px;
        gap: 8px;
    }

    /* 调整标签样式 */
    .animals-info-container .info-label {
        flex-shrink: 0;
        margin-right: 4px;
        min-width: auto;  /* 移除固定宽度 */
    }

    /* 调整值的样式 */
    .animals-info-container .info-value {
        flex: 1;
        text-align: left;
    }

    /* 确保所有section内的info-item都是水平布局 */
    .animals-info-container .detail-section .info-item {
        flex-direction: row !important;
    }

    /* 调整助养按钮样式 */
    .animals-info-container .sponsor-button {
        display: block;  /* 块级显示 */
        width: 100%;     /* 占满宽度 */
        margin: 16px 0;  /* 上下间距 */
        padding: 12px 0; /* 增加按钮高度 */
        text-align: center;
        background: #409EFF;
        color: white;
        border-radius: 4px;
        font-size: 16px;
        font-weight: 500;
        text-decoration: none;
    }

    /* 未助养状态的提示文字 */
    .animals-info-container .no-sponsor {
        text-align: center;
        padding: 16px 0;
    }

    /* 移动端特殊样式 */
    .animals-info-container .sponsor-button {
        display: block;
        width: 100%;
        margin: 16px 0;
        padding: 12px 0;
        font-size: 16px;
        text-align: center;
    }

    .animals-info-container .no-sponsor {
        padding: 16px 0;
    }

    /* 移动端详细介绍样式 */
    .animals-info-container .animal-description {
        padding: 16px 12px;
        border-radius: 0;  /* 移动端移除圆角 */
        background: none;  /* 移动端移除背景色 */
    }

    /* 详细介绍所在的section样式 */
    .animals-info-container .detail-section:last-child {
        margin-bottom: 0;  /* 最后个section移除底部间距 */
        padding: 16px 0;   /* 移除左右内边距 */
        background: none;  /* 移除背景色 */
    }

    /* 详细介绍部分的分割线 */
    .animals-info-container .detail-section:last-child {
        position: relative;
        margin-top: 24px;  /* 增加上方间距 */
    }

    .animals-info-container .detail-section:last-child::before {
        content: '';
        position: absolute;
        top: -12px;  /* 分割线位置 */
        left: 0;
        right: 0;
        height: 1px;
        background: #EBEEF5;  /* 分割线颜色 */
    }

    /* 暗黑模式下的分割线颜色 */
    html.dark .animals-info-container .detail-section:last-child::before {
        background: #363637;
    }

    /* 移动端分割线样式调整 */
    .animals-info-container .detail-section:last-child::before {
        left: 12px;   /* 与内容区域对齐 */
        right: 12px;
    }
} 

/* 亮色主题变量 */
:root {
    --bg-color: #ffffff;
    --text-color: #303133;
    --text-color-secondary: #909399;
    --section-bg: #f5f7fa;
    --border-color: #EBEEF5;
}

/* 暗色主题变量 */
html.dark {
    --bg-color: #1a1a1a;
    --text-color: #e5eaf3;
    --text-color-secondary: #a3a6ad;
    --section-bg: #2b2b2b;
    --border-color: #363637;
}

/* 确保所有颜色使用变量 */
.animals-info-container {
    background: var(--bg-color);
    color: var(--text-color);
}

.animals-info-container .detail-section {
    background: var(--section-bg);
}

.animals-info-container .info-label {
    color: var(--text-color-secondary);
}

.animals-info-container .info-value {
    color: var(--text-color);
}

/* 弹窗内容基础样式 */
.animals-info-container .detail-section {
    margin-bottom: 16px;
    padding: 16px;  /* 添加统一的边距 */
    background: var(--section-bg);
    border-radius: 8px;
}

/* 详细介绍部分的基础样式 */
.animals-info-container .detail-section:last-child {
    position: relative;
    margin-top: 24px;
    padding: 24px 16px;  /* 增加上下内边距 */
}

/* 详细介绍的分割线 */
.animals-info-container .detail-section:last-child::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 16px;  /* 与内容区域对齐 */
    right: 16px;
    height: 1px;
    background: var(--border-color);
}

/* 移动端特殊处理 */
@media screen and (max-width: 768px) {
    .animals-info-container .detail-section {
        padding: 16px 12px;  /* 移动端稍微减少内边距 */
    }

    .animals-info-container .detail-section:last-child {
        padding: 16px 0;  /* 移动端移除左右内边距 */
    }

    .animals-info-container .detail-section:last-child::before {
        left: 12px;   /* 移动端分割线与内容对齐 */
        right: 12px;
    }
} 

/* 移除状态标签的伪元素 */
.animals-info-container .status-tag::before,
.animals-info-container .status-tag::after {
    display: none !important;
}