/*
 * analyzed-avatar.css - 已分析头像弹窗组件样式
 * 用于：首页 index.html、转运页 transport-result.html
 */

/* ============================================
   半弹窗遮罩层
   ============================================ */
.analyzed-avatar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ============================================
   底部滑出的面板
   ============================================ */
.analyzed-avatar-sheet {
    width: 85.51vw;
    max-width: 85.51vw;
    max-height: calc(100vh - 80px);
    background: #FFFFFF;
    border-radius: 40px;
    border: 3px solid transparent;
    background: linear-gradient(#FFF, #FFF) padding-box,
                linear-gradient(180deg, #54FF9A 0%, #222222 100%) border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 20px 0;
    box-sizing: border-box;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

/* ============================================
   弹窗头部
   ============================================ */
.analyzed-avatar-header {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 30px auto 0 auto;
}

.analyzed-avatar-title {
    font-weight: 600;
    font-size: 4.83vw;
    line-height: 5.8vw;
    color: #222222;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
}

.analyzed-avatar-title-line {
    width: 100%;
    height: 0.72vw;
    min-height: 3px;
    border-radius: 0.48vw;
    margin-top: 1.21vw;
    background-color: #54FF9A;
}

/* ============================================
   列表区域 - 横向翻页
   ============================================ */
.analyzed-avatar-list {
    width: 100%;
    flex: 1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scroll-behavior: smooth;
}

.analyzed-avatar-list::-webkit-scrollbar {
    display: none;
}

/* 每页容器 */
.analyzed-avatar-page {
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
    padding: 30px 20px 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ============================================
   翻页指示器
   ============================================ */
.analyzed-avatar-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    flex-shrink: 0;
    padding: 0 20px;
}

.analyzed-avatar-pagination .pagination-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #eeeeee;
    transition: background-color 0.3s;
}

.analyzed-avatar-pagination .pagination-dot.active {
    background: #2FDA76;
}

/* ============================================
   列表项 - 卡片样式
   ============================================ */
.analyzed-avatar-item {
    height: 116px;
    border-radius: 10px;
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(238, 238, 238, 0.5) 100%);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
}

.analyzed-avatar-item:last-child {
    margin-bottom: 0;
}

.analyzed-avatar-item:active {
    transform: scale(0.98);
}

/* 卡片上部分 - 标题行 */
.analyzed-avatar-header-row {
    height: 46px;
    background: rgba(238, 238, 238, 0.5);
    display: flex;
    align-items: center;
    padding-left: 15px;
    padding-right: 14px;
    box-sizing: border-box;
    position: relative;
}

.analyzed-avatar-header-row.selected {
    background: linear-gradient(180deg, rgba(238, 238, 238, 0.5) 0%, rgba(226, 226, 226, 0.5) 100%);
}

.analyzed-avatar-header-title {
    font-weight: 500;
    font-size: 16px;
    color: #222222;
    line-height: 16px;
    font-family: system-ui, -apple-system, sans-serif;
    flex: 1;
}

/* 选择框 - 未选中状态 */
.analyzed-avatar-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #CCCCCC;
    box-sizing: border-box;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 选择框 - 选中状态 */
.analyzed-avatar-checkbox.selected {
    background: #54FF9A;
    border: none;
}

.analyzed-avatar-checkbox img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

/* 卡片下部分 - 内容行（头像行） */
.analyzed-avatar-content-row {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    gap: 15px;
}

/* 改善状态区域 */
.analyzed-avatar-status {
    flex: 1;
    height: 40px;
    border-radius: 5px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 16px;
    font-family: system-ui, -apple-system, sans-serif;
}

/* 未解锁状态 */
.analyzed-avatar-status.locked {
    background: #FFFFFF;
    color: #888888;
}

.analyzed-avatar-status.locked .status-text {
    height: 16px;
    display: flex;
    align-items: center;
}

.analyzed-avatar-status.locked .lock-icon {
    width: 16px;
    height: 16px;
    margin-left: 10px;
    object-fit: contain;
}

/* 已解锁状态 */
.analyzed-avatar-status.unlocked {
    background: #54FF9A;
    color: #000000;
    font-weight: 500;
}

/* 头像缩略图 */
.analyzed-avatar-thumb {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================================
   底部关闭按钮
   ============================================ */
.analyzed-avatar-close-btn {
    width: calc(100% - 40px);
    height: 50px;
    background: #000000;
    color: #54FF9A;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 3.86vw;
    cursor: pointer;
    font-family: system-ui, -apple-system, sans-serif;
    flex-shrink: 0;
    margin: 20px auto 0 auto;
}

.analyzed-avatar-close-btn:active {
    opacity: 0.8;
}

/* 按钮置灰状态 - 未选中时 */
.analyzed-avatar-close-btn.disabled {
    background: #EEEEEE;
    font-weight: 400;
    color: #888888;
    cursor: not-allowed;
}

/* ============================================
   空状态
   ============================================ */
.analyzed-avatar-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888888;
    font-size: 3.86vw;
    font-family: system-ui, -apple-system, sans-serif;
}

/* ============================================
   响应式适配
   ============================================ */
@media screen and (min-width: 768px) {
    .analyzed-avatar-close-btn {
        font-size: 16px;
    }
}

@media screen and (max-height: 600px) {
    .analyzed-avatar-sheet {
        height: 90vh;
        max-height: 90vh;
    }
}
