// add / edit post page in WordPress backend

// LaterPay vector logo for pricing and teaser metabox -----------------------------------------------------------------
#lp_post-pricing,
#lp_post-teaser { // WordPress selectors
    h3 span {
        left: 6.25em;
        position: relative;
    }
}

#lp_post-pricing h3 span:before,
#lp_post-teaser h3 span:before {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    content: 'a';
    font-family: laterpay-wordpress-icons !important;
    font-size: 6em;
    font-style: normal !important;
    font-variant: normal !important;
    font-weight: normal !important;
    left: -1.05em;
    line-height: 0;
    position: absolute;
    speak: none;
    text-transform: none !important;
    top: 0.106em;
}

#lp_post-teaser h3 span:before {
    top: 0.11em;
}


// pricing metabox -----------------------------------------------------------------------------------------------------
#lp_post-pricing a {
    text-decoration: none !important;

    // remove dotted outline and box shadows from links
    &:focus,
    &:active,
    &:visited {
        box-shadow: none !important;
        outline: 0 none !important;
    }
}


// enter / display post price section
.lp_post-price-input {
    font-size: $fs--225;
    height: calc(1.5em + 5px) !important;
    padding: $fs--05 $fs--025 !important;
    text-align: right;
    transition-duration: 0.4s !important;
    width: 100%;

    &:disabled {
        border-color: transparent !important;
        color: darken($text, 13%) !important;
        transition-duration: 0.4s !important;
    }
}

.lp_currency {
    color: $text--lightest;
    font-size: 1.4em;
    margin: $fs 0 0 $fs--05;
}


// select price type section
.lp_price-type {
    position: relative;

    // switch for selecting price type
    .lp_price-type__list {
        background-color: darken($background, 4%);
        margin: 0;
        padding: 0;
        width: 40%;
        border: 1px solid $border;
        border-radius: $border-radius;

        .lp_tooltip {
            display: block;
        }

        .lp_price-type__item {
            box-shadow: inset 1px 0 0 $border, inset 0 1px 0 hsla(0, 0%, 100%, 0.55);
            line-height: 1.25;
            margin: 0;
            padding: 0.5em 0;
            text-align: center;

            &:first-child {
                border-radius: 3px 0 0 3px;
                box-shadow: inset 1px 1px 0 hsla(0, 0%, 100%, 0.55);
            }

            &:last-child {
                border-radius: 0 3px 3px 0;
                box-shadow: inset 1px 0 0 $border, inset -1px 1px 0 hsla(0, 0%, 100%, 0.55);
            }

            &:hover {
                background-color: $clickable--highlight;

                .lp_price-type__link {
                    color: $text--inverse;
                }
            }

            .lp_price-type__link {
                display: block;
                height: 2.5em;
                color: $laterpay-brand;
                font-weight: 500;
            }

            &.lp_is-selected,
            &.lp_is-selected:hover {
                background-color: $laterpay-brand;
            }

            &.lp_is-selected {
                box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.34);

                .lp_price-type__link,
                &:hover .lp_price-type__link {
                    color: $text--inverse;
                    cursor: default;
                    text-shadow: none;
                }
            }
        }

        .lp_is-disabled {

            .lp_price-type__link {
                color: lighten($text--lightest, 4%);
                cursor: not-allowed;
                visibility: visible;
            }

            &:hover {
                background-color: darken($background, 4%);

                .lp_price-type__link {
                    color: lighten($text--lightest, 4%);
                    cursor: not-allowed;
                }
            }
        }
    }


    .lp_price-type__options {
        position: absolute;
        float: right;
        top: 0;
        right: 0;
        width: 60%;
        margin: 5px 0;

        li {
            margin-left: 10px;
            min-height: 35px;
            color: #989898;
            font-size: 12px;
            padding: 1px 0;

            .lp_badge--revenue-model-global {
                width: 75px;
                text-transform: uppercase;
            }

            b.lp_postEditTypeZero {
                font-size: $fs;
                line-height: 2;
                color: #000;
                font-weight: 800;
            }
        }

        li#lp_js_postPriceInputInfo {
            margin-top: 10px;

            input.lp_input {
                font-size: $fs;
            }

            div.postPriceInputHolder {
                float: left;
                width: 40%;
            }

            div#lp_js_priceEditSection {
                float: right;
                width: 60%;

                label.lp_badge--revenue-model {
                    width: 65px;
                    margin-left: 10px;
                }
            }
        }

        ul.lp_js_priceTypeDetailsCategoryDefaultPriceList {
            max-height: 130px;
            overflow: scroll;
            border: 1px solid #01a99d;
            border-radius: 5px;
            padding: 1px 3px;
            overflow-x: hidden;
            overflow-y: auto;

            li {
                padding: 10px 5px;
                min-height: 25px;
                margin: 0;
                font-size: 12px;
                width: 120px;

                a {
                    color: #0f3f75;
                    font-weight: 500;

                    span {
                        color: #989898;
                    }

                    span.lp_badge {
                        position: absolute;
                        margin-left: 3px;
                        width: 65px;
                    }
                }
            }

            li.lp_is-selectedCategory {
                background-color: #d9f2f0;
                border: 2px solid #01a99d;
                border-radius: 5px;

                a {
                    color: #000000;
                    cursor: default;
                }
            }
        }
    }

    .lp_price-type__details {
        position: relative;
        z-index: 99;
    }
}

.lp_dynamic-pricing-toggle,
.lp_dynamic-pricing-reset {
    display: block;
    padding: $fs--075 $fs--025 0;

    &:focus {
        color: $clickable--highlight;
    }
}


// teaser content metabox ----------------------------------------------------------------------------------------------
#lp_post-teaser dfn {
    @extend %hint-text;

    display: block;
    margin: $fs 0;
}


// plugin mode indicator -----------------------------------------------------------------------------------------------
.lp_plugin-mode-indicator {
    position: relative;
    //right: $fs * 7; // leave sufficient space for contextual help link
    top: $fs--25 - $fs--015;

    // LaterPay logo (rendered in pseudo element from icon font)
    &:before {
        float: left;
        font-size: $fs--3;
        //left: -2.75rem;
        line-height: 0;
        position: relative;
        top: $fs--2;
    }

    .lp_plugin-mode-indicator__title {
        color: $clickable;
        font-size: $fs !important;
        margin: $fs 0 $fs--05 !important;
        position: relative;
        left: $fs--2;
        top: -$fs--3;
    }

    &:active,
    &:focus,
    &:hover {

        &:before,
        .lp_plugin-mode-indicator__title,
        i {
            color: $clickable--highlight;
        }
    }

    i {
        color: $clickable;
        font-style: normal;
    }

    .lp_plugin-mode-indicator__text {
        color: $text--lighter;
        position: relative;
        left: $fs--2;
        top: -$fs--4;
    }
}

// add red color icon for
.account_setup_warning[data-icon]:before {
    color: red;
}

div.lp_postMetaBox {
    padding: 5px;

    div.lp_js_postEditGlobalBehaviour {
        p.lp_postEditTypeZero {
            font-size: $fs--2;
            margin: 10px 0 5px 0;
            line-height: 1;
            font-weight: 800;
        }

        p.lp_postEditTypeOne {
            font-weight: bold;
        }

        span {
            color: #ababab;
        }
    }

}

li.lp_price-type__global {

    display: block;

    &:after {
        margin-left: -47px;
    }
    &:hover:before,
    &:hover:after {
        left: 25%;
    }

}
