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

.wux-actionsheet {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 11;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.4);
}

.wux-actionsheet__backdrop {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

.wux-actionsheet__content {
    margin-left: 8px;
    margin-right: 8px;
    width: auto;
    z-index: 11;
    overflow: hidden;
}

.wux-actionsheet__group {
    margin-bottom: 8px;
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden;
}

.wux-actionsheet__title {
    padding: 16px;
    color: #8f8f8f;
    text-align: center;
    font-size: 13px;
}

.wux-actionsheet__button {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 0;
    min-width: 52px;
    min-height: 48px;
    vertical-align: top;
    text-align: center;
    text-overflow: ellipsis;
    cursor: pointer;
    width: 100%;
    border-radius: 0;
    background-color: transparent;
    color: #007aff;
    font-size: 21px;
    line-height: 48px;

    &.wux-actionsheet__button--hover {
        box-shadow: none;
        border-color: #d1d3d6;
        color: #007aff;
        background: #e4e5e7;
    }

    &.wux-actionsheet__button--destructive {
        color: #ff3b30 !important;
    }

    &.wux-actionsheet__button--cancel {
        font-weight: 500;
    }
}

.wux-actionsheet__group {
    margin-bottom: 8px;
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden;
    
    &.wux-actionsheet__group--options {
        background: #f1f2f3;
    }

    .wux-actionsheet__button {
        border-top: none;

        &:after {
            transform: none;
            transform-origin: none;
            border: none;
            border-radius: 0;
            .setTopLine(#D9D9D9)
        }

        &:first-child:last-child:after {
            border-width: 0;
        }
    }
}

.wux-actionsheet--theme-wx {
    .wux-actionsheet__content {
        margin-left: 0;
        margin-right: 0;
        background-color: #efeff4;
    }
    
    .wux-actionsheet__group {
        border-radius: 0;
        margin-bottom: 6px;
        
        &.wux-actionsheet__group--options {
            background-color: #fff;
        }

        &.wux-actionsheet__group--cancel {
            margin-bottom: 0;
        }
    }

    .wux-actionsheet__button {
        font-size: 18px;
        color: #000;

        .wux-actionsheet__button--cancel {
            font-weight: normal;
        }
    }
}