/**
 * 昵称 / 头像修改审核 —— 个人主页上的状态条
 *
 * 只在个人主页加载（inc/profile-review.php 里按 is_author() 入队）。
 * DOM 由 assets/profile-review.js 生成：
 *
 *   .b2c-review-box.wrapper            外层。带父主题的 .wrapper，宽度跟站点内容区对齐
 *     .b2c-review-inner                卡片
 *       .b2c-review-item               一行。再带一个状态类：
 *         .b2c-review-pending            审核中
 *         .b2c-review-rejected           未通过
 *         .b2c-review-approved           已通过
 *         .b2c-review-tag              状态标签
 *         img.b2c-review-thumb         头像缩略图（可选）
 *         .b2c-review-text             说明文字
 *         button.b2c-review-btn        撤回 / 知道了（可选）
 *
 *   .b2c-review-box.b2c-review-float   兜底形态：悬浮在页面底部
 *                                      （JS 自检发现插入位置的版面不对时切过去）
 *
 * 颜色用 inc/ui.php 注入的 token，带回落值 —— token 层没加载时也能看。
 */

.b2c-review-box {
    /*
     * 宽度不在这里写：外层带着父主题的 .wrapper（width:1200px; max-width:100%），
     * 站点在后台改了内容区宽度时，动态 CSS 改的也是 .wrapper，这里跟着走。
     */
    margin: 12px auto 0;
    box-sizing: border-box;
}

.b2c-review-inner {
    background: #fff;
    border-radius: var(--b2c-radius, 6px);
    border: 1px solid var(--b2c-border, rgba(0, 0, 0, .08));
    overflow: hidden;
}

.b2c-review-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--b2c-text, #1a1a1a);
}

.b2c-review-item + .b2c-review-item {
    border-top: 1px solid var(--b2c-border, rgba(0, 0, 0, .08));
}

.b2c-review-tag {
    flex: none;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

.b2c-review-pending .b2c-review-tag {
    background: #fff4e0;
    color: #b25e00;
}

.b2c-review-rejected .b2c-review-tag {
    background: #fde8e8;
    color: #c62828;
}

.b2c-review-approved .b2c-review-tag {
    background: #e4f6e9;
    color: #1b7a36;
}

.b2c-review-thumb {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #f2f3f5;
}

/*
 * 文字区。
 * ⚠️ min-width:0 不能省：flex 项默认 min-width:auto，不会收缩到内容宽度以下，
 *    一个很长的昵称或驳回原因会把右边的按钮挤出卡片（1.32.0 踩过同一个坑）。
 */
.b2c-review-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.b2c-review-btn {
    flex: none;
    padding: 4px 12px;
    border: 1px solid var(--b2c-border, rgba(0, 0, 0, .12));
    border-radius: 999px;
    background: transparent;
    color: var(--b2c-text-muted, #8a8a8a);
    font-size: 12px;
    line-height: 18px;
    cursor: pointer;
    white-space: nowrap;
}

.b2c-review-btn:hover {
    color: var(--b2c-primary, #0066ff);
    border-color: var(--b2c-primary, #0066ff);
}

.b2c-review-btn[disabled] {
    opacity: .5;
    cursor: default;
}

/* ── 兜底：底部悬浮 ─────────────────────────────────────────────── */

.b2c-review-float {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 24px;
    z-index: 90;
    width: auto;
    max-width: 560px;
    margin: 0 auto;
}

.b2c-review-float .b2c-review-inner {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .16);
}

/* ── 窄屏 ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {

    /* 父主题的 .wrapper 在窄屏是 100% 宽且没有内边距，左右留白自己给 */
    .b2c-review-box,
    .b2c-review-box.wrapper {
        margin: 10px 12px 0;
        width: auto;
    }

    /*
     * 不换行：标签 | 文字 | 按钮 始终在一行，文字自己在中间折行。
     * 试过让按钮掉到下一行，结果是按钮孤零零贴在左下角，比文字多折一行难看得多。
     */
    .b2c-review-item {
        padding: 10px 12px;
        gap: 8px;
        font-size: 13px;
    }

    /* 底部有移动端导航栏，悬浮形态要抬到它上面 */
    .b2c-review-float {
        bottom: 84px;
        margin: 0 auto;
    }
}
