/*!
 * fields/_modal.less
 *
 * Copyright 2016 Achraf Chouk
 * Achraf Chouk (https://github.com/crewstyle)
 */

.olz-modal {
    background: @graylighter;
    bottom: 30px;
    box-shadow: 0 5px 15px fade(@black, 70%);
    display: none;
    left: 30px;
    overflow: hidden;
    position: fixed;
    right: 30px;
    text-align: center;
    top: 30px;
    z-index: 160000;

    form {
        padding: 0;
    }

    header {
        height: 60px;
        line-height: 60px;
        overflow: hidden;
        text-align: left;

        h2 {
            color: darken(@gray, 30%);
            display: inline-block;
            font-size: 22px;
            font-weight: normal;
            line-height: 50px;
            margin: 0;
            padding-left: 20px;
        }

        .close {
            color: darken(@gray, 30%);
            display: block;
            float: right;
            font-size: 30px;
            line-height: 60px;
            padding: 0 20px;
            text-decoration: none;

            &:hover {
                background-color: @graylighter;
            }
        }
    }

    .content-container {
        background: @white;
        bottom: 0;
        left: 0;
        overflow-y: auto;
        padding: 20px;
        position: absolute;
        right: 0;
        top: 60px;
    }

    .content pre {
        color: @black;
        font-family: inherit;
        margin: 0;
        text-align: left;
        white-space: pre-wrap;
    }

    footer {
        bottom: 0;
        height: 30px;
        left: 0;
        padding: 10px 20px;
        position: absolute;
        right: 0;
        text-align: right;
    }
}

.olz-modal-backdrop {
    background: @black;
    bottom: 0;
    display: none;
    left: 0;
    opacity: .7;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 159900;

    &.opened {
        display: block;
    }
}

#poststuff .olz-modal header h2 {
    color: darken(@gray, 30%);
    display: inline-block;
    font-size: 22px;
    font-weight: normal;
    line-height: 50px;
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 782px) {
    #poststuff .olz-modal header h2,
    .olz-modal header h2 {
        display: block;
        font-size: 14px;
        overflow: hidden;
    }
}
