/**
 * 顶部导航会员充值按钮样式
 *
 * @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;
    vertical-align: middle;
    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% + 12px);
    right: 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.4s 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) scale(1);
    pointer-events: auto;
}

/* 弹窗内容 */
.xun-header-actions .hui-vip-tooltip-inner {
    background: var(--color-bg-container, #fff);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-width: 500px;
    max-width: 700px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* 弹窗箭头 */
.xun-header-actions .hui-vip-tooltip::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 24px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--color-bg-container, #fff);
    filter: drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.08));
}

/* 弹窗头部 */
.xun-header-actions .hui-vip-tooltip-header {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}

.xun-header-actions .hui-vip-tooltip-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a574, transparent);
    border-radius: 2px;
}

.xun-header-actions .hui-vip-tooltip-header h3 {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #d4a574 0%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 4px 0;
    letter-spacing: -0.2px;
}

.xun-header-actions .hui-vip-tooltip-subtitle {
    font-size: 12px;
    color: var(--color-text-secondary, #666);
    margin: 0;
    font-weight: 500;
}

/* 套餐列表 */
.xun-header-actions .hui-vip-tooltip-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    max-width: 100%;
}

/* 空状态 */
.xun-header-actions .hui-vip-tooltip-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-secondary, #666);
}

.xun-header-actions .hui-vip-tooltip-empty p {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.xun-header-actions .hui-vip-tooltip-empty-tip {
    font-size: 13px;
    color: var(--color-text-tertiary, #999);
}

/* 单个套餐卡片 */
.xun-header-actions .hui-vip-package {
    position: relative;
    background: linear-gradient(135deg, #fffbf5 0%, #ffffff 100%);
    border: 1.5px solid #f0e6d8;
    border-radius: 10px;
    padding: 16px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.xun-header-actions .hui-vip-package::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4a574, #b8860b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xun-header-actions .hui-vip-package:hover::before {
    opacity: 1;
}

.xun-header-actions .hui-vip-package:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.2);
    border-color: #d4a574;
}

/* 推荐套餐 */
.xun-header-actions .hui-vip-package-featured {
    background: linear-gradient(135deg, #d4a574 0%, #b8860b 100%);
    border-color: transparent;
    color: #fff;
    transform: scale(1.05);
}

.xun-header-actions .hui-vip-package-featured::before {
    opacity: 0;
}

.xun-header-actions .hui-vip-package-featured:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.4);
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-name,
.xun-header-actions .hui-vip-package-featured .hui-vip-package-price,
.xun-header-actions .hui-vip-package-featured .hui-vip-package-features {
    color: #fff;
}

/* 套餐标签 */
.xun-header-actions .hui-vip-package-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    line-height: 1.3;
}

/* 推荐标签 - 金色 */
.xun-header-actions .hui-vip-package-badge-recommended {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* 当前套餐标签 - 绿色 */
.xun-header-actions .hui-vip-package-badge-current {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* 已拥有标签 - 灰色 */
.xun-header-actions .hui-vip-package-badge-owned {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

/* 当前套餐卡片 */
.xun-header-actions .hui-vip-package-current {
    border-color: #d4a574;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.1);
}

.xun-header-actions .hui-vip-package-current:hover {
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.25);
}

/* 禁用状态的套餐卡片 */
.xun-header-actions .hui-vip-package-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.xun-header-actions .hui-vip-package-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 套餐名称 */
.xun-header-actions .hui-vip-package-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text, #333);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: -0.1px;
}

/* 价格 */
.xun-header-actions .hui-vip-package-price {
    text-align: center;
    margin-bottom: 12px;
}

.xun-header-actions .hui-vip-package-price-symbol {
    font-size: 14px;
    font-weight: 600;
    vertical-align: top;
    opacity: 0.8;
}

.xun-header-actions .hui-vip-package-price-amount {
    font-size: 26px;
    font-weight: 800;
    color: #d4a574;
    letter-spacing: -0.6px;
    line-height: 1;
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-price-amount {
    color: #fff;
}

.xun-header-actions .hui-vip-package-price-unit {
    font-size: 12px;
    color: var(--color-text-secondary, #666);
    margin-left: 2px;
    font-weight: 500;
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-price-unit {
    color: rgba(255, 255, 255, 0.9);
}

/* 特权列表 */
.xun-header-actions .hui-vip-package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.xun-header-actions .hui-vip-package-features li {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-secondary, #666);
    margin-bottom: 6px;
    line-height: 1.3;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.xun-header-actions .hui-vip-package:hover .hui-vip-package-features li {
    transform: translateX(1px);
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-features li {
    color: rgba(255, 255, 255, 0.95);
}

.xun-header-actions .hui-vip-package-features li svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    flex-shrink: 0;
    color: var(--color-success, #10b981);
    stroke-width: 2.5;
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-features li svg {
    color: #fff;
}

/* 购买按钮 */
.xun-header-actions .hui-vip-package-btn {
    display: block;
    width: 100%;
    padding: 9px 16px;
    background: linear-gradient(135deg, #d4a574 0%, #b8860b 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1px;
}

.xun-header-actions .hui-vip-package-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.xun-header-actions .hui-vip-package-btn:hover::before {
    width: 300px;
    height: 300px;
}

.xun-header-actions .hui-vip-package-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
}

.xun-header-actions .hui-vip-package-btn:active {
    transform: translateY(0);
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-btn {
    background: #fff;
    color: #d4a574;
}

.xun-header-actions .hui-vip-package-featured .hui-vip-package-btn:hover {
    background: #fffbf5;
    color: #b8860b;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

/* 当前套餐按钮 */
.xun-header-actions .hui-vip-package-btn-current {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.xun-header-actions .hui-vip-package-btn-current:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* 禁用状态的按钮 */
.xun-header-actions .hui-vip-package-btn-disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    border: none;
}

.xun-header-actions .hui-vip-package-btn-disabled:hover {
    background: #e5e7eb;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

.xun-header-actions .hui-vip-package-btn-disabled::before {
    display: none;
}

/* ============================================================================
   响应式设计
   ============================================================================ */

/* 移动端 */
@media (max-width: 768px) {
    .xun-header-actions .hui-vip-btn-image {
        height: 32px;
    }
    
    .xun-header-actions .hui-vip-tooltip-inner {
        min-width: 320px;
        max-width: calc(100vw - 40px);
        padding: 24px 20px;
    }
    
    .xun-header-actions .hui-vip-tooltip-packages {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .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 h3 {
        font-size: 24px;
    }
    
    .xun-header-actions .hui-vip-package-price-amount {
        font-size: 32px;
    }
}

/* ============================================================================
   深色模式适配
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    :root:not(.light) .xun-header-actions .hui-vip-tooltip-inner {
        background: var(--color-bg-container, #1a1a1a);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-tooltip::before {
        border-bottom-color: var(--color-bg-container, #1a1a1a);
    }
    
    :root:not(.light) .xun-header-actions .hui-vip-package {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-color: #3a3a3a;
    }
}

.dark .xun-header-actions .hui-vip-tooltip-inner {
    background: var(--color-bg-container, #1a1a1a);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .xun-header-actions .hui-vip-tooltip::before {
    border-bottom-color: var(--color-bg-container, #1a1a1a);
}

.dark .xun-header-actions .hui-vip-package {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border-color: #3a3a3a;
}
