@import url("../../root.css");

html {
    height: 700vh;
}

@media (max-width: 720px) {
    html {
        height: 900vh;
    }
}

body {
    background-color: var(--primary-color);
    height: 100%;
    top: 0;
}

div.main a {
    text-decoration: underline;
    color: var(--text-color);
}

div.main div.links a {
    text-decoration: none;
}

/* links */
div.links svg.github {
    width: 20px;
    height: 20px;
}

div.links svg.github path {
    fill: var(--text-color);
    transition: fill 0.2s ease;
}

div.links a:hover svg.github path {
    scale: 1.02;
    transform-origin: 10px 10px;
}

div.links a {
    display: flex;
    justify-content: center;
    align-items: center;
}

div.links span {
    margin: 0.5rem;
}

div.links {
    margin: 0.2rem 0 2rem 0;
    font-size: 0.8rem;
}

/* general main */

span.figtitle {
    font-weight: 500;
    font-style: italic;
}

div.explainer {
    display: inline-block;
    text-decoration: underline dotted;
}

div.main a:hover {
    font-weight: 700;
}

div.main a.ref-number {
    text-decoration: none;
}


body, html {
    pointer-events: auto;
}

.container {
    pointer-events: auto;
}

.main {
    padding-top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main h1, h2, span {
    display: inline-block;
    margin: 1rem 20vw 1rem;
}

button {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    border-radius: 5px;
}

button:hover {
    transition: 0.5s font-weight;
    font-weight: 700;
}

div.tooltip {
    position: absolute;
    padding: 0.5rem;
    background-color: var(--primary-color);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    max-width: 300px;
}

/* Year selector radio buttons */
div.year-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
    border: 1px solid var(--text-color);
    border-radius: 5px;
}

div.year-selector label {
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

div.year-selector label:hover {
    font-weight: 700;
}

div.year-selector input[type="radio"] {
    appearance: none;
    background-color: #fff;
    margin: 0;
    margin-right: 0.5rem;
    font: inherit;
    color: currentColor;
    width: 1em;
    height: 1em;
    border: 0.1em solid currentColor;
    border-radius: 50%;
}

div.year-selector input[type="radio"]::before {
    display: inline-block;
    content: "";
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em steelblue;
}

div.year-selector input[type="radio"]:checked::before {
    transform: scale(1) translateY(-0.22em) translateX(0.065em);
}

/* General SVG */
svg:not(.github) {
    min-height: 400px;
    min-width: 300px;
}

div.technical-bid-offer-container {
    display: flex;
    justify-content: space-around;
    flex-direction: row;
    width: 100%;
}

svg.bid-offer {
    flex: 5;
}

div.technical-bid-offer-container svg.bo-graph {
    flex: 5;
}

div.aggregate-curtailment {
    display: flex;
    justify-content: space-around;
    flex-direction: row;
    width: 100%;
}

div.aggregate-curtailment svg.bar-chart {
    flex: 3;
    height: 600px;
}

div.aggregate-curtailment svg.map {
    flex: 2;
    height: 600px;
}

div.main-skip-rate-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

svg.skip-rate {
    width: 90%;
    height: 600px;
}

div.month-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    gap: 0.5rem;
}

div.month-slider-container label {
    font-size: 1rem;
    color: var(--text-color);
}

div.month-slider-container input[type="range"] {
    width: 60%;
    max-width: 400px;
    height: 6px;
    background: var(--text-color);
    border-radius: 5px;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

div.month-slider-container input[type="range"]:hover {
    opacity: 1;
}

div.month-slider-container input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--text-color);
    cursor: pointer;
    border-radius: 50%;
}

div.month-slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--text-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}


div.aggregate-extra {
    display: flex;
    justify-content: space-around;
    flex-direction: row;
    width: 100%;
}

svg.bar-chart {
    flex: 1;
    height: 600px;
}
svg.map {
    flex: 1;
    height: 600px;
}

.bottom-line {
    width: 30vw;
    border: 0.5px solid var(--text-color);
    margin: 4rem 0;
}

div.references {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

div.references > span {
    margin-top: 0;
}

svg.yearly-cost {
    width: 90vw;
}

div.replacement-by-fuel-type {
    width: 100%;
    display: flex;
    justify-content: center;
}

svg.replacement-by-fuel-type {
    width: 90vw;
    min-width: 300px;
    height: 500px;
}

div.main-beatrice-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

svg.beatrice, svg.system-vs-beatrice {
    width: 90vw;
    min-width: 300px;
    height: 400px;
}

div.technical-system-prices {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

svg.system-prices {
    width: 90vw;
    min-width: 300px;
    height: 500px;
}

div.main-dispatch-times-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

svg.dispatch-times {
    width: 90vw;
    min-width: 300px;
    height: 600px;
}

@media (max-width: 1280px) {
    .main h1, h2, span {
        margin: 1rem 5vw 1rem;
    }

}

@media (max-width: 960px) {
    div.year-selector {
        display: grid;
        justify-content: center;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    svg.bid-offer {
        width: 90vw;
        font-size: 0.75rem;
        align-self: center;
    }

    div.technical-bid-offer-container {
        flex-direction: column;
        justify-content: center;
    }

    div.technical-bid-offer-container svg.bo-graph {
        width: 90vw;
        align-items: center;
    }

    div.aggregate-curtailment {
        flex-direction: column;
    }

    div.aggregate-curtailment svg {
        width: 100vw;
        min-height: 80vh;
        align-self: center;
    }

    div.aggregate-extra {
        flex-direction: column;
    }

    div.aggregate-extra svg {
        width: 100vw;
        min-height: 80vh;
        align-self: center;
    }

}