/* ==========================================================================
   投诉与反馈模块样式（1:1 复用亲友地图 v2.9.0 complaint.css，20261016a 版）
   - 严格参照微信内置浏览器「…→投诉」官方页面（尺寸/配色取自真机截图）
   - 所有规则仅在 .cp- 命名空间内生效，不影响和解电话原有任何页面
   - 纯白背景、无装饰、无动画特效，适配微信内置浏览器与移动端安全区
   关键采样值（iPhone 393pt 截图）：
     标题 20px 粗体、列表左缩进 33px、单行高 55px、箭头 #b2b2b2
     主按钮 宽46% / 高46px / 圆角10px / 绿 #56C064、链接 #576B95
   ========================================================================== */

/* 右上角入口：扁长型胶囊按钮（四角半圆圆角），与亲友地图视觉完全一致 */
.cp-entry {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 14px;
    z-index: 30;
    padding: 6px 15px;
    font-size: 13px;
    line-height: 1.4;
    color: #07c160;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(7, 193, 96, 0.45);
    border-radius: 999px; /* 四角半圆 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.cp-entry:active { background: #f2fcf6; }

/* ------------------------------------------------------------ 投诉全屏浮层 */
/* 和解电话为多页面架构（非 SPA），投诉流程以全屏浮层覆盖在原页面之上，
   进入投诉时不销毁、不影响原页面状态，关闭即回到原页面原位置 */
.cp-layer {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.cp-layer[hidden] { display: none; }
/* 浮层打开时锁定背景滚动（iOS 上避免双滚动） */
body.cp-open { overflow: hidden; }

.cp-view {
    padding: 0 !important;
    background: #ffffff;
    min-height: 100vh;
    box-sizing: border-box;
}
.cp-view[hidden] { display: none; }

/* 顶部栏：仅含左上角 X（原因页）或 < 返回（引导页/表单页），无底线、无标题 */
.cp-topbar {
    height: 44px;
    display: flex;
    align-items: center;
    padding-top: env(safe-area-inset-top, 0px);
    box-sizing: content-box;
}
.cp-close,
.cp-back {
    width: 44px;
    height: 44px;
    margin-left: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.cp-close svg { width: 16px; height: 16px; }
.cp-back svg  { width: 11px; height: 21px; }

/* 页面大标题：居中粗体（微信原版无导航小标题，标题在页面内容区） */
.cp-page-title {
    margin: 0 24px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}
/* 标题下方蓝色帮助链接 */
.cp-page-sub {
    margin-top: 14px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #576b95;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.cp-page-sub:active { opacity: .6; }

/* ------------------------------------------------------------ 原因选择列表 */
.cp-list {
    margin-top: 30px;
    background: #ffffff;
    border-top: 1px solid #ededed; /* 列表顶部通栏发丝线 */
}
.cp-row {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 55px;
    padding: 14px 36px 14px 30px;
    box-sizing: border-box;
    background: #ffffff;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
/* 每行底部分割线：左侧与文字对齐缩进，右侧通栏（微信原版样式） */
.cp-row::after {
    content: '';
    position: absolute;
    left: 30px;
    right: 0;
    bottom: 0;
    transform: scaleY(0.5);
    transform-origin: 0 100%;
    background: rgba(0, 0, 0, 0.08);
}
.cp-row:active { background: #f4f4f4; }
.cp-row-main { flex: 1; min-width: 0; }
.cp-row-text {
    font-size: 17px;
    line-height: 1.45;
    color: #1a1a1a;
    word-break: break-all;
}
.cp-row-sub {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.4;
    color: #999999;
}
/* 右侧 > 箭头（细灰色 chevron，垂直居中） */
.cp-arrow {
    position: absolute;
    right: 17px;
    top: 50%;
    width: 9px;
    height: 9px;
    transform: translateY(-50%) rotate(45deg);
    border-right: 1.8px solid #b2b2b2;
    border-top: 1.8px solid #b2b2b2;
    box-sizing: border-box;
}

/* ------------------------------------------------------------ 底部「投诉须知」链接 */
.cp-footer-link {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 10;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #576b95;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.cp-footer-link:active { opacity: .6; }
.cp-footer-link[hidden] { display: none; }

/* ------------------------------------------------------------ 骚扰类引导页 */
.cp-guide-title { margin-top: 95px; }
.cp-guide-body {
    margin: 28px 40px 0;
    text-align: center;
    font-size: 17px;
    line-height: 1.7;
    color: #1a1a1a;
}

/* ------------------------------------------------------------ 流量劫持帮助子页面（长文+示例截图，整页滚动） */
.cp-hijack {
    padding: 8px 22px 40px;
}
.cp-hijack-title {
    margin: 0 0 26px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a1a;
}
.cp-hijack-p {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.75;
    color: #333333;
    word-break: break-word;
}
.cp-hijack-shots {
    margin: 0 0 26px;
}
.cp-hijack-shot {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    border: 0;
    background: #f5f5f5;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
}
.cp-hijack-shot:last-child { margin-bottom: 0; }
.cp-hijack-subtitle {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a1a;
}
.cp-hijack-tel {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

/* ------------------------------------------------------------ 绿色主按钮（提交证据材料/继续投诉） */
.cp-green-btn {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10;
    width: 46%;
    max-width: 240px;
    min-width: 168px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #56c064; /* 取自微信官方投诉页按钮采样 */
    color: #ffffff;
    font-size: 18px;
    line-height: 46px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.cp-green-btn:active:not(:disabled) { background: #4bb05c; }
.cp-green-btn:disabled {
    background: #d8d8d8; /* 未满足条件：置灰不可点击 */
    color: rgba(255, 255, 255, 0.9);
    cursor: not-allowed;
}
/* 表单页内容避让固定按钮与底部链接（按钮 bottom84 + 高46 + 2px 间隙 = 132） */
#cpViewForm { padding-bottom: 132px !important; }

/* ------------------------------------------------------------ 提交证据材料表单 */
/* 一屏排版：压缩顶部留白与文本域高度（配色/分割线/按钮/上传组件尺寸不变） */
.cp-form-title { margin-top: 26px; }
.cp-form-list { margin-top: 20px; }
/* 表单静态行：左标签 + 右值/输入框 */
.cp-form-list .cp-row { cursor: default; padding-right: 16px; }
.cp-form-list .cp-row:active { background: #ffffff; }
.cp-row-label {
    flex: none;
    width: 88px;
    margin-right: 14px;
    font-size: 16px;
    line-height: 1.38;
    color: #1a1a1a;
    word-break: break-all; /* 长标签按微信原版在「（选填）」处自然换行 */
}
.cp-row-value {
    flex: 1;
    min-width: 0;
    text-align: right;
    font-size: 16px;
    line-height: 1.4;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cp-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    font-size: 16px;
    color: #1a1a1a;
    text-align: right;
}
.cp-input::placeholder { color: #b2b2b2; }

/* 投诉说明行：标签顶部对齐，文本域占据右侧大块区域 */
.cp-row-textarea { align-items: flex-start !important; }
.cp-row-textarea .cp-row-label { padding-top: 13px; }
.cp-textarea {
    flex: 1;
    min-width: 0;
    min-height: 104px;
    margin: 0;
    padding: 13px 0;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    box-sizing: border-box;
}
.cp-textarea::placeholder { color: #b2b2b2; }

/* 图片证据行：标签独占一行，下方九宫格 */
.cp-row-upload {
    flex-wrap: wrap;
    cursor: default !important;
}
.cp-row-upload .cp-row-label {
    width: auto;
    flex: 1 1 100%;
    margin: 0;
    padding: 10px 0 2px;
}
.cp-uploader {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    padding: 4px 0 8px;
}
.cp-uploader__files {
    display: flex;
    flex-wrap: wrap;
}
.cp-upload-item {
    position: relative;
    width: 78px;
    height: 78px;
    margin: 0 9px 9px 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    cursor: zoom-in;
}
.cp-upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* WeUI 删除角标：右上角灰色半透明方块 */
.cp-upload-del {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom-left-radius: 4px;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
/* 加号上传框：浅灰底细边框 */
.cp-uploader__add {
    width: 78px;
    height: 78px;
    box-sizing: border-box;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d9d9d9;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cp-uploader__add:active { background: #efefef; }
.cp-uploader__add.is-hidden { display: none; }
.cp-uploader__add svg { width: 26px; height: 26px; }

/* ------------------------------------------------------------ 投诉成功弹窗 */
.cp-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 38px;
    box-sizing: border-box;
}
.cp-mask[hidden] { display: none; }
.cp-success-dialog {
    width: 100%;
    max-width: 280px;
    background: #ffffff;
    border-radius: 14px;
    padding: 30px 22px 20px;
    text-align: center;
    box-sizing: border-box;
}
.cp-success-ico {
    width: 56px;
    height: 56px;
    margin: 0 auto;
}
.cp-success-ico svg { width: 56px; height: 56px; display: block; }
.cp-success-title {
    margin-top: 16px;
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
}
.cp-success-text {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #5b5b5b;
}
.cp-success-btn {
    width: 100%;
    height: 44px;
    margin-top: 24px;
    border: 0;
    border-radius: 6px;
    background: #56c064;
    color: #ffffff;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}
.cp-success-btn:active { background: #4bb05c; }

/* ------------------------------------------------------------ 投诉须知弹窗（长文案，正文区内滚动） */
.cp-notice-dialog {
    width: 100%;
    max-width: 300px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px 18px;
    text-align: center;
    box-sizing: border-box;
}
.cp-notice-title {
    flex: none;
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
}
.cp-notice-text {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13.5px;
    line-height: 1.75;
    color: #4a4a4a;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}
.cp-notice-btn {
    flex: none;
    width: 100%;
    height: 44px;
    margin-top: 18px;
    border: 0;
    border-radius: 6px;
    background: #56c064;
    color: #ffffff;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}
.cp-notice-btn:active { background: #4bb05c; }

/* ------------------------------------------------------------ 图片全屏预览 */
.cp-preview-mask {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    -webkit-tap-highlight-color: transparent;
}
.cp-preview-mask[hidden] { display: none; }
.cp-preview-mask img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
}
