﻿/* ============================================================
 * Widget Nav Styles
 * 提取自 template-app-nav.php 和 tab-switch.php
 * 通过 wp_enqueue_style 全局加载一次，避免每个小工具重复注入
 * ============================================================ */

/* ── template-app-nav ── */
.beaver-nav-tab {
    display: flex;
    width: 100%;
}

.beaver-nav-tab .tab-title {
    flex-shrink: 0;
    font-size: 15px;
    margin-right: 20px !important;
}

.tab-more.btn-more.text-xs {
    font-size: 12px;
    padding: 2px 8px;
}

.beaver-nav-tab .tab-to-more {
    position: relative;
    flex: 1;
    min-width: 50px;
}

.tab-to-more::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #acc2ef;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.beaver-nav-tab:hover .tab-to-more::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .tab-to-more {
        display: none !important;
    }
    .beaver-nav-tab .tab-title {
        font-size: 14px;
        margin-right: 15px !important;
    }
}

/* ── tab-switch ── */
.tab-switch-category-card {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666666;
}

.tab-switch-category-card .tab-switch-icon1 {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: currentColor;
}

.tab-switch-category-card span {
    font-size: 18px;
    font-weight: bold;
    color: inherit;
}

.tab-switch-container {
    display: flex;
    gap: 5px;
    padding: 10px 0;
}

.tab-switch-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 15px;
    flex: 1;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.4s ease-in-out, transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tab-switch-item:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.tab-switch-item:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.tab-switch-item:not(.active) {
    opacity: 0.7;
    filter: grayscale(30%);
}

.tab-switch-title {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}

.tab-switch-item.active {
    opacity: 1;
    background: linear-gradient(rgb(96 179 180) 0%, rgb(43 144 191) 100%);
    border: 1px solid rgb(89 174 182 / 62%);
    box-shadow: 0 8px 12px rgb(48 48 62 / 53%), 0 0 0 1px rgba(255, 255, 255, 0.3) inset, 0 1px rgba(255, 255, 255, 0.4) inset;
}

.tab-switch-item:hover:not(.active) {
    opacity: 0.9;
    filter: grayscale(10%);
    background: linear-gradient(rgb(96 179 180) 0%, rgb(43 144 191) 100%);
    transform: scale(1.03);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.tab-switch-icon {
    position: absolute;
    opacity: 0.8;
    bottom: -17px;
    right: -1px;
    pointer-events: none;
}

.tab-switch-item:not(.active) .tab-switch-icon svg {
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.4s ease-in-out;
}

.tab-switch-item.active .tab-switch-icon svg {
    transform: translateY(0);
    transition: transform 0.5s ease-in-out, opacity 0.4s ease-in-out;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}
