/* Local copy of CSS from Veautiful project */

.move-content-down {
    padding-top: 48px;
}

.sidebar {
    background: #f9f9ff;
    padding: 5px;
}

svg {

}


.resizable {
    min-height: 480px;
    resize: both;
    overflow: hidden;
    margin-right: 0.25rem;
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,0.125);
    position: relative;
    left:0;
    top:0;
}


/**
 * Course template
 */


.front-page {
    padding-top: 48px;
}

.course-banner {
    height: 120px;
    border-bottom: 1px solid lightgray;
}

.topic-container {
    display: flex;
    flex-wrap: wrap;
}

.topic-container .topic-block {
    position: relative;
    width: 320px;
    height: 200px;
    margin: 20px;
    border: 1px solid lightgray;
}

.topic-block .topic-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    color: white;
    background: rgba(0,0,0, 0.7);
}

.topic-block .topic-image {
    width: 100%;
    height: 100%;
    background: cornflowerblue;
}

.topic-block .topic-image {
    background-image: url("circuit.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.topic-block a:hover .topic-image {
    box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.7);
}

.topic-block .topic-completion {
    position: absolute;
    right: 0;
    top: 0;
    padding: 5px;
    color: white;
    font-family: monospace;
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid white;
}


/*
 * Veautiful - Challenge layout
 */

/*
 * Layout stuff
 */


:root {
    --challenge-header-height: 50px;
    --challenge-header-fontsize: 26px;
    --challenge-header-background: #444;
    --challenge-header-color: white;

    --challenge-header-icon-bg: #d1e7b5;
    --challenge-header-icon-bg-hover: #aed083;
}

.challenge-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: var(--challenge-header-height) 1fr 70px;
    height: 100%;
}

.challenge-wrapper .challenge-header {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 1;
    border-bottom: 1px solid lightgrey;
    background: var(--challenge-header-background);
    color: var(--challenge-header-color);
}

.challenge-wrapper .challenge {
    grid-column-start: 1;
    grid-row-start: 2;
}

.challenge-wrapper .stage-progress {
    grid-column-start: 2;
    grid-row-start: 2;
    grid-row-end: 4;
    border-left: 1px solid lightgrey;
    height: 100%;
}

.challenge-wrapper .countdown-box {
    border-left: 1px solid lightgrey;
    border-bottom: 1px solid lightgrey;
    grid-column-start: 2;
    grid-row-start: 1;
    background: var(--challenge-header-background);
}

.challenge-wrapper .page-controls {
    grid-column-start: 2;
    grid-row-start: 3;
    text-align: center;
    padding: 10px;
    border-left: 1px solid lightgray;
}

.split2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.split-top-right {
    align-items: start;
}

/*
 * Countdown timer
 */

.countdown {
    text-align: center;
    font-size: 60px;
    font-family: MONOSPACE;
}

/*
 * Progress block
 */

.stage-progress .progress-level {
    padding: 10px;
    border-bottom: 1px solid lightgray;
}

.stage-progress .progress-level a {
    color: inherit;
    text-decoration: none;
}

.stage-progress .progress-level a:hover {
    color: cadetblue;
}

.stage-progress .progress-level.level-active a {
    color: white;
}


.stage-progress .progress-level.level-active {
    color: white;
    background-color: #7d5177;
}

.stage-progress .level-name {
    font-family: 'Michroma', sans-serif;
}

.stage-progress .progress-level a.stage-link.stage-active {
    color: cadetblue;
}
.stage-progress .progress-level a.stage-link.complete {
    color: goldenrod;
}


.level-label img {
    max-height: 30px;
}

.stage-progress-label .stagenumber {
    font-size: 20px;
    margin-right: 5px;
    width: 25px;
    display: inline-flex;
}

.stage-progress-label .stagename {
    font-size: 20px;
}

/*
 * Challenge headers
 */


.challenge-header .home-link {
    margin-right: var(--challenge-header-height);
    font-size: var(--challenge-header-fontsize);
    line-height: var(--challenge-header-height);
    font-family: 'Michroma', sans-serif;
    background-color: var(--challenge-header-icon-bg);
    border-right: 2px solid white;
    float: left;
    width: 72px;
}
.challenge-header .home-link:hover {
    background-color: var(--challenge-header-icon-bg-hover);
}

.challenge-header .challenge-name {
    font-family: 'Michroma', sans-serif;
    font-size: var(--challenge-header-fontsize);
    line-height: var(--challenge-header-height);
}


.circuits-up-symbol {
    stroke: var(--challenge-header-color);
    fill: none;
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    max-height: var(--challenge-header-height);
    max-width: 64px;
    padding: 4px;
    background: none
}

/*
 * Layouts within Challenge pages
 */

.text-column {
    margin-top: 50px;
    margin-left: 50px;
    margin-right: 50px;
}

h1, h2, h3, h4 {
    font-family: 'Michroma', sans-serif;
    margin-bottom: 1rem;
}


@keyframes pulse-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(142, 68, 173, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0);
    }
}


.pulse-link {
    animation: pulse-purple 2s infinite;
}

/*
 * Charts
 */

.scatterplot line {
    stroke: black;
}

.scatterplot .tick-label-y {
    dominant-baseline: middle;
    text-anchor: end;
    font-size: 0.9em;
}

.scatterplot .axis-label-x {
    text-anchor: end;
    font-size: 0.9em;
}

.scatterplot .axis-label-y {
    transform: rotate(270deg) translate(0, -45px);
    text-anchor: end;
    font-size: 0.9em;
}

.scatterplot .tick-label-x {
    text-anchor: middle;
    font-size: 0.9em;
}

.scatterplot .plot-point {
    stroke: blueviolet;
    fill: darkviolet;
}


/* Topic  block css */

.topic-block.circuits .topic-image {
    background-image: url("circuit.png");
}
.topic-block.mosfets .topic-image {
    background-image: url("pmos.png");
}


/*
 * Will Scala specific
 */
.course-banner {
    height: auto;
    position: relative;
    top: 0;
}
.course-banner img {
    max-width: 100%;
}
.course-banner .white-translucent-bg {
    padding: 2px;
    background: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.abs-bottom-right {
    position: absolute;
    bottom: 0px;
    right: 0px;
}


.topic-image.imperative {
    background-image: url("images/imperative.png");
    background-color: white;
}

.topic-image.functional {
    background-image: url("images/functional.png");
    background-color: white;
}

.topic-image.higher-order {
    background-image: url("images/lambdagift.png");
    background-color: white;
}


.challenge-header a.home-link {
    width: 60px;
    height: var(--challenge-header-height);
    background-image: url(images/hat.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


/*
   Ace
 */
.ace-editor-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.ace-editor,.ace-editor-unscaler {
    position: relative;
    height: 100%;
    width: 100%;
}

