@import url('https://fonts.googleapis.com/css2?family=Martel:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Martel+Sans:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;900&display=swap');

/* Define unified font sizes via CSS Custom Properties */
:root {
    --font-base: 17px;
    --font-h1: 1.3rem;
    --font-h2: 1rem;
    --font-p: 0.9rem;
    --logo-height: 22px;

    --logo-height-multiplier: 1;
}

@media (max-width: 1024px) {
    :root {
        --font-base: 16px;
        --font-h1: 1.2rem;
        --font-h2: 0.9rem;
        --font-p: 0.8rem;
        --logo-height: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-base: 15px;
        --font-h1: 1.1rem;
        --font-h2: 0.8rem;
        --font-p: 0.7rem;
        --logo-height: 17px;
    }
}

body {
    font-family: 'Martel', sans-serif;
    font-size: var(--font-base);
    user-select: none;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

img {
    user-drag: none;
    -webkit-user-drag: none;
    object-fit: contain;
    float: right;
}

#logo {
    height: var(--logo-height);
    padding: 4px;
}

:not(:root):fullscreen::backdrop {
    background: white;
}

/* Use unified sizes for headlines */
#headline-h1,
h1 {
    /*font-family: 'Martel', serif;*/
    font-weight: 900;
    font-size: var(--font-h1);
    margin: 0;
    padding-top: 12px;
    padding-bottom: 0;
    padding-left: 32px;
}

#headline-h2,
h2 {
    /*font-family: 'Martel', serif;*/
    font-weight: 700;
    font-size: var(--font-h2);
    margin: 0;
    padding-top: 0;
    padding-left: 32px;
    padding-bottom: 8px;
}

p {
    font-size: var(--font-p);
}

svg {
    max-width: 100%;
    height: auto;
}

button {
    margin: 10px;
}

#chart-container {
    display: flex;
    justify-content: center;
}

.helgichart-topDiv {
    flex-grow: 1;
    background-color: #fafafa;
    /*background: linear-gradient(to right, #E0E0E0 0%, #fafafa 95%);*/
}

.helgichart-bottomDiv {
    display: flex;
    background-color: #fafafa;
    width: 100%;
    height: 30px;
    color: white;
    align-items: center;
    justify-content: space-between;
    padding: 2px;
    padding-right: 10px;
}

input#slider {
    flex-grow: 1;
    width: auto;
}

.helgichart-icon {
    cursor: pointer;
    font-size: 16px;
    color: #fabf32;
    transition: color 0.2s;
    padding: 12px;
}

.helgichart-icon:hover {
    color: #e1ab2d;
}

.helgichart-icon:active {
    color: #c89828;
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
}

.chart-container {
    flex: 1;
}

#main {
    height: 100%;
    width: 100%;
}

/* Chrome */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    input[type='range'] {
        overflow: hidden;
        -webkit-appearance: none;
        background-color: #c89828;
        border-radius: 18px;
    }

    input[type='range']::-webkit-slider-runnable-track {
        height: 12px;
        -webkit-appearance: none;
        margin-top: -1px;
    }

    input[type='range']::-webkit-slider-thumb {
        width: 11px;
        -webkit-appearance: none;
        height: 11px;
        margin-top: 1px;
        border-radius: 50%;
        cursor: ew-resize;
        background: #434343;
        box-shadow: -1600px 0 0 1592px #fabf32;
    }
}

/* Firefox */
input[type="range"]::-moz-range-progress {
    background-color: #c89828;
}

input[type="range"]::-moz-range-track {
    background-color: #c89828;
}

/* IE */
input[type="range"]::-ms-fill-lower {
    background-color: #c89828;
}

input[type="range"]::-ms-fill-upper {
    background-color: #c89828;
}

@media (min-width: 600px) {
    /* On wider screens, hide bubble by default and show when slider is hovered */
    #slider-bubble {
        display: none;
        position: absolute;
        top: -18px;
        left: 0;
        background: #6e6e6e;
        border: 1px solid #ccc;
        padding: 2px 5px;
        border-radius: 4px;
        font-size: 12px;
    }
    /* Use general sibling selector to ensure the bubble is selected even if not an immediate sibling */
    input#slider:hover ~ #slider-bubble {
        display: block;
    }
}

@media (max-width: 599px) {
    /* On narrow screens, show bubble always */
    #slider-bubble {
        display: block;
        position: absolute;
        top: -18px;
        left: 0;
        background: #6e6e6e;
        border: 1px solid #ccc;
        padding: 2px 5px;
        border-radius: 4px;
        font-size: 12px;
    }
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1000;
    transition: opacity 0.2s;
}

.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.helgichart-select-type {
    display: inline-flex;
    margin-left: 30px;
    margin-bottom: 16px;
    padding: 0;
    border-radius: .25rem;
    background-color: #ffffff8e;
    color: #ffffff;
}

.helgichart-select-type-button {
    font-size: 12px;
    padding: 8px;
    padding-top: 13px;
    padding-bottom: 12px;
    margin: 0;
    border: none;
    background-color: transparent;
    border-radius: .25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.helgichart-select-type-button:hover {
    background-color: #00000011;
}

.helgichart-select-type-button.active {
    background-color: #0000000c;
}

.fa-brands {
    padding: 2px;
    margin: 0;
    font-size: 1.5rem;
    transition: color 0.1s;
}

.fa-brands:hover {
    color: #fabf32;
}

.fa-brands:active {
    color: #e1ab2d;
}

.social-panel {
    float: right;
    margin-right: 10px;
    margin-left: 10px;
}