/**
 * tips.css - 统一弹窗样式
 * 合并以下弹窗样式：
 * - 准备上传微信头像原图（绿色边框）
 * - 当前头像不一致原因（绿色边框）
 * - 为何必须传正方形原图（绿色边框）
 * - 为何必须手动传原图（红色边框）
 * - 头像转运原理（金色边框）
 * - 客服二维码弹窗
 */

/* ============================================================
   基础遮罩层 - 所有弹窗共用
   ============================================================ */
.tips-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: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 6vh 5vw;
    box-sizing: border-box;
}

/* 显示/隐藏控制 - .hidden 已在 global.css 定义 */

.tips-overlay.show-flex {
    display: flex !important;
}

/* 头像不一致弹窗 - 底部对齐，距离底部60px */
#avatar-inconsistent-modal {
    align-items: flex-end;
    padding-bottom: 60px;
    padding-top: 0;
}

/* ============================================================
   弹窗容器 - 基础样式
   ============================================================ */
.tips-modal {
    width: 85.51vw;
    max-width: 85.51vw;
    max-height: calc(100vh - 12vh);
    background: #FFFFFF;
    border-radius: 40px;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4.83vw 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* 绿色边框变体 - 用于：上传提示、头像不一致、正方形原图 */
.tips-modal--green {
    border: 3px solid transparent;
    background: linear-gradient(#FFF, #FFF) padding-box,
                linear-gradient(180deg, #54FF9A 0%, #222222 100%) border-box;
    box-shadow: 0 0 10px 0 rgba(150, 255, 201, 0.50);
}

/* 红色边框变体 - 用于：手动传原图 */
.tips-modal--red {
    border-color: #901113;
    box-shadow: 0 0 10px 0 rgba(144, 17, 19, 0.30);
}

/* 金色边框变体 - 用于：转运原理 */
.tips-modal--golden {
    border-color: #FFFFFF;
    border-radius: 9.66vw;
    background: linear-gradient(180deg, #F9F5EB 0%, #FFF 30.39%);
    box-shadow: 0 0 20px 0 #FFF inset, 0 0 30px 0 rgba(184, 129, 0, 0.50);
    padding: 4.83vw;
}

/* ============================================================
   弹窗标题
   ============================================================ */
.tips-title {
    font-weight: 600;
    font-size: 4.83vw;
    line-height: 5.8vw;
    color: #222222;
    margin-top: 20px;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
}

/* 标题下划线 - 基础 */
.tips-title-line {
    width: 100%;
    height: 0.72vw;
    min-height: 3px;
    border-radius: 0.48vw;
    margin-top: 1.21vw;
}

/* 绿色下划线 */
.tips-title-line--green {
    background-color: #54FF9A;
}

/* 红色下划线 */
.tips-title-line--red {
    background-color: #901113;
}

/* 金色下划线 */
.tips-title-line--golden {
    background-color: #D9B77B;
}

/* ============================================================
   头像区域
   ============================================================ */
/* 单头像布局 - 用于头像不一致弹窗 */
.tips-avatar {
    width: 19.32vw;
    height: 19.32vw;
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    margin-top: 4.83vw;
    background-color: #eee;
}

/* 头像昵称 */
.tips-avatar-name {
    font-weight: 500;
    font-size: 3.86vw;
    color: #000000;
    margin-top: 3.62vw;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
}

/* 头像占位区 - 用于头像不一致弹窗 */
.tips-avatar-placeholder {
    width: 19.32vw;
    height: 19.32vw;
    max-width: 80px;
    max-height: 80px;
    margin-top: 4.83vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    border-radius: 5px;
}

.tips-avatar-placeholder .tips-avatar {
    margin-top: 0;
}

/* 双图布局 - 用于上传提示弹窗 */
.tips-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4.83vw;
    margin-top: 4.83vw;
    width: 100%;
}

.tips-images__img {
    width: auto;
    height: 19.32vw;
    max-height: 80px;
    object-fit: contain;
}

/* 图片说明文字 */
.tips-images_caption {
    font-weight: 500;
    font-size: 3.86vw;
    color: #000000;
    margin-top: 2.42vw;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
}

/* 紫色高亮 - 用于标题中的强调文字 */
.tips-images_caption--highlight {
    color: #5B1A89;
}

/* ============================================================
   内容区域
   ============================================================ */
.tips-content {
    width: 100%;
    margin: 4.83vw 0 0 0; /* 上 20px，下 0 */
    border-radius: 1.21vw;
    padding: 4.83vw;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 灰色内容区 - 用于绿色/红色边框弹窗 */
.tips-content--gray {
    background-color: #f8f8f8;
}

/* 小字体内容区 - 用于头像不一致弹窗（14px） */
.tips-content--small-text .tips-text {
    font-size: 3.38vw;
    line-height: 5.31vw;
}

/* 米色内容区 - 用于转运原理弹窗 */
.tips-content--beige {
    background-color: #F9F5EB;
    border-radius: 2.42vw;
    margin: 4.83vw 0;
}

/* 文本内容 */
.tips-text {
    font-size: 3.86vw;
    line-height: 6.04vw;
    color: #222222;
    overflow-y: auto;
    max-height: 100%;
    padding-right: 1.21vw;
    font-family: system-ui, -apple-system, sans-serif;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 段落间距 */
.tips-text p {
    margin: 0 0 3.86vw 0;
}

.tips-text p:not(:first-child) {
    margin-top: 3.38vw;
}

.tips-text p:last-child {
    margin-bottom: 0;
}

.tips-text strong {
    font-weight: 500;
}

/* 紫色高亮文本 - 用于重要警示 */
.tips-text--highlight {
    color: #5B1A89;
}

/* 链接样式 */
.tips-text a,
.tips-text .modal-link {
    color: #004FA3;
    font-weight: bold;
    text-decoration: none;
}

/* 滚动条样式 */
.tips-text::-webkit-scrollbar {
    width: 5px;
}

.tips-text::-webkit-scrollbar-track {
    background: transparent;
}

.tips-text::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
}

/* 内容区滚动渐变提示 */
.tips-content.has-scroll::after {
    content: '';
    position: absolute;
    bottom: 4.83vw;
    left: 4.83vw;
    right: 4.83vw;
    height: 7.25vw;
    background: linear-gradient(180deg, rgba(248, 248, 248, 0.00) 85.62%, #F8F8F8 100%);
    pointer-events: none;
}

/* 米色内容区的渐变 */
.tips-content--beige.has-scroll::after {
    background: linear-gradient(180deg, rgba(249, 245, 235, 0.00) 0%, #F9F5EB 100%);
}

/* ============================================================
   微信引导图 - 用于上传提示弹窗
   ============================================================ */
.tips-wechat-guide {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 2.23vh 0 0 0; /* 上 20px，下 0 */
}

/* 底部提示文案 */
.tips-foot-text {
    text-align: center;
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.5;
    color: #8B7355;
    margin-top: 2.23vh; /* 20px / 896px */
    margin-bottom: 2.23vh; /* 20px / 896px */
}

.tips-foot-text p {
    margin: 0;
}

.tips-foot-text p:last-child {
    font-weight: 600;
    color: #5A3701;
    white-space: nowrap;
}

/* ============================================================
   底部按钮 - 宽度与弹窗内容区一致
   ============================================================ */
.tips-btn {
    width: 100%; /* 填满弹窗内容区 */
    height: 12.08vw;
    max-height: 50px;
    border-radius: 24.15vw;
    border: none;
    font-weight: 600;
    font-size: 3.86vw;
    text-align: center;
    cursor: pointer;
    font-family: system-ui, -apple-system, sans-serif;
    flex-shrink: 0;
    margin-top: auto;
}

.tips-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* 绿色按钮 - 黑底绿字 */
.tips-btn--green {
    background-color: #000000;
    color: #54FF9A;
}

/* 刷新按钮 - 用于头像不一致弹窗 */
.tips-btn--refresh {
    margin-top: 4.83vw; /* 20px / 414px */
}

/* 红色按钮 - 红底白字 */
.tips-btn--red {
    background-color: #901113;
    color: #ffffff;
}

/* 金色按钮 - 黄底黑字 */
.tips-btn--golden {
    background: #FFFD7B;
    color: #222222;
}

/* ============================================================
   客服二维码弹窗 - 新设计稿
   ============================================================ */
.tips-service {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    gap: 20px;
}

/* 底部容器 - 白色卡片 */
.tips-service-card {
    width: 213px;
    background: #FFFFFF;
    box-shadow: 0px 0px 10px rgba(184, 129, 0, 0.5);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

/* 企业微信二维码 */
.tips-service-qr {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 10px;
}

/* 文字说明 */
.tips-service-text {
    margin: 15px 0 0;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
    color: #888888;
}

/* F&Q按钮 */
.tips-service-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    gap: 10px;
    min-width: 213px;
    height: 46px;
    background: #FFFFFF;
    border-radius: 30px;
    border: none;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 16px;
    color: #222222;
    cursor: pointer;
    white-space: nowrap;
}

.tips-service-btn.hidden {
    display: none !important;
}

.tips-service-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* ============================================================
   转运原理弹窗新设计稿样式
   ============================================================ */

/* 弹窗容器 - 固定尺寸居中 */
.principle-modal {
    position: absolute;
    width: 85.51vw;
    max-width: 354px;
    height: auto;
    max-height: 668px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #FFFFFF;
    border: 2px solid #FBFF8E;
    box-shadow: 0px 0px 30px rgba(184, 129, 0, 0.5), inset 0px 0px 20px #FFFFFF;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 弹窗标题 */
.principle-title {
    font-family: 'PingFang SC', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 20px;
    text-align: center;
    color: #222222;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

/* 弹窗标题底部装饰条 */
.principle-title-line {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #FCFF36;
    border-radius: 2px;
}

/* 原理文案内容区 */
.principle-content {
    width: 100%;
    flex: 1;
    margin: 20px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 滚动容器 */
.principle-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 10px;
}

/* 原理文案文字 */
.principle-text {
    font-family: 'PingFang SC', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #222222;
}

/* 段落间距 */
.principle-text p {
    margin: 0 0 16px 0;
}

.principle-text p:last-child {
    margin-bottom: 0;
}

.principle-text strong {
    font-weight: 600;
}

/* 底部按钮 */
.principle-btn {
    width: 100%;
    height: 50px;
    background: #FAFF70;
    border-radius: 28px;
    border: none;
    font-family: 'PingFang SC', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
    color: #000000;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: auto;
}

.principle-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* 滚动条样式 */
.principle-scroll::-webkit-scrollbar {
    width: 4px;
}

.principle-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.principle-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

/* ============================================================
   转运原理弹窗旧样式（兼容保留）
   ============================================================ */
/* 转运原理的内容区特殊处理 */
.tips-modal--golden .tips-content--beige {
    flex: 1;
    margin: 4.83vw 0;
}

/* 转运原理的滚动区内层 */
.tips-scroll-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* ============================================================
   响应式适配
   ============================================================ */
@media screen and (max-height: 600px) {
    .tips-modal {
        height: 90vh;
        max-height: 90vh;
    }
}

/* ============================================================
   兼容旧类名（过渡期使用）
   用于平滑迁移，后续可删除
   ============================================================ */
.avatar-inconsistent-modal-overlay,
.transport-principle-modal-overlay {
    composes: tips-overlay;
}

.avatar-inconsistent-modal,
.transport-principle-modal {
    composes: tips-modal;
}
