/* =========================================================
   My B2B CRM — 前台表单样式
   ========================================================= */

/* 容器 */
.my-b2b-crm-form-wrap {
    max-width: 720px;
    margin: 0 auto;
}

/* 字段网格：两列布局 */
.my-b2b-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

/* Full width字段（textarea、select、checkbox、radio、country） */
.my-b2b-field-full {
    grid-column: 1 / -1;
}

/* 字段容器 */
.my-b2b-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 标签 */
.my-b2b-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.my-b2b-required {
    color: #d63638;
    margin-left: 2px;
}

.my-b2b-field-help {
    margin: 4px 0 0;
    font-size: 12px;
    color: #72777c;
    line-height: 1.5;
}

/* 输入框 / 下拉框 */
.my-b2b-input,
.my-b2b-select,
.my-b2b-textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.5;
    outline: none;
}

.my-b2b-input:focus,
.my-b2b-select:focus,
.my-b2b-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .12);
}

.my-b2b-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Checkbox组 / Radio Buttons组 */
.my-b2b-checkbox-group,
.my-b2b-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-b2b-group-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: block;
}

.my-b2b-checkbox-label,
.my-b2b-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
}

.my-b2b-checkbox-label input,
.my-b2b-radio-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0073aa;
    flex-shrink: 0;
}

/* Select 自定义箭头 */
.my-b2b-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2370777f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* 提交区域 */
.my-b2b-submit-wrap {
    margin-top: 20px;
}

.my-b2b-submit-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: background .15s, opacity .15s;
    position: relative;
}

.my-b2b-submit-btn:hover {
    background: #005a87;
}

.my-b2b-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Button Size变体 */
.my-b2b-btn--small  { padding: 8px 20px;  font-size: 13px; }
.my-b2b-btn--medium { padding: 12px 32px; font-size: 15px; }
.my-b2b-btn--large  { padding: 16px 44px; font-size: 17px; }

/* 提交中 Spinner 动画 */
@keyframes my-b2b-spin {
    to { transform: rotate(360deg); }
}
.my-b2b-submit-btn .my-b2b-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: my-b2b-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* 消息提示 */
.my-b2b-form-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.my-b2b-form-message.success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.my-b2b-form-message.error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* 错误文本（shortcode 报错） */
.my-b2b-crm-error {
    color: #d63638;
    font-size: 14px;
    padding: 10px 14px;
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* 响应式 */
@media ( max-width: 600px ) {
    .my-b2b-fields-grid {
        grid-template-columns: 1fr;
    }
    .my-b2b-field-full {
        grid-column: 1;
    }
    .my-b2b-submit-btn {
        width: 100%;
        text-align: center;
    }
}

/* =========================================================
   极简「直达聊天卡片」support widget
   ========================================================= */

/* ── 外层容器（bottom/left/right 由 JS inline style 动态设置） ── */

#my-b2b-chat-widget {
    position: fixed;
    bottom: 20px;  /* JS inline style 会覆盖此默认值 */
    right: 20px;   /* JS inline style 会覆盖此默认值 */
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    -webkit-user-select: none;
    user-select: none;
}

#my-b2b-chat-widget.wgt-pos-left {
    right: auto;
    left: 20px;   /* JS inline style 会覆盖此默认值 */
    align-items: flex-start;
}

/* ── 聊天卡片 ─────────────────────────────────────────────── */

.wgt-card {
    width: 290px;
    background: #fff;
    border-radius: 18px;
    box-shadow:
        0 10px 40px rgba( 0, 0, 0, .16 ),
        0 2px  10px rgba( 0, 0, 0, .08 );
    overflow: hidden;
    transform-origin: bottom right;
    animation: wgt-card-in .38s cubic-bezier( .34, 1.56, .64, 1 ) forwards;
    transition: opacity .22s ease, transform .22s ease;
}

#my-b2b-chat-widget.wgt-pos-left .wgt-card {
    transform-origin: bottom left;
}

@keyframes wgt-card-in {
    from {
        opacity: 0;
        transform: scale( .82 ) translateY( 20px );
    }
    to {
        opacity: 1;
        transform: scale( 1 ) translateY( 0 );
    }
}

/* 收起Status（点击 X 后） */
.wgt-card--hidden {
    opacity: 0 !important;
    transform: scale( .88 ) translateY( 10px ) !important;
    pointer-events: none !important;
}

/* ── 卡片头部（Theme Color背景） ─────────────────────────────────── */

.wgt-card-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 14px 15px;
    position: relative;
}

.wgt-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba( 255, 255, 255, .2 );
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wgt-card-title {
    flex: 1;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.wgt-card-close {
    background: rgba( 255, 255, 255, .18 );
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s;
    outline: none;
}

.wgt-card-close:hover {
    background: rgba( 255, 255, 255, .34 );
}

/* ── 卡片正文 ─────────────────────────────────────────────── */

.wgt-card-body {
    padding: 0;
    background: #fff;
    overflow: hidden;
}

.wgt-card-text {
    margin: 0 0 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.65;
    word-break: break-word;
}

/* ── 多渠道图标行 ──────────────────────────────────────────── */

.wgt-channel-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 8px;
}

.wgt-channel-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 4px 4px;
    border-radius: 12px;
    transition: background .15s, transform .18s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    min-width: 52px;
}

.wgt-channel-icon-btn:hover {
    background: rgba( 0, 0, 0, .04 );
    transform: translateY( -3px );
}

.wgt-channel-icon-btn:active {
    transform: scale( .91 );
}

.wgt-ch-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        0 2px 8px rgba( 0, 0, 0, .20 ),
        0 1px 3px rgba( 0, 0, 0, .10 );
    transition: box-shadow .18s, transform .18s;
}

.wgt-channel-icon-btn:hover .wgt-ch-icon-circle {
    box-shadow:
        0 5px 16px rgba( 0, 0, 0, .28 ),
        0 2px  6px rgba( 0, 0, 0, .14 );
    transform: scale( 1.06 );
}

.wgt-ch-icon-label {
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.2;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: -.01em;
}

/* CTA 按钮（保留以备兼容，新版已Remove） */
.wgt-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 11px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    box-sizing: border-box;
    transition: opacity .15s, transform .15s;
    outline: none;
}

.wgt-card-cta:hover {
    opacity: .88;
    transform: translateY( -2px );
}

.wgt-card-cta:active {
    transform: translateY( 0 );
    opacity: .95;
}

.wgt-cta-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: .92;
}

.wgt-cta-label {
    flex: 1;
    text-align: left;
}

.wgt-cta-arrow {
    flex-shrink: 0;
    opacity: .8;
}

/* ── 圆形主控按钮 ─────────────────────────────────────────── */

.wgt-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 20px rgba( 0, 0, 0, .28 ),
        0 1px  6px rgba( 0, 0, 0, .12 );
    flex-shrink: 0;
    outline: none;
    position: relative;
    transition: transform .2s, box-shadow .2s;
}

.wgt-toggle:hover {
    transform: scale( 1.09 );
    box-shadow:
        0 7px 26px rgba( 0, 0, 0, .34 ),
        0 2px  8px rgba( 0, 0, 0, .14 );
}

.wgt-toggle:active {
    transform: scale( .94 );
}

/* ── 红点角标 ─────────────────────────────────────────────── */

.wgt-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 11px;
    height: 11px;
    background: #f44336;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: wgt-badge-pulse 2.2s ease-in-out infinite;
}

@keyframes wgt-badge-pulse {
    0%, 100% {
        transform: scale( 1 );
        box-shadow: 0 0 0 0 rgba( 244, 67, 54, .55 );
    }
    50% {
        transform: scale( 1.12 );
        box-shadow: 0 0 0 5px rgba( 244, 67, 54, 0 );
    }
}

/* ── 移动端适配 ────────────────────────────────────────────── */

@media ( max-width: 480px ) {
    /* bottom/right/left 由 JS inline style 动态控制，此处仅设最大卡片宽 */
    .wgt-card {
        width: calc( 100vw - 28px );
        max-width: 310px;
    }

    .wgt-toggle {
        width: 52px;
        height: 52px;
    }

    .wgt-channel-icons {
        gap: 8px 6px;
    }

    .wgt-ch-icon-circle {
        width: 40px;
        height: 40px;
    }

    .wgt-ch-icon-label {
        font-size: 9.5px;
        max-width: 44px;
    }
}

/* =========================================================
   support widget — inquiry构建器弹窗（Contact Us）
   z-index 高于 #my-b2b-chat-widget (999999)
   ========================================================= */

.my-b2b-crm-inquiry-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.my-b2b-crm-inquiry-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba( 0, 0, 0, .55 );
    cursor: pointer;
}

.my-b2b-crm-inquiry-modal__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: min( 90vh, 720px );
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba( 0, 0, 0, .28 );
    animation: mbi-modal-in .28s cubic-bezier( .34, 1.2, .64, 1 ) forwards;
}

@keyframes mbi-modal-in {
    from {
        opacity: 0;
        transform: translateY( 16px ) scale( .96 );
    }
    to {
        opacity: 1;
        transform: translateY( 0 ) scale( 1 );
    }
}

.my-b2b-crm-inquiry-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s, color .15s;
    z-index: 2;
}

.my-b2b-crm-inquiry-modal__close:hover {
    background: rgba( 0, 0, 0, .06 );
    color: #333;
}

.my-b2b-crm-inquiry-modal__title {
    margin: 0;
    padding: 22px 48px 12px 22px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    flex-shrink: 0;
}

.my-b2b-crm-inquiry-modal__body {
    padding: 0 22px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media ( max-width: 480px ) {
    .my-b2b-crm-inquiry-modal__dialog {
        max-height: 85vh;
    }
}

/* =========================================================
   support widget — 双视图 + AI 对话界面
   ========================================================= */

/* ── 主视图（原卡片正文区域） ──────────────────────────────── */

.wgt-view-main {
    padding: 16px 16px 20px;
}

/* ── 视图切换工具类 ───────────────────────────────────────── */

.wgt-view--hidden {
    display: none !important;
}

/* ── AI 入口超级按钮 ──────────────────────────────────────── */

.wgt-ai-entry-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding: 13px 16px;
    border: none;
    border-radius: 13px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow:
        0 4px 16px rgba( 0, 0, 0, .22 ),
        0 1px  5px rgba( 0, 0, 0, .10 );
    transition: opacity .18s, transform .18s, box-shadow .18s;
    letter-spacing: .01em;
}

.wgt-ai-entry-btn:hover {
    opacity: .9;
    transform: translateY( -2px );
    box-shadow:
        0 8px 24px rgba( 0, 0, 0, .28 ),
        0 2px  8px rgba( 0, 0, 0, .12 );
}

.wgt-ai-entry-btn:active {
    transform: translateY( 0 );
    opacity: .95;
}

/* ── AI 对话视图容器 ──────────────────────────────────────── */

.wgt-view-ai-chat {
    display: flex;
    flex-direction: column;
    height: 348px;
}

/* ── 顶部Back栏 ─────────────────────────────────────────── */

.wgt-ai-back-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f5;
    flex-shrink: 0;
}

.wgt-ai-back-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 7px;
    transition: background .15s, color .15s;
    outline: none;
    flex-shrink: 0;
}

.wgt-ai-back-btn:hover {
    background: rgba( 0, 0, 0, .06 );
    color: #1d2327;
}

.wgt-ai-back-title {
    font-size: 14px;
    font-weight: 700;
    color: #1d2327;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 消息展示区 ─────────────────────────────────────────── */

.wgt-ai-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.wgt-ai-messages::-webkit-scrollbar {
    width: 4px;
}

.wgt-ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.wgt-ai-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

/* ── 聊天气泡 ─────────────────────────────────────────────── */

.wgt-bubble {
    max-width: 84%;
    padding: 9px 13px;
    font-size: 13px;
    line-height: 1.58;
    word-break: break-word;
    animation: wgt-bubble-in .22s ease-out both;
}

@keyframes wgt-bubble-in {
    from { opacity: 0; transform: translateY( 6px ); }
    to   { opacity: 1; transform: translateY( 0 ); }
}

/* AI 气泡：靠左，浅灰背景 */
.wgt-bubble--ai {
    align-self: flex-start;
    background: #f1f1f6;
    color: #1d2327;
    border-radius: 16px 16px 16px 4px;
    white-space: pre-wrap;  /* 保留 \n 换行，同时自动折行 */
}

/* 用户气泡：靠右，品牌主色背景，白字 */
.wgt-bubble--user {
    align-self: flex-end;
    color: #fff;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 2px 8px rgba( 0, 0, 0, .14 );
}

/* 打字中动画气泡 */
.wgt-bubble--typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    min-width: 54px;
}

.wgt-bubble--typing span {
    display: block;
    width: 7px;
    height: 7px;
    background: #aaa;
    border-radius: 50%;
    animation: wgt-typing-dot 1.25s ease-in-out infinite;
    flex-shrink: 0;
}

.wgt-bubble--typing span:nth-child( 2 ) { animation-delay: .18s; }
.wgt-bubble--typing span:nth-child( 3 ) { animation-delay: .36s; }

@keyframes wgt-typing-dot {
    0%, 100% { transform: translateY( 0 );    opacity: .45; }
    50%       { transform: translateY( -5px ); opacity: 1;   }
}

/* ── 底部输入区 ─────────────────────────────────────────── */

.wgt-ai-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-top: 1px solid #f0f0f5;
    background: #fafafa;
    flex-shrink: 0;
    border-radius: 0 0 18px 18px;
}

.wgt-ai-input {
    flex: 1;
    border: 1px solid #e4e4ec;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.45;
    min-width: 0;
}

.wgt-ai-input:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba( 99, 102, 241, .12 );
}

.wgt-ai-input:disabled {
    background: #f5f5f8;
    color: #bbb;
    cursor: not-allowed;
}

.wgt-ai-input::placeholder {
    color: #bbb;
}

/* 历史回填气泡：跳过入场动画，静默展示 */
.wgt-bubble--restored {
    animation: none;
}

.wgt-ai-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 2px 8px rgba( 0, 0, 0, .18 );
}

.wgt-ai-send-btn:hover {
    opacity: .88;
    transform: scale( 1.08 );
}

.wgt-ai-send-btn:active {
    transform: scale( .92 );
    opacity: .95;
}

/* ── 移动端微调 ─────────────────────────────────────────── */

@media ( max-width: 480px ) {
    .wgt-view-ai-chat {
        height: 320px;
    }

    .wgt-ai-entry-btn {
        font-size: 13px;
        padding: 11px 14px;
    }
}

/* =========================================================
   my_b2b_product_reviews Shortcode — 评价展示区
   ========================================================= */

.my-b2b-reviews-wrap {
    --rv-color: #6366f1;
    max-width: 900px;
    margin: 32px auto;
    font-family: inherit;
}

/* ── 总体评分汇总 ──────────────────────────────────────── */
.my-b2b-reviews-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 28px;
}

.my-b2b-reviews-summary__score {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: #111827;
    letter-spacing: -.02em;
}

.my-b2b-reviews-summary__stars {
    display: flex;
    gap: 3px;
}

.my-b2b-reviews-summary__count {
    font-size: 14px;
    color: #6b7280;
    margin-left: 4px;
}

/* ── 评价列表容器 ─────────────────────────────────────── */
.my-b2b-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── 单条评价卡片 ─────────────────────────────────────── */
.my-b2b-review-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    transition: box-shadow .18s;
}

.my-b2b-review-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
}

.my-b2b-review-card__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.my-b2b-review-card__avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.my-b2b-review-card__meta {
    flex: 1;
    min-width: 0;
}

.my-b2b-review-card__author {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.my-b2b-review-card__stars {
    display: flex;
    gap: 2px;
    margin-top: 3px;
}

.my-b2b-review-card__date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.my-b2b-review-card__body {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    margin-bottom: 12px;
}

/* ── Dimension Ratings条 ────────────────────────────────────── */
.my-b2b-review-card__dims {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.my-b2b-rv-dim {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.my-b2b-rv-dim__label {
    width: 72px;
    flex-shrink: 0;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-b2b-rv-dim__bar {
    flex: 1;
    height: 5px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.my-b2b-rv-dim__fill {
    height: 100%;
    border-radius: 999px;
    background: var(--rv-color);
}

.my-b2b-rv-dim__score {
    color: #6b7280;
    font-size: 11px;
    white-space: nowrap;
}

/* ── 评价图片区 ──────────────────────────────────────── */
.my-b2b-review-card__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.my-b2b-review-photo-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.my-b2b-review-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}

.my-b2b-review-photo:hover {
    opacity: .85;
}

/* ── 来源徽章 ────────────────────────────────────────── */
.my-b2b-rvbadge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.5;
}

.my-b2b-rvbadge--ai     { background: #ede9fe; color: #6d28d9; }
.my-b2b-rvbadge--real   { background: #d1fae5; color: #065f46; }
.my-b2b-rvbadge--import { background: #fef3c7; color: #92400e; }

/* ── 排版 1：极简商务（默认列表）─────────────────────── */
.my-b2b-reviews-layout-minimal .my-b2b-reviews-list {
    gap: 16px;
}

/* ── 排版 2：全能电商（现代卡片，上下结构）──────────── */
.my-b2b-reviews-layout-ecommerce .my-b2b-review-card {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.my-b2b-reviews-layout-ecommerce .my-b2b-review-card__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 12px;
}

.my-b2b-reviews-layout-ecommerce .my-b2b-review-card__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.my-b2b-reviews-layout-ecommerce .my-b2b-review-card__avatar img {
    width: 56px;
    height: 56px;
}

.my-b2b-reviews-layout-ecommerce .my-b2b-review-card__date {
    margin-top: 4px;
    text-align: center;
}

/* ── 排版 3：卡片瀑布流（紧凑，图片优先）────────────── */
.my-b2b-reviews-layout-masonry .my-b2b-reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    align-items: start;
}

.my-b2b-reviews-layout-masonry .my-b2b-review-card__photos {
    order: -1;
    margin-bottom: 10px;
}

.my-b2b-reviews-layout-masonry .my-b2b-review-photo {
    width: 100%;
    height: 120px;
}

.my-b2b-reviews-layout-masonry .my-b2b-review-photo-link {
    flex: 1;
    min-width: 80px;
}

.my-b2b-reviews-layout-masonry .my-b2b-review-card__body {
    font-size: 13px;
}

/* ── 响应式 ──────────────────────────────────────────── */
@media ( max-width: 600px ) {
    .my-b2b-reviews-summary {
        flex-wrap: wrap;
        gap: 8px;
    }

    .my-b2b-reviews-summary__score {
        font-size: 36px;
    }

    .my-b2b-reviews-layout-masonry .my-b2b-reviews-list {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════
   高级瀑布流排版 (rv-layout-pro) — 纯原生瀑布流评价组件
   ══════════════════════════════════════════════════════ */
.my-b2b-reviews-wrap {
    --rv-color: #2563eb;
    --rv-bg-card: #ffffff;
    --rv-radius: 8px;
    --rv-shadow: 0 2px 8px rgba(0,0,0,.08);
    --rv-shadow-hover: 0 6px 20px rgba(0,0,0,.12);
    --rv-text: #1a1a1a;
    --rv-text-muted: #666;
    --rv-star-off: #ddd;
    --rv-gap: 16px;
    box-sizing: border-box;
    width: 100%;
}
.my-b2b-reviews-wrap *, .my-b2b-reviews-wrap *::before, .my-b2b-reviews-wrap *::after { box-sizing: inherit; }
.my-b2b-reviews-wrap .rv-empty { text-align: center; color: var(--rv-text-muted); padding: 48px 0; font-size: 14px; }
.my-b2b-reviews-wrap .rv-grid { column-gap: var(--rv-gap); margin-bottom: 24px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.my-b2b-reviews-wrap .rv-grid-2-col { column-count: 2; }
.my-b2b-reviews-wrap .rv-grid-3-col { column-count: 3; }
.my-b2b-reviews-wrap .rv-grid-4-col { column-count: 4; }
.my-b2b-reviews-wrap .rv-grid-5-col { column-count: 5; }
.my-b2b-reviews-wrap .rv-card { break-inside: avoid; background-color: var(--rv-bg-card); border-radius: var(--rv-radius); box-shadow: var(--rv-shadow); margin-bottom: var(--rv-gap); overflow: hidden; color: var(--rv-text); font-size: 14px; line-height: 1.6; transition: box-shadow .25s ease, transform .25s ease; cursor: default; }
.my-b2b-reviews-wrap .rv-card:hover { box-shadow: var(--rv-shadow-hover); transform: translateY(-2px); }
.my-b2b-reviews-wrap .rv-img-zone { position: relative; width: 100%; overflow: hidden; background: #e8e8e8; }
.my-b2b-reviews-wrap .rv-img-main { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 0; transition: transform .4s ease; }
.my-b2b-reviews-wrap .rv-card:hover .rv-img-main { transform: scale(1.04); }
.my-b2b-reviews-wrap .rv-img-strip { display: flex; gap: 4px; padding: 5px 6px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; background: rgba(0,0,0,.30); scrollbar-width: none; -ms-overflow-style: none; }
.my-b2b-reviews-wrap .rv-img-strip::-webkit-scrollbar { display: none; }
.my-b2b-reviews-wrap .rv-img-thumb { flex: 0 0 36px; width: 36px; height: 36px; scroll-snap-align: start; border: 2px solid transparent; border-radius: 4px; padding: 0; cursor: pointer; overflow: hidden; background: none; transition: border-color .2s ease; display: block; }
.my-b2b-reviews-wrap .rv-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.my-b2b-reviews-wrap .rv-img-thumb--active, .my-b2b-reviews-wrap .rv-img-thumb:hover { border-color: var(--rv-color); }
.my-b2b-reviews-wrap .rv-img-badge { position: absolute; bottom: 50px; right: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; pointer-events: none; line-height: 20px; }
.my-b2b-reviews-wrap .rv-body { padding: 12px 14px 14px; }
.my-b2b-reviews-wrap .rv-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.my-b2b-reviews-wrap .rv-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--rv-color); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; user-select: none; }
.my-b2b-reviews-wrap .rv-meta-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.my-b2b-reviews-wrap .rv-author { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--rv-text); }
.my-b2b-reviews-wrap .rv-date { font-size: 11px; color: var(--rv-text-muted); font-style: italic; }
.my-b2b-reviews-wrap .rv-stars { margin-bottom: 8px; line-height: 1; display: flex; align-items: center; gap: 1px; }
.my-b2b-reviews-wrap .rv-star { font-size: 17px; letter-spacing: 1px; color: var(--rv-star-off); transition: color .15s; }
.my-b2b-reviews-wrap .rv-star--on { color: var(--rv-color); }
.my-b2b-reviews-wrap .rv-content { font-size: 13px; font-weight: 300; line-height: 1.6; color: var(--rv-text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; text-align: justify; margin-bottom: 10px; }
.my-b2b-reviews-wrap .rv-dims { border-top: 1px solid rgba(0,0,0,.08); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.my-b2b-reviews-wrap .rv-dim-row { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; }
.my-b2b-reviews-wrap .rv-dim-label { flex: 0 0 45%; min-width: 60px; max-width: 100px; color: var(--rv-text-muted); white-space: normal; word-break: break-word; padding-top: 1px; }
.my-b2b-reviews-wrap .rv-dim-bar-wrap { flex: 1; height: 5px; background: rgba(0,0,0,.10); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.my-b2b-reviews-wrap .rv-dim-bar { height: 100%; background: var(--rv-color); border-radius: 3px; transition: width .45s ease; }
.my-b2b-reviews-wrap .rv-dim-score { flex-shrink: 0; color: var(--rv-text-muted); min-width: 2.2em; text-align: right; padding-top: 1px; }
@media (max-width: 1080px) { .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 4; } }
@media (max-width: 880px) { .my-b2b-reviews-wrap .rv-grid, .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 3; } }
@media (max-width: 680px) { .my-b2b-reviews-wrap .rv-grid, .my-b2b-reviews-wrap .rv-grid-3-col, .my-b2b-reviews-wrap .rv-grid-4-col, .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 2; } .my-b2b-reviews-wrap .rv-img-main { height: 160px; } .my-b2b-reviews-wrap .rv-img-badge { bottom: 46px; } }
@media (max-width: 400px) { .my-b2b-reviews-wrap .rv-grid, .my-b2b-reviews-wrap .rv-grid-2-col, .my-b2b-reviews-wrap .rv-grid-3-col, .my-b2b-reviews-wrap .rv-grid-4-col, .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 1; } }

/* ══════════════════════════════════════════════════════
   评价表单区 (rv-form-area) — 命名空间样式接管
   所有选择器严格限定在 .my-b2b-reviews-wrap.rv-form-area 之下，
   通过高 Specificity 覆盖主题默认样式，不污染外部 DOM。
   ══════════════════════════════════════════════════════ */

/* ── 局部 CSS 变量 + 分割线 ─────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area {
    --rv-input-border:  #e2e8f0;
    --rv-input-radius:  6px;
    --rv-input-bg:      #f8fafc;
    --rv-label-color:   #374151;
    --rv-focus-ring:    rgba(37, 99, 235, .14);
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    box-sizing: border-box;
    width: 100%;
}
.my-b2b-reviews-wrap.rv-form-area *,
.my-b2b-reviews-wrap.rv-form-area *::before,
.my-b2b-reviews-wrap.rv-form-area *::after { box-sizing: inherit; }

/* ── 表单标题 ────────────────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area #respond .comment-reply-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    line-height: 1.3;
}

/* ── 标签 ───────────────────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rv-label-color);
    margin-bottom: 5px;
}
.my-b2b-reviews-wrap.rv-form-area .comment-form .required {
    color: var(--rv-color);
    font-weight: 700;
}

/* ── 文本 / Email输入框 ──────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="text"],
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="email"] {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--rv-input-border);
    border-radius: var(--rv-input-radius);
    background: var(--rv-input-bg);
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="text"]:focus,
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="email"]:focus {
    border-color: var(--rv-color);
    box-shadow: 0 0 0 3px var(--rv-focus-ring);
}

/* ── 评价正文 Textarea ──────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form textarea#comment {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--rv-input-border);
    border-radius: var(--rv-input-radius);
    background: var(--rv-input-bg);
    font-size: 14px;
    color: #1a1a1a;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.my-b2b-reviews-wrap.rv-form-area .comment-form textarea#comment:focus {
    border-color: var(--rv-color);
    box-shadow: 0 0 0 3px var(--rv-focus-ring);
}

/* ── 星级评分 <select> ──────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form-rating select#rating {
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--rv-input-border);
    border-radius: var(--rv-input-radius);
    background-color: var(--rv-input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    min-width: 160px;
    outline: none;
}

/* ── 提交按钮（Theme Color驱动，高 Specificity 覆盖 .woocommerce #respond input#submit）── */
.my-b2b-reviews-wrap.rv-form-area #respond input#submit,
.my-b2b-reviews-wrap.rv-form-area .comment-form .submit {
    background-color: var(--rv-color);
    color: #fff;
    border: none;
    border-radius: var(--rv-input-radius);
    padding: 11px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .3px;
    transition: opacity .2s ease, transform .15s ease;
}
.my-b2b-reviews-wrap.rv-form-area #respond input#submit:hover,
.my-b2b-reviews-wrap.rv-form-area .comment-form .submit:hover {
    opacity: .86;
    transform: translateY(-1px);
}
.my-b2b-reviews-wrap.rv-form-area #respond input#submit:active,
.my-b2b-reviews-wrap.rv-form-area .comment-form .submit:active {
    opacity: 1;
    transform: translateY(0);
}

/* ── 段落间距 ────────────────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form p { margin-bottom: 16px; }

/* ══════════════════════════════════════════════════════
   排版差异化 — 4 种 Layout 的表单 DOM 变体
   ══════════════════════════════════════════════════════ */

/* ── Pro：卡片浮起，阴影包裹整个表单 ──────────────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-pro #respond {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
    padding: 28px 32px;
}

/* ── Ecommerce：居中宽幅，浅灰背景凸显转化区域 ────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-ecommerce #respond {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    background: #f9fafb;
    border-radius: 8px;
    padding: 24px 28px;
    border: 1px solid #e5e7eb;
}

/* ── Masonry：左侧品牌色描边，紧凑型 ───────────────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry #respond {
    border-left: 3px solid var(--rv-color);
    padding-left: 20px;
}
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form p { margin-bottom: 10px; }
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form input[type="text"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form input[type="email"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form textarea#comment {
    padding: 7px 10px;
    font-size: 13px;
}

/* ── Minimal：极简无框，只留底部细线 ──────────────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form input[type="text"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form input[type="email"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form textarea#comment {
    background: #fff;
    border-radius: 4px;
}
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal #respond input#submit,
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form .submit {
    border-radius: 4px;
    padding: 9px 24px;
}

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .my-b2b-reviews-wrap.rv-form-area.rv-layout-pro #respond { padding: 20px 16px; }
    .my-b2b-reviews-wrap.rv-form-area.rv-layout-ecommerce #respond { padding: 16px; }
    /* 防 iOS 双击缩放：表单输入框字号不低于 16px */
    .my-b2b-reviews-wrap.rv-form-area .comment-form input[type="text"],
    .my-b2b-reviews-wrap.rv-form-area .comment-form input[type="email"],
    .my-b2b-reviews-wrap.rv-form-area .comment-form textarea#comment { font-size: 16px; }
}

/* ══════════════════════════════════════════════════════
   评价增强 — 多维度打分区
   ══════════════════════════════════════════════════════ */

.my-b2b-reviews-wrap.rv-form-area .rv-dim-inputs {
    --rv-color: #6366f1;
    margin-bottom: 20px;
    padding: 16px 18px;
    background: #f8f9ff;
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px 24px;
    align-items: start;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-inputs__title {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: .2px;
}

/* 收编后的原生星级：与滑块行视觉对齐，不破坏 WC 的 #rating / .stars JS */
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row {
    grid-column: 1 / -1;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating {
    margin: 0;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating label {
    display: inline !important;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin: 0 !important;
    white-space: nowrap !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating p.stars {
    margin: 0 !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating select#rating {
    max-width: 220px;
    margin-top: 4px;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    min-width: 0;
}

/* 表单维度标签：解除全局 .rv-dim-label 的宽度与省略号限制，允许折行防溢出 */
.my-b2b-reviews-wrap.rv-form-area .rv-dim-label {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    width: auto !important;
    min-width: 0 !important;
    word-break: break-word !important;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-input-label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/* 浏览器默认 range 样式重置 + 品牌色主题 */
.my-b2b-reviews-wrap.rv-form-area .rv-dim-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        var(--rv-color) 0%,
        var(--rv-color) 40%,
        #e5e7eb 40%,
        #e5e7eb 100%
    );
    outline: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: background .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rv-color);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rv-color);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: transform .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .3);
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-input-val {
    display: inline-block;
    min-width: 1.8em;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--rv-color);
    background: none;
    border: none;
    padding: 0;
}

/* ══════════════════════════════════════════════════════
   评价增强 — 前端媒体上传区
   ══════════════════════════════════════════════════════ */

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload {
    --rv-color: #6366f1;
    margin-bottom: 20px;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: .2px;
}

/* 隐藏原生 file input，使用自定义按钮触发 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px dashed var(--rv-color);
    border-radius: 6px;
    color: var(--rv-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: rgba(99, 102, 241, .04);
    transition: background .2s ease, border-color .2s ease;
    user-select: none;
    line-height: 1.4;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn:hover {
    background: rgba(99, 102, 241, .10);
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn-icon {
    font-size: 16px;
    line-height: 1;
    font-style: normal;
}

/* 预览缩略图网格 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb {
    position: relative;
    width: 72px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 4px 4px 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb img {
    width: 64px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__icon {
    width: 64px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 4px;
    background: #e5e7eb;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__name {
    font-size: 10px;
    color: #6b7280;
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__remove:hover {
    background: rgba(239, 68, 68, .85);
}

/* 双按钮行 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

/* 视频按钮专属色调 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn--video {
    border-color: #7c3aed;
    color: #7c3aed;
    background: rgba(124, 58, 237, .04);
}
.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn--video:hover {
    background: rgba(124, 58, 237, .10);
}

/* 视频已添加反馈条 */
.my-b2b-reviews-wrap.rv-form-area .rv-video-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #15803d;
}
.my-b2b-reviews-wrap.rv-form-area .rv-video-feedback__remove {
    margin-left: auto;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

/* ── 视频 Modal ── */
.rv-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    cursor: pointer;
}
.rv-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 460px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    overflow: hidden;
    z-index: 1;
}
.rv-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.rv-modal__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.rv-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}
.rv-modal__close:hover { color: #374151; }

.rv-modal__tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
}
.rv-modal__tabs--single { padding: 12px 20px 0; border-bottom: none; }
.rv-modal__tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.rv-modal__tab.is-active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}
.rv-modal__body {
    padding: 20px;
    min-height: 120px;
}
.rv-modal__file-label {
    display: flex !important;
    justify-content: center;
    width: 100%;
}
.rv-modal__file-name {
    margin: 10px 0 0;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    word-break: break-all;
}
.rv-modal__url-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}
.rv-modal__url-input:focus { border-color: #6366f1; }
.rv-modal__url-error {
    color: #ef4444;
    font-size: 12px;
    margin: 6px 0 0;
}
.rv-modal__confirm-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.rv-modal__confirm-btn:hover { background: #4f46e5; }

/* 响应式：小屏时上传按钮Full width */
@media (max-width: 480px) {
    .my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn { width: 100%; justify-content: center; }
    .my-b2b-reviews-wrap.rv-form-area .rv-media-btn-row { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════
   评价表单 — 原生 WooCommerce 星级微调（样式由主题接管）
   ══════════════════════════════════════════════════════ */

.rv-native-stars-wrapper p.stars {
    margin: 0 !important;
    line-height: 1;
    white-space: nowrap;
}

/* 1. 强制清空原生Theme Color，设定默认灰色（覆盖自定义维度 + Overall Rating两种容器） */
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars a,
.my-b2b-reviews-wrap .comment-form-rating p.stars a::before {
    color: #e5e7eb !important;
}

/* 2. 当 Hover 整个 p 标签，或者处于 selected Status时，All变为Theme Color */
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a::before,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars.selected a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars.selected a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars.selected a,
.my-b2b-reviews-wrap .comment-form-rating p.stars.selected a::before {
    color: var(--rv-color) !important;
}

/* 3. 核心逻辑：利用后置兄弟选择器 ~，把鼠标悬停位置之后，以及被选中位置之后的星星，强行打回灰色 */
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a.active ~ a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a.active ~ a::before,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a:hover ~ a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a:hover ~ a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars a.active ~ a,
.my-b2b-reviews-wrap .comment-form-rating p.stars a.active ~ a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a:hover ~ a,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a:hover ~ a::before {
    color: #e5e7eb !important;
}

/* ==============================================
   灯箱预览 / Lightbox  (rv-lightbox)
   纯原生 CSS — 零依赖、零冲突
   v3：支持放大缩小 + 拖拽平移
   ============================================== */
#rv-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#rv-lightbox-overlay.rv-lb-active {
    opacity: 1;
    visibility: visible;
}

/* 缩放画布：transform 施加在这里 */
#rv-lightbox-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    will-change: transform;
    touch-action: none;
}

#rv-lightbox-canvas.rv-lb-zoomed {
    cursor: grab;
}

#rv-lightbox-canvas.rv-lb-dragging {
    cursor: grabbing;
    transition: none !important;
}

#rv-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    /* pointer-events 保持默认，右键/长按保存功能正常 */
}

#rv-lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    font-size: 36px;
    line-height: 1;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.15s;
    z-index: 1000000;
}

#rv-lightbox-close:hover {
    opacity: 1;
}

#rv-lightbox-prev,
#rv-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    padding: 12px 18px;
    opacity: 0.75;
    transition: opacity 0.15s, background 0.15s;
    z-index: 1000000;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}

#rv-lightbox-prev {
    left: 12px;
}

#rv-lightbox-next {
    right: 12px;
}

#rv-lightbox-prev:hover,
#rv-lightbox-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

#rv-lightbox-prev.rv-lb-hidden,
#rv-lightbox-next.rv-lb-hidden {
    display: none;
}

/* 鼠标悬停到评价主图时给出「可点击」提示 */
.rv-img-main {
    cursor: zoom-in;
}

/* =============================================
   外部视频区域 / rv-video-zone
   响应式 16:9 iframe 容器，适配瀑布流窄列
   ============================================= */
.rv-video-zone {
    width: 100%;
}

.rv-video-responsive-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.rv-video-responsive-wrap iframe,
.rv-video-responsive-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ── 视频封面覆盖层（YouTube 外链 + 本地视频共用） ── */
.rv-embed-lazy,
.rv-local-lazy { cursor: pointer; }

.rv-embed-cover {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.rv-local-lazy video {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.rv-embed-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    border: none; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    z-index: 1;
    transition: transform 0.2s ease, background 0.2s ease;
    padding: 0;
}

.rv-embed-play::after {
    content: '';
    display: block;
    width: 0; height: 0;
    border-style: solid;
    border-width: 11px 0 11px 22px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.92);
    position: absolute;
    top: 50%; left: 54%;
    transform: translate(-50%, -50%);
}

.rv-embed-lazy:hover .rv-embed-play,
.rv-local-lazy:hover .rv-embed-play {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(0, 0, 0, 0.72);
}

/* ── 封面图播放按钮标识 ── */
.rv-img-zone--video-cover {
    position: relative;
    cursor: pointer;
}

.rv-img-zone--video-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    /* 三角形播放图标用 border trick */
    box-shadow: inset 18px 0 0 6px rgba(255, 255, 255, 0.9);
    clip-path: polygon(30% 15%, 85% 50%, 30% 85%);
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

.rv-img-zone--video-cover:hover::after {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 0.85;
}

/* 播放按钮圆形背景 */
.rv-img-zone--video-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease;
    pointer-events: none;
}

.rv-img-zone--video-cover:hover::before {
    background: rgba(0, 0, 0, 0.62);
}

/* 封面图区域内的封面图，cursor 提示可点击播放 */
.rv-cover-zone {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
}

.rv-cover-zone__label {
    font-size: 13px;
    color: #374151;
    margin: 0 0 8px;
    font-weight: 500;
}

.rv-cover-zone__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s;
}

.rv-cover-zone__btn:hover {
    border-color: #6b7280;
}

.rv-cover-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}