/**
 * 顶部导航会员充值按钮样式
 *
 * @package    Hui
 * @subpackage Assets
 * @since      1.3.0
 */

/* ============================================================================
   按钮样式
   ============================================================================ */

/* 按钮容器 */
.xun-header-actions .hui-vip-btn-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

/* 按钮本身 - 不是链接，只是触发器 */
.xun-header-actions .hui-vip-btn {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    position: relative;
}

.xun-header-actions .hui-vip-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.xun-header-actions .hui-vip-btn:hover::after {
    opacity: 1;
}

.xun-header-actions .hui-vip-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.xun-header-actions .hui-vip-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 按钮图片 */
.xun-header-actions .hui-vip-btn-image {
    display: block;
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease;
}

.xun-header-actions .hui-vip-btn:hover .hui-vip-btn-image {
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
}

/* ============================================================================
   会员套餐弹窗样式 - 新版列表式设计
   ============================================================================ */

/* 弹窗容器 */
.xun-header-actions .hui-vip-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    padding-top: 8px;
    margin-top: -8px;
}

/* 悬停时显示弹窗 */
.xun-header-actions .hui-vip-btn-wrapper:hover .hui-vip-tooltip,
.xun-header-actions .hui-vip-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 弹窗内容 - 浅色背景 */
.xun-header-actions .hui-vip-tooltip-inner {
    background: var(--color-bg-container, #fff);
    border-radius: 16px;
    box-shadow: var(--shadow-dropdown, 0 12px 40px rgba(0, 0, 0, 0.15));
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
    padding: 0;
    min-width: 280px;
    max-width: 320px;
    overflow: hidden;
}

/* 弹窗箭头 */
.xun-header-actions .hui-vip-tooltip::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--color-bg-container, #fff);
    filter: drop-shadow(0 -1px 0 var(--color-border, rgba(0, 0, 0, 0.08)));
}

/* 弹窗头部 */
.xun-header-actions .hui-vip-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem 0.875rem;
    border-bottom: 1px solid var(--color-border-secondary, rgba(0, 0, 0, 0.05));
}

.xun-header-actions .hui-vip-tooltip-header-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.xun-header-actions .hui-vip-tooltip-header-text {
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

/* 套餐列表 */
.xun-header-actions .hui-vip-tooltip-list {
    padding: 0.5rem 0.75rem;
}

/* 单个套餐项 */
.xun-header-actions .hui-vip-tooltip-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    margin: 0.375rem 0;
    background: var(--color-fill-quaternary, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--color-border-secondary, rgba(0, 0, 0, 0.05));
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.xun-header-actions .hui-vip-tooltip-item:hover {
    background: var(--color-fill-tertiary, rgba(0, 0, 0, 0.04));
    border-color: var(--xun-secondary, var(--color-secondary));
    transform: translateX(2px);
}

/* 推荐套餐 - 主题色边框 */
.xun-header-actions .hui-vip-tooltip-item--featured {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.3);
}

.xun-header-actions .hui-vip-tooltip-item--featured:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.5);
}

/* 当前套餐 */
.xun-header-actions .hui-vip-tooltip-item--current {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}

.xun-header-actions .hui-vip-tooltip-item--current:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.5);
}

/* 禁用状态 */
.xun-header-actions .hui-vip-tooltip-item--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.xun-header-actions .hui-vip-tooltip-item--disabled:hover {
    background: var(--color-fill-quaternary, rgba(0, 0, 0, 0.02));
    border-color: var(--color-border-secondary, rgba(0, 0, 0, 0.05));
    transform: none;
}

/* 套餐名称 */
.xun-header-actions .hui-vip-tooltip-item-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text, #1a1a1a);
    letter-spacing: 0.2px;
}

/* 右侧区域 */
.xun-header-actions .hui-vip-tooltip-item-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

/* 价格 */
.xun-header-actions .hui-vip-tooltip-item-price {
    display: flex;
    align-items: baseline;
    gap: 0.125rem;
}

.xun-header-actions .hui-vip-tooltip-item-price-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #d97706;
    letter-spacing: -0.3px;
}

.xun-header-actions .hui-vip-tooltip-item-price-unit {
    font-size: 0.75rem;
    color: var(--color-text-tertiary, rgba(0, 0, 0, 0.45));
    font-weight: 400;
}

/* 标签 */
.xun-header-actions .hui-vip-tooltip-item-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1875rem 0.4375rem;
    border-radius: 4px;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* 推荐标签 - 橙色 */
.xun-header-actions .hui-vip-tooltip-item-badge--recommended {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
}

/* 当前标签 - 绿色 */
.xun-header-actions .hui-vip-tooltip-item-badge--current {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

/* 已有标签 - 灰色 */
.xun-header-actions .hui-vip-tooltip-item-badge--owned {
    background: var(--color-fill, rgba(0, 0, 0, 0.08));
    color: var(--color-text-secondary, rgba(0, 0, 0, 0.65));
}

/* 底部链接 */
.xun-header-actions .hui-vip-tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--color-border-secondary, rgba(0, 0, 0, 0.05));
    color: var(--color-text-secondary, rgba(0, 0, 0, 0.65));
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xun-header-actions .hui-vip-tooltip-footer:hover {
    color: var(--xun-secondary, var(--color-secondary));
    background: var(--color-fill-quaternary, rgba(0, 0, 0, 0.02));
}

.xun-header-actions .hui-vip-tooltip-footer svg {
    transition: transform 0.2s ease;
}

.xun-header-actions .hui-vip-tooltip-footer:hover svg {
    transform: translateX(3px);
}

/* 空状态 */
.xun-header-actions .hui-vip-tooltip-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--color-text-tertiary, rgba(0, 0, 0, 0.45));
}

.xun-header-actions .hui-vip-tooltip-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* ============================================================================
   响应式设计
   ============================================================================ */

/* 移动端 */
@media (max-width: 768px) {
    /* 隐藏整个会员按钮 */
    .xun-header-actions .hui-vip-btn-wrapper {
        display: none !important;
    }
    
    .xun-header-actions .hui-vip-btn-image {
        height: 32px;
    }
    
    .xun-header-actions .hui-vip-tooltip-inner {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }
    
    .xun-header-actions .hui-vip-tooltip {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px) scale(0.95);
    }
    
    .xun-header-actions .hui-vip-btn-wrapper:hover .hui-vip-tooltip {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .xun-header-actions .hui-vip-tooltip::before {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .xun-header-actions .hui-vip-tooltip-header-text {
        font-size: 0.9375rem;
    }
    
    .xun-header-actions .hui-vip-tooltip-item {
        padding: 0.75rem 0.875rem;
    }
    
    .xun-header-actions .hui-vip-tooltip-item-name {
        font-size: 0.875rem;
    }
    
    .xun-header-actions .hui-vip-tooltip-item-price-amount {
        font-size: 1rem;
    }
}

/* ============================================================================
   深色模式适配
   ============================================================================ */

/* 深色模式 - 深色背景 */
@media (prefers-color-scheme: dark) {
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-inner {
        background: linear-gradient(180deg, #1e2433 0%, #151a26 100%);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip::before {
        border-bottom-color: #1e2433;
        filter: none;
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-header {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-header-text {
        background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(251, 191, 36, 0.3);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item--featured {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
        border-color: rgba(251, 191, 36, 0.4);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item--featured:hover {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%);
        border-color: rgba(251, 191, 36, 0.6);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item--current {
        background: rgba(16, 185, 129, 0.08);
        border-color: rgba(16, 185, 129, 0.3);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item--current:hover {
        background: rgba(16, 185, 129, 0.12);
        border-color: rgba(16, 185, 129, 0.5);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item--disabled:hover {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item-name {
        color: rgba(255, 255, 255, 0.9);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item-price-amount {
        color: #fbbf24;
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item-price-unit {
        color: rgba(255, 255, 255, 0.5);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-item-badge--owned {
        background: rgba(255, 255, 255, 0.15);
        color: rgba(255, 255, 255, 0.7);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-footer {
        border-top-color: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.6);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-footer:hover {
        color: #fbbf24;
        background: rgba(255, 255, 255, 0.02);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-empty {
        color: rgba(255, 255, 255, 0.5);
    }
}

/* 手动切换深色模式 */
.dark .xun-header-actions .hui-vip-tooltip-inner {
    background: linear-gradient(180deg, #1e2433 0%, #151a26 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.06);
}

.dark .xun-header-actions .hui-vip-tooltip::before {
    border-bottom-color: #1e2433;
    filter: none;
}

.dark .xun-header-actions .hui-vip-tooltip-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.dark .xun-header-actions .hui-vip-tooltip-header-text {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .xun-header-actions .hui-vip-tooltip-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.dark .xun-header-actions .hui-vip-tooltip-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(251, 191, 36, 0.3);
}

.dark .xun-header-actions .hui-vip-tooltip-item--featured {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
    border-color: rgba(251, 191, 36, 0.4);
}

.dark .xun-header-actions .hui-vip-tooltip-item--featured:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%);
    border-color: rgba(251, 191, 36, 0.6);
}

.dark .xun-header-actions .hui-vip-tooltip-item--current {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.dark .xun-header-actions .hui-vip-tooltip-item--current:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
}

.dark .xun-header-actions .hui-vip-tooltip-item--disabled:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.dark .xun-header-actions .hui-vip-tooltip-item-name {
    color: rgba(255, 255, 255, 0.9);
}

.dark .xun-header-actions .hui-vip-tooltip-item-price-amount {
    color: #fbbf24;
}

.dark .xun-header-actions .hui-vip-tooltip-item-price-unit {
    color: rgba(255, 255, 255, 0.5);
}

.dark .xun-header-actions .hui-vip-tooltip-item-badge--owned {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.dark .xun-header-actions .hui-vip-tooltip-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
}

.dark .xun-header-actions .hui-vip-tooltip-footer:hover {
    color: #fbbf24;
    background: rgba(255, 255, 255, 0.02);
}

.dark .xun-header-actions .hui-vip-tooltip-empty {
    color: rgba(255, 255, 255, 0.5);
}
