/**
 * Matrix Tab 小部件样式
 * 
 * @package ShengWang
 * @since 1.0.0
 */

/* Matrix Tab 组件样式 */
.sw_matrix_wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* 主标题 */
.sw_matrix_header {
    text-align: center;
    margin-bottom: 30px;
}

.sw_matrix_title {
    font-size: 48px;
    line-height: 56px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 24px;
}

/* 选项卡导航 */
.sw_matrix_tab_nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sw_matrix_tab_nav .sw_tab_title {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    width: 180px;
    height: 48px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    white-space: nowrap;
    outline: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw_matrix_tab_nav .sw_tab_title:hover,
.sw_matrix_tab_nav .sw_tab_title.active {
    background: #FFFFFF !important;
    color: #181F27 !important;
    border-color: #FFFFFF !important;
}

/* 选项卡内容区域 */
.sw_matrix_tab_content {
    position: relative;
    border-radius: 32px;
    padding: 32px;
    height: auto;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sw_matrix_wrapper .sw_tab_content {
    position: relative;
    display: none !important;
    transform: translateY(0);
    opacity: 0;
    visibility: hidden;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

.sw_matrix_wrapper .sw_tab_content.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto;
    min-height: 0;
    overflow: visible;
}

/* 按钮网格 */
.sw_matrix_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    visibility: visible !important;
    justify-content: center;
}

/* 按钮样式 */
.sw_matrix_button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: url(../../resources/widgets/matrix-tabs/btn-bg.png) no-repeat center center;
    background-size: 100% 100%;
    border-radius: 16px;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 72px;
    position: relative;
    overflow: hidden;
    width: 201.6px;
}
/* 空内容样式 */
.sw_matrix_empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.sw_matrix_empty p {
    margin: 0;
    font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    
    .sw_matrix_title {
        font-size: 24px;
    }
    
    .sw_matrix_tab_nav .sw_tab_title {
        padding: 10px 16px;
        font-size: 13px;
    }

    .sw_matrix_grid {
        gap: 10px;
    }
    
    .sw_matrix_button {
        width: 160px;
        min-height: 60px;
        background-size: 96%;
    }
}

@media (max-width: 480px) {
    .sw_matrix_title {
        font-size: 20px;
    }
    
    .sw_matrix_tab_nav {
        gap: 8px;
        justify-content: center;
        max-width: 100%;
    }
    
    .sw_matrix_tab_nav .sw_tab_title {
        font-size: 12px;
        width: calc(50% - 4px);
        height: 40px;
        min-width: 120px;
        max-width: 140px;
    }
    
    .sw_matrix_tab_nav .sw_tab_title:nth-child(1),
    .sw_matrix_tab_nav .sw_tab_title:nth-child(2) {
        width: calc(50% - 4px);
        margin-bottom: 8px;
    }
    
    .sw_matrix_tab_nav .sw_tab_title:nth-child(3),
    .sw_matrix_tab_nav .sw_tab_title:nth-child(4),
    .sw_matrix_tab_nav .sw_tab_title:nth-child(5) {
        width: calc(33.333% - 6px);
        min-width: 80px;
        max-width: 90px;
    }

    .sw_matrix_tab_content {
        padding: 20px;
    }
    
    /* 480px下按钮一行两个，适当减小宽度 */
    .sw_matrix_grid {
        gap: 10px;
        justify-content: space-between;
    }
    
    .sw_matrix_button {
        width: calc(50% - 7.5px);
        min-width: 140px;
        max-width: 160px;
        min-height: 50px;
        font-size: 14px;
        font-weight: 500;
    }
}