@import "./reset.less";
@import "./fonts/Helvetica/helvetica.css";
@import "./fonts/Inconsolata/inconsolata.css";

*, *:before, *:after {
    /* OMG YES YOU CAN UNBREAK THE BOX MODEL <3 <3 <3 <3 <3 <3 */
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    color: #222;
    margin: 0;
    padding: 0;
    border: 0;
    font-family: "Helvetica Neue LT Std";
    font-size: 48pt;
    line-height: 1.2em;
    visibility: visible;
}

p, a, li, li:before, h1, h2, h3, h4, h5, h6 {
    text-shadow: 0 0 0.1em rgba(0,0,0,0.5);
}

h1, h2, h3, h4, h5, h6 {
    text-align: center;
    font-weight: bold;
    background-color: rgba(0,0,0,0.1);
    margin: 0.4em -100%;
}

h1 {
    font-size: 1.6em;
    padding-top: 0.25em;
}

h2 {
    font-size: 1.4em;
    padding-top: 0.3em;
}

h3 {
    font-size: 1.2em;
    padding-top: 0.3em;
}

h4, h5, h6 {
    font-size: 1.1em;
    padding-top: 0.3em;
}

ul, ol {
    li {
        list-style: none;
        position: relative;

        &:before {
            color: #888;
            text-align: right;
            position: absolute;
            left: 0;
        }
    }
}

ul {
    li:before {
        content: ' ';
        width: 1em;
        height: 1em;
        margin-left: -1em;
        background: url(doge.svg);
        background-size: contain;
    }
}

strong {
    letter-spacing: 0.05em;
}

a {
    color: black;
}

.attribution {
    font-size: 0.9em;
}

#slides {
    z-index: 1;
    position: fixed;
    background: #ccc;
}

#slides, #slides .background {
    background-size: cover;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

#slides .background {
    z-index: 2;
    position: absolute;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    -moz-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;

    &.active {
        opacity: 1;
    }
}

#slides section {
    background-color: rgba(255, 255, 255, 0.8);
    background-size: cover;
    background-position: 50% 50%;

    z-index: 10;
    visibility: hidden;
    position: absolute;
    width: 80%;
    height: 80%;
    left: 10%;
    top: 10%;
    margin: 0;
    padding: 0 10%;
    border: 0;
    border-radius: 0.2em;

    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    -moz-box-pack: center;
    -moz-box-align: center;
    box-pack: center;
    box-align: center;

    opacity: 0;
    -webkit-transform: scale(1.25);
    -webkit-filter: grayscale(100%);
    -webkit-transition: -webkit-filter 0.3s ease, -webkit-transform 0.3s ease, opacity 0.3s ease;
    -moz-transform: scale(1.25);
    -moz-filter: grayscale(100%);
    -moz-transition: -moz-filter 0.3s ease, -moz-transform 0.3s ease, opacity 0.3s ease;
    transform: scale(1.25);
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;

    .slideContainer {
        width: 100%;
    }

    &.current, &.out {
        visibility: visible;
    }

    &.current {
        opacity: 1;
        -webkit-filter: grayscale(0);
        -webkit-transform: scale(1);
        -moz-filter: grayscale(0);
        -moz-transform: scale(1);
        filter: grayscale(0);
        transform: scale(1);
    }

    &.out {
        -webkit-transform: scale(0.75);
        -moz-transform: scale(0.75);
        transform: scale(0.75);
    }

    &.editor {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        background: none;

        .editorFrame, .targetFrame {
            position: absolute;
            width: 50%;
            height: 100%;
            top: 0;
            padding: 0.5em;
        }

        .editorFrame {
            left: 0;
            padding-right: 0;
        }

        .targetFrame {
            left: 50%;
        }

        .targetFrame iframe {
            z-index: 14;
            background-color: #444;
            background-image: url(doge.svg);
            background-size: contain;
            background-repeat: no-repeat;
            background-position: 50% 50%;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        .loaderFrame {
            z-index: 15;
            background: #444;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        .CodeMirror {
            font-family: "Inconsolata";
            line-height: 1.2em;
            font-size: 0.5em;

        }

        .CodeMirror, .loaderFrame, .targetFrame iframe {
            box-shadow: 0 0.1em 0.2em rgba(0, 0, 0, 0.6);
            border-radius: 0.1em;
        }
    }

    &.photo {
        background-size: contain;
        background-color: rgba(0,0,0,0);
        background-repeat: no-repeat;
    }

    &.white {
        text-align: center;

        h1, h2, h3, h4, h5, h6, p, a {
            color: white;
            text-shadow: 0 -0.05em 0.1em black, 0 0.05em 0.1em black, 0 0.1em 0.3em black;
            background: none;
            font-weight: normal;
        }
    }

    &.align-bottom {
        -webkit-box-pack: end;
        -webkit-box-align: end;
        -moz-box-pack: end;
        -moz-box-align: end;
        box-pack: end;
        box-align: end;
        padding-bottom: 0.5em;
    }

    &.erlang-the-movie {
        h1, h2, h3, h4, h5, h6, p, a {
            font-weight: bolder;
            -webkit-transform: scale(0.8, 1);
            -moz-transform: scale(0.8, 1);
            transform: scale(0.8, 1);
            margin: 0;
        }
        p {
            font-size: 0.9em;
            margin: 0 -6em;
        }
    }
}

/* CodeMirror extras for the editor plugin */

.CodeMirror-hints,
.CodeMirror-Tern-tooltip {
    font-family: "Inconsolata";
    line-height: 1.2em;
    font-size: 0.5em !important;
    text-shadow: none;

    & li {
        text-shadow: none;
    }
}

.cm-errors {
    width: 1em;
}

.cm-error {
    width: 1em;
    height: 1em;
    background: url(red-doge.svg);
    background-size: contain;
}
