// Local URL
@import (optional) "../../../../../modules/backend/assets/less/core/boot.less";
@import (optional, reference) "../../../../../modules/system/assets/ui/less/callout.less";
// Symlink URL
@import (optional) "../../../winter/modules/backend/assets/less/core/boot.less";
@import (optional, reference) "../../../winter/modules/system/assets/ui/less/callout.less";

// Reference the callout UI

@padding-container: 0;
@spacing: 40px;

#docs-content {
    padding: 0 0 @spacing 0;

    > *:first-child {
        margin-top: 0;
    }

    > a[name]:first-child + * {
        margin-top: 0;
    }

    h1 { font-size: @font-size-h1 - 8; }
    h2 { font-size: @font-size-h2 - 6; }
    h3 { font-size: @font-size-h3 - 4; }
    h4 { font-size: @font-size-h4 - 1; }

    h1, h2 {
        margin-top: @spacing;
        padding-bottom: (@spacing / 4);
        margin-bottom: (@spacing / 2);
        border-bottom: 1px solid #ddd;
    }

    h3, h4, h5, h6 {
        margin: (@spacing / 2) 0;
    }

    img {
        max-width: 100%;
    }

    ul, ol {
        padding-left: @padding-standard;
    }

    code {
        display: inline-block;
        padding: 1px 4px;
        background: #fdfdfd;
        border: 1px solid #e5e5e5;
        border-radius: 3px;
        color: @brand-secondary;
    }

    pre {
        position: relative;
        display: block;
        border: none;
        margin: (@spacing / 2) 0;
        padding: 10px 10px 10px (@padding-standard + @padding-container);
        font-size: 13px;
        word-break: break-all;
        word-wrap: break-word;
        color: #fff;
        background-color: #2c2f38;

        code {
            display: inline;
            padding: 0;
            background: none;
            border: none;
            border-radius: 0;
            font-size: inherit;
            color: inherit;
            white-space: pre-wrap;
            background-color: transparent;
            border-radius: 0;
        }
    }

    ul pre,
    ol pre {
        margin-left: -((@padding-standard * 2) + @padding-container);
        padding-left: ((@padding-standard * 2) + @padding-container);
    }

    table {
        margin: (@spacing / 2) 0;

        th {
            font-weight: bold;
        }

        th, td {
            padding: 6px 13px;
            border: 1px solid #ddd;
        }

        tr {
            background-color: #fff;
            border-top: 1px solid #ccc;

            &:nth-child(2n) {
                background-color: #f8f8f8;
            }
        }
    }

    dl {
        dt, dd {
            margin-bottom: (@padding-standard / 2);
        }
        dt {
            width: 75px;
            float: left;
            text-align: right;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        dd {
            margin-left: 85px;
        }
    }

    /**
     * Notes
     */
    blockquote {
        font-size: @font-size-base - 1;
        margin-bottom: @line-height-computed;
        color: #2f2d26;
        padding: 16px 20px 15px;

        background: white;
        border: 2px solid @callout-info-content-bg;

        h1, h2, h3, h4, h5, h6 {
            color: #2f2d26;
            text-transform: none;
            margin: 20px 0 5px 0;
            line-height: 150%;
        }

        h1 { font-size: 30px; }
        h2 { font-size: 26px; }
        h3 { font-size: 24px; }
        h4 { font-size: 20px; }
        h5 { font-size: 18px; }
        h6 { font-size: 16px; }
    }

    /**
     * Toolbar
     */
    .code-toolbar {
        position: absolute;
        top: 7px;
        right: 10px;
        background: rgba(0, 0, 0, 0.8);
        padding: 0 5px;
        z-index: 10;
        border-radius: 5px;
        opacity: 0;

        transition: opacity 175ms ease;

        a {
            display: inline-block;
            height: 25px;
            width: 25px;
            color: #666;
            font-size: 14px;
            line-height: 25px;
            text-align: center;
            text-shadow: 0 0 5px #000;
            text-decoration: none;

            &:hover {
                color: #fff;
            }
        }

        &:hover {
            opacity: 1 !important;
        }
    }

    pre:hover {
        .code-toolbar {
            opacity: 0.6;
        }
    }
}
