/*
    Additional formatting for the real page content; i.e. text in the <main> element
    We cannot put these styles in the tags.styl file because they don't apply to the entire layout
*/

$table-blue = #d4dde4;

.text-content {

    /* tables */
    table {
        border-collapse: collapse;
        border: solid #e0e0dc;
        border-width: 1px 0 0 1px;

        &.topicpage-table {
            clear: both;
            width: auto;

            td {
                padding: 10px;
                vertical-align: top;
                width: 50%;
            }

            small {
                font-size: $smaller-font-size;
            }
        }

        &.standard-table {
            border: 2px solid #fff;

            td {
                background-color: rgba($table-blue, 0.15);
                border: @border;
                box-shadow: inset 0 -1px 0 0 rgba($table-blue, 0.5);
            }

            td.header, th {
                border: @border;
                border-bottom: 2px solid rgba($table-blue, 1);
                background: rgba($table-blue, 0.5);
                font-family: 'Open Sans Light', sans-serif;
                font-size: 14px;
                padding: 2px 8px 4px;
                font-weight: bold;
            }
        }

        &.fullwidth-table {
            background: #fff;
            border: 1px solid rgba($table-blue, 0.5);
            margin-bottom: $grid-spacing;
            width: 100%;

            td {
                border: 1px solid #ccc;
                padding: 5px 15px;
                text-align: left;
                vertical-align: top;
            }

            td.header, th {
                background: rgba($table-blue, 0.5);
                border: 1px solid rgba($table-blue, 1);
                font-weight: bold;
                padding: 0 5px;
            }
        }
    }

    td, th {
        border: solid #e0e0dc;
        border-width: 0 1px 1px 0;
        padding: 6px;
        text-align: start;
    }

    thead th {
        background: rgba($table-blue, 0.5);
    }

    /* lists and definitions */
    ul {
        list-style: disc;

        ul {
            list-style: circle;
        }
    }

    ul ul, ol ol, ul ol, ol ul {
        margin-bottom: 0;
        padding-top: 6px;
    }

    ul, ol {
        bidi-style(padding-left, ($grid-spacing * 2), padding-right, 0);
        margin-bottom: $content-block-margin;

        &.no-bullets {
            list-style-type: none;
            bidi-style(padding-left, 0, padding-right, 0);
        }
    }

    ol {
        list-style-type: decimal;
    }

    li {
        padding-bottom: 6px;
    }
    prevent-last-child-spacing(li, padding-bottom);

    dt {
        font-style: normal;
        font-weight: bold;
    }

    dd {
        margin-bottom: $content-block-margin;
        padding-left: $grid-spacing;
    }

    span.alllinks {
        display: block;
        text-align: right;
    }

    img {
        &.lwrap {
            padding: 0 20px 10px 0;
        }
        &.rwrap {
            padding: 0 0 10px 20px;
        }
    }

    .originaldocinfo, .licenseblock {
        background: #f1f1f1;
        border: 1px solid #ccc;
        font-family: Verdana, Tahoma, sans-serif;
        font-size: $smaller-font-size;
        padding: 10px;
    }

    .originaldocinfo {
        h2 {
            font-size: $base-font-size;
        }

        ul {
            margin: 0;
        }
    }

    .licenseblock {
        p {
            margin-bottom: @padding;
            &:last-child {
                margin-bottom: 0;
            }
        }
    }
}

ul.directory-tree {
    padding-left: 0;

    &, ul {
        list-style-type: none;
        padding-top: 0;
    }
    ul {
        padding-left: 0;
        background: url($media-url-dir + 'tree-vline.png') repeat-y;

        li {
            padding-left: 16px;
            background: url($media-url-dir + 'tree-node.png') no-repeat;
        }
    }

    li {
        padding-bottom: 0;
    }
}

.notice {
    position: relative;
    top: -($grid-spacing / 2);
    background: #fcf6d4;
    border: 1px solid #e5d5c1;
    box-shadow: 1px 1px 0 rgba(0,0,0,.1);
    clear: both;
    margin: ($grid-spacing / 2) 0 ($grid-spacing / 4);
    padding: ($grid-spacing / 2) ($grid-spacing * .75) 0;

    p, ul {
        margin-bottom: ($grid-spacing / 2);
    }

    &.success {
        background: #effdfb;
        border-color: #beede5;
    }

    &.error {
        border-color: #e1a696;
    }
}

ul.tagit {
    li.tagit-new {
        border-radius: 2px;
        display: inline-block;
        padding: 3px 4px 4px 10px;

        input {
            background: transparent;
            border: 0;
            padding: 0;
        }
    }

    li.tagit-choice {
        background: #f9f9f9;
        border: 1px solid #dbd9d1;
        border-radius: 2px;
        display: inline-block;
        margin: 0 10px 10px 0;
        padding: 3px 4px 4px 10px;

        .close {
            margin-left: 4px;

            .text-icon {
                display: none;
            }

            .ui-icon-close {
                background: url('../img/icn-delete.png') center -96px no-repeat;
                cursor: pointer;
                display: inline-block;
                height: 15px;
                margin: 0 0 -3px 0;
                margin-left: 3px;
                overflow: hidden;
                text-indent: -9999px;
                width: 15px;
            }

            &:hover, &:focus, &:active {
                .ui-icon-close {
                    background-position: center -146px;
                }
            }
        }
    }
}

.ui-helper-hidden-accessible {
    display: none;
}

.ui-autocomplete {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-top: 0;
    cursor: default;
    padding-top: 2px;
    position: absolute;
    vendorize(box-shadow, 1px 1px 1px rgba(0,0,0,.08));
}

.ui-menu {
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;

    .ui-menu-item {
        clear: left;
        float: left;
        margin: 0;
        padding: 0;
        width: 100%;
        zoom: 1;

        a {
            display: block;
            line-height: 1.5;
            text-decoration: none;
            zoom: 1;
        }
    }

    .ui-state-hover, .ui-state-focus, .ui-state-highlight, .ui-state-active {
        background: #e4e4d9;
        background: rgba(198,198,175,.2);
    }
}

div.bug {
    font-style: italic;
}

div.callout-box {
    background: #fafafa;
    border: 1px solid #eee;
    float: right;
    margin: 0 0 8px 15px;
    padding: 10px;
    position: relative;
    text-align: center;
    width: 200px;
    z-index: 2;
}

p.footnote {
    font-size: $smaller-font-size;
    font-style: italic;
    color: #716d65;
}

div.tip {
    border: 1px solid #e1f5f0;
    padding: 10px 15px;
    color: #6d675f;
}

/* Classes created by the WYSIWYG */
.twocolumns {
    vendorize(column-count, 2);
}
.threecolumns {
    vendorize(column-count, 3);
}

ul.errorlist {
    color: #900;
    font-weight: bold;

    li {
        margin: 5px 0;
    }
}
