@import "../../less/variables.less";

.fullSize {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

.container {
    position: fixed;
    composes: fullSize;
    z-index: @z-modal;
    overflow-y: auto;
    pointer-events: none;
}

.backdrop {
    position: fixed;
    composes: fullSize;
    background: #000;
    opacity: 0.4;
    z-index: @z-modal;
}

.dialog {
    // reset pointer-events: none set on .container
    pointer-events: auto;
    position: relative;
    margin: 0 auto;
    width: 320px;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 5px;
    overflow: hidden; // correct size when containing float
    padding: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    font-size: 14px;

    @media (max-width: 480px) {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    @media (min-width: 481px) {
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%); // fuck IE8
    }
}

.mobileBottomSheet {
    composes: dialog;
    @media (max-width: 480px) {
        border-radius: 0px;
        margin-bottom: 0;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
    }
}

.header {
    margin-bottom: 20px;
}

.closeButton {
    float: right;
    border: none;
    background: transparent;
    cursor: pointer;
    height: 20px;
    padding: 0;
    color: #666;
}

.title {
    font-size: 16px;
    font-weight: bold;
    line-height: 20px;
    margin: 0;
}

.baseButton {
    display: block;
    border: none;
    border-radius: 5px;
    height: 36px;
    padding: 0 16px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;

    &:disabled {
        background: #999;
    }
}

.button {
    composes: baseButton;
    float: right;
    margin-left: 10px;
}

.dangerConfirmButton {
    composes: button;
    background: @color-danger;
}

.confirmButton {
    composes: button;
    background: @color-main;
}

.fullConfirmButton {
    composes: baseButton;
    background: @color-main;
    width: 100%;
}

.cancelButton {
    composes: button;
    color: @color-text-dark;
    background: transparent;
}

