@import "../../base/fn";

/*
z-index:
0: .njui-swiped-btn
1: .njui-cell_swiped .njui-cell__bd
2: .njui-cells和.njui-cell的1px线
*/

.njui-cells {
    margin-top: @njuiCellsMarginTop;
    background-color: @njuiCellBg;
    line-height: @njuiCellLineHeight;
    font-size: @njuiCellFontSize; //cell中间有效高度23px，跟客户端默认图标尺寸一致

    overflow: hidden; //因为每个cell的border使用before元素left搞的，ie下伪元素的containing block估计跟标准不同，在cell上用oh不生效

    // onepx
    position: relative;
    &:before {
        .setTopLine(@njuiCellBorderColor);
        z-index: 2;
    }
    &:after {
        .setBottomLine(@njuiCellBorderColor);
        z-index: 2;
    }
}

.njui-cells__title {
    margin-top: .77em; // 15px - 行高
    margin-bottom: .3em; // 8px - 行高
    padding-left: @njuiCellGapH;
    padding-right: @njuiCellGapH;
    color: @njuiTextColorGray;
    font-size: @njuiCellTipsFontSize;

    & + .njui-cells {
        margin-top: 0;
    }
}

.njui-cells__tips {
    margin-top: .3em; // 8px - 行高
    color: @njuiTextColorGray;
    padding-left: @njuiCellGapH;
    padding-right: @njuiCellGapH;
    font-size: @njuiCellTipsFontSize;
}

.njui-cell {
    padding: @njuiCellGapV @njuiCellGapH;
    position: relative; //这个是为了兼容cells容器onepx方案被before挡住而做的
    display: flex;
    align-items: center;
    &:before {
        .setTopLine(@njuiCellBorderColor);
        left: @njuiCellGapH;
        z-index: 2;
    }
    &:first-child {
        &:before {
            display: none;
        }
    }
}

.njui-cell_primary {
    align-items: flex-start;
}

.njui-cell__bd {
    flex: 1;
}

.njui-cell__ft {
    text-align: right;
    color: @njuiTextColorGray;
}
