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

.olz-screen-meta.olz-field-container {
    background-color: @graylight;
    border: 1px solid lighten(@gray, 20%);
    border-radius: 3px;
    box-shadow: 0 1px 3px fade(@black, 5%);
    display: block;
    margin: 0 5px 20px;
    position: relative;

    .contextual-help-wrap {
        margin: 0 0 0 -4px;
        overflow: auto;
        padding: 0;
        position: relative;

        .contextual-help-back {
            background-color: @white;
            border-color: lighten(@gray, 20%);
            border-style: solid;
            border-width: 0 1px;
            bottom: 0;
            left: 220px;
            position: absolute;
            right: 20px;
            top: 0;
        }

        .contextual-help-columns {
            position: relative;

            .contextual-help-tabs {
                width: 220px;

                h2 {
                    padding-left: 16px;

                    img {
                        vertical-align: middle;
                    }
                }

                a {
                    color: @main;

                    &:focus,
                    &:hover {
                        box-shadow: none;
                        color: @black;
                        outline: 0;
                    }
                }

                .active {
                    background: @white;
                    border-left: 2px solid @primary;

                    a {
                        color: @black;
                    }
                }

                hr {
                    margin-left: 4px;
                }

                .button-create {
                    background: @primary;
                    border-color: @main;
                    box-shadow: 0 1px 0 fade(@black, 15%);
                    color: @white;
                    display: block;
                    font-size: 16px;
                    height: auto;
                    line-height: 50px;
                    margin: 0 auto 10px;

                    &:hover {
                        background: @main;
                    }
                }

                .button-index {
                    background: @blue;
                    border-color: darken(@blue, 10%);
                    box-shadow: 0 1px 0 fade(@black, 8%);
                    color: @white;
                    display: block;
                    font-size: 16px;
                    height: auto;
                    line-height: 50px;
                    margin: 0 auto 10px;

                    &:hover {
                        background: darken(@blue, 10%);
                    }
                }

                .submitsuccess {
                    background: transparent;
                    border: none;
                    color: @blue;
                    cursor: pointer;
                    display: block;
                    margin: 0 auto 10px;

                    &:hover {
                        color: darken(@blue, 20%);
                        text-decoration: underline;
                    }
                }

                .submitdelete {
                    background: transparent;
                    border: none;
                    color: @danger;
                    cursor: pointer;
                    display: block;
                    margin: 0 auto 10px;

                    &:hover {
                        color: red;
                        text-decoration: underline;
                    }
                }

                .forms .button.button-primary {
                    display: block;
                    margin: 0 auto;
                }
            }

            .contextual-help-tabs-wrap {
                margin-left: 220px;
                overflow: auto;
                padding: 20px;

                .help-tab-content {
                    position: relative;
                }
            }
        }
    }
}

@media (max-width:782px) {
    .olz-screen-meta.olz-field-container {
        .contextual-help-wrap {
            margin-left: 0;

            .contextual-help-back {
                left: 10px;
                right: 10px;
                top: 0;
            }

            .contextual-help-columns {
                .contextual-help-tabs {
                    float: none;
                    padding: 0 11px;
                    width: auto;

                    ul {
                        background-color: @graylight;
                        border: 1px solid lighten(@gray, 20%);
                        border-width: 1px 0;
                        margin: 0 -1px;
                        padding: 3px 1px;

                        li {
                            border-width: 0 0 2px 0;
                            display: inline-block;
                        }
                    }

                    a {
                        padding: 5px 12px;
                    }

                    .active {
                        border-bottom: 2px solid @primary;
                        border-left: 0;
                        margin-right: 0;

                        a {
                            border: none;
                        }
                    }

                    hr {
                        display: none;
                    }

                    .forms {
                        position: absolute;
                        right: 10px;
                        top: 5px;
                        width: 350px;

                        form {
                            float: right;
                            margin: 0 5px;
                        }

                        .submitdelete {
                            margin: 5px auto;
                        }
                    }
                }
            }
        }

        .help-tab-content {
            margin: 0;
        }
    }
}
