/* ============================================
   成本公示气泡提示 - 独立样式文件
   按钮在"剩余次数"文字后面，悬停弹出气泡
   ============================================ */

/* ===== 外层容器（行内，跟在文字后面） ===== */
.cost-tooltip-wrapper {
    display: inline-block;
    position: relative;
    margin-left: 12px;
    vertical-align: middle;
}

/* ===== 成本公示按钮 ===== */
.cost-tooltip-btn {
    background: transparent;
    color: #fbbf24;
    border: 1px dashed rgba(251, 191, 36, 0.5);
    padding: 3px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    white-space: nowrap;
    font-family: inherit;
}

.cost-tooltip-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #fcd34d;
}

/* ===== 气泡主体（在按钮右侧显示，尺寸缩小） ===== */
.cost-tooltip-bubble {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    width: 360px;
    max-width: 85vw;
    background: rgba(18, 20, 28, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #d4d4d8;
    border-radius: 12px;
    padding: 18px 20px 16px;
    font-size: 0.78rem;
    line-height: 1.6;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    text-align: left;
}

/* 悬停按钮 → 气泡出现 */
.cost-tooltip-wrapper:hover .cost-tooltip-bubble {
    opacity: 1;
    visibility: visible;
}

/* 左侧小三角箭头（指向按钮） */
.cost-tooltip-bubble::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: rgba(18, 20, 28, 0.97);
}

/* ===== 标题 ===== */
.cost-tooltip-title {
    color: #ff6b6b;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.5px;
}

/* ===== 小节标题 ===== */
.cost-tooltip-section-title {
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.82rem;
    margin: 12px 0 5px;
}

.cost-tooltip-section-title:first-of-type {
    margin-top: 0;
}

/* ===== 强调数字 ===== */
.cost-highlight {
    color: #fbbf24;
    font-weight: 700;
}

.cost-highlight-red {
    color: #ff6b6b;
    font-weight: 600;
}

/* ===== 重要选择通道引用块 ===== */
.cost-tooltip-important {
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid #fbbf24;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 0.8rem;
}

.cost-tooltip-important-title {
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 4px;
}

/* ===== 移动端适配 ===== */
@media (max-width: 520px) {
    .cost-tooltip-bubble {
        width: 280px;
        padding: 14px 16px 12px;
        font-size: 0.76rem;
        line-height: 1.55;
    }
}
