.vsm-metabox {
    margin:30px 0;
    background: #fff;

    &__header {
        margin: 0 0 10px 0;
        border-bottom: 1px solid #e5e5e5;
        padding: 8px 20px;

        font-size: 14px;
        line-height: 1.4;

        &:hover {
            cursor:pointer;
        }
    }

    &__content {
        padding: 0 10px 10px;

        &_closed {
            display: none;
        }
    }
}

.vsm-message {
    &_type {
        &_not-exists {
            margin-top: 14px;
        }

        &_not-found {
            padding-left: 5px;
        }
    }
}

.vsm-top-panel {
    display: flex;
    margin: 10px 0 4px;

    &__refresh {
        margin-left: 40px;
    }

    &__tabs-switcher {
        margin-left: 40px;
    }
}

.vsm-search {
    &__input {
        max-width: 150px;
    }

    &__reset {
        margin-left: 6px !important;
    }
}

.vsm-refresh {
    display: flex;
    align-items: center;

    &__button {
    }

    &__last-updated {
        margin-left: 10px;
    }

    &__success {
        display: inline-block;
        margin-left: 10px;

        color: lightgreen;
        font-weight: bold;
    }
}

.vsm-tabs-switcher {
    display: flex;
    align-content: center;
    min-height: 30px; // same as in .button-secondary

    &__item {
        display: flex;
        align-items: center;
        padding: 0 3px;

        &:hover {
            text-decoration: underline;
            cursor: pointer;
        }

        &:last-child {
            margin-right: 0;
        }

        &_active {
            font-weight: bold;
        }
    }
}

.vsm-highlighted {
    background-color: #fca;
}

.vsm-tabs-contents {
    margin-bottom: 10px;
}

.vsm-tab-content {
    margin-top: 20px;
    margin-bottom: 30px;

    &:last-child {
        margin-bottom: 0;
    }

    &__title {
        margin-bottom: 10px;
        padding-left: 1px;
        font-weight: bold;

        &:before {
            content: '== ';
            opacity: 0.3;
        }
    }
}

.vsm-table {
    border-collapse: collapse;

    a {
        text-decoration:none;
    }

    &__row {
        &:hover {
            background-color:#f0f0f0;
        }
    }

    &__column {
        padding:5px 10px;
        text-align:left;

        &_sortable {
            white-space: nowrap;
            user-select: none;

            &:hover{
                cursor: pointer;
            }
        }

        &_type_th {
            border-bottom: 1px solid #e1e1e1;
            font-weight:bold;
        }

        &_type_td {
            vertical-align:top;
        }
    }

    &__column_content {
        &_umeta-id {
            min-width:65px;
        }

        &_value {
        }

        &_db-order {
            opacity: 0.3;
        }
    }
}

.vsm-value {
    &_type {
        &_pretty {
            margin-top: 0;
            margin-bottom: 0;
            font-family: monospace;
            white-space: pre-wrap;
        }

        &_plain {
            font-family: monospace;
            word-break: break-all;
        }
    }
}

.vsm-value-note {
    display: inline-block;
    margin-top: 3px;
    font-style: italic;
    opacity: 0.8;
}

.vsm-null {
    display: inline-block;
    padding: 2px 5px;
    background-color: #f0f0f0;
    border: 1px solid #aaa;
    border-radius: 4px;
}

.vsm-arrow {
    margin-left:6px;
    font-weight:bold;

    border: solid black;
    border-width: 0 2.3px 2.3px 0;
    display: inline-block;
    padding: 2.3px;
    position:relative;
    top:-1px;

    &_dir {
        &_up {
            transform: rotate(-135deg);
            -webkit-transform: rotate(-135deg);
        }

        &_down {
            transform: rotate(45deg);
            -webkit-transform: rotate(45deg);
        }
    }
}

.vsm-quote {
    opacity: 0.75;

    // see: https://stackoverflow.com/questions/190396/adding-html-entities-using-css-content
    &:before {
        content: '\0027'; // &#39; - single quote
    }
}

.vsm-pretty-code-button {
    display: inline-block;
    border:1px solid #e2e2e2;
    padding: 2px 5px;
    font-weight: bold;
    color: #2271b1;
    background-color: #fff;

    &:focus {
        box-shadow:none;
    }

    &:hover {
        cursor: pointer;
    }

    &_activated {
        /*background-color:#d3ffcb;*/
        background-color:#e2f9de;
    }
}

// Wrapper component (for toggleable values in tables)
.vsm-spoiler {
    position: relative;

    &__limiter {
        height: 100px;
        position: relative;
        overflow: hidden;
        cursor: pointer;
    }

    &__overflow {
        position: absolute;
        width: 100%;
        height: 100%;

        /* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#ffffff+0,ffffff+100&0+0,1+100,1+100 */
        background: -moz-linear-gradient(top,  rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); /* FF3.6-15 */
        background: -webkit-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Chrome10-25,Safari5.1-6 */
        background: linear-gradient(to bottom,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
    }

    &__button {
        position: relative;
        border-radius: 3px;
        border: 1px solid #777;
        padding: 5px 0;

        color: #333;
        text-align: center;
        line-height: 1;
        //background-color: #9ec5e577;

        cursor: pointer;
        user-select: none;

        &--top {
            //margin: -5px 0 7px 0;
            margin: 0 0 7px 0;
            left: 0;
            top: 0;
        }

        &--bottom {
            //margin: 7px 0 -5px 0;
            margin: 7px 0 0 0;
            left: 0;
            bottom: 0;
        }
    }
}
