:root {
    --primary-color: rgb(85, 85, 85);
    --secondary-color: black;
    --background-color: rgb(245, 245, 245);
    --header-color: rgb(235, 235, 235);

    --width-of-switch: 3.5em;
    --height-of-switch: 2em;
    --size-of-icon: 1.4em;
    --slider-offset: 0.3em;
}

:root.dark {
    --primary-color: rgb(210, 210, 210);
    --secondary-color: white;
    --background-color: rgb(45, 45, 45);
    --header-color: rgb(25, 25, 25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--background-color)
}

p {
    color: var(--primary-color);
}

h3 {
    margin-bottom: -15px;
    color: var(--secondary-color)
}

footer {
    text-align: end;
    color: var(--primary-color);
    padding: 0px 15px;
}

.gavel-slots-title {
    margin-top: 0px;
}

.page-content {
    padding: 15px;
}

.gavel-container > li > input {
    width: 35px;
    background-color: var(--background-color);
}

.score {
    color: var(--primary-color);
}

.score-hr {
    margin-top: 25px;
}

.submit {
    width: 200px;
    margin-bottom: 10px;
    color: var(--primary-color);
    background-color: var(--background-color);
}

.gavel-container {
    outline: 1px dashed var(--primary-color);
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    position: relative;
}

.gavel-container > li {
    display: grid;
    grid-template-columns: 1fr 40px 20px;
    margin-bottom: 5px;
}

.gavel-container > li input {
    justify-self: end;
    color: var(--primary-color);
}

.hidden-slot {
    display: none;
}

.add-slot {
    width: 200px;
    height: 500px;
    flex: 0 0 100px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.gavel {
    width: 200px;
    flex: 0 0 200px;
}

.percent {
    margin-left: 3px;
    margin-top: 1px;
    color: var(--primary-color)
}

.score-container {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 5px;
}

.emoji-container {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-bottom: 8px;
    margin-left: 5px;
}

.gavel-img {
    width: 30px;
    height: 30px;
    margin-left: 15px;
}

.remove-slot {
    background-color: red;
    opacity: 0.2;
    color: var(--primary-color);
    position: absolute;
    right: -10px;
    top: -10px;
    width: 24px;
    height: 24px;
}

.remove-slot:hover {
    opacity: 0.5;
}

.site-header {
    background-color: var(--header-color);
    padding: 8px 15px;
    border-bottom: 1px solid var(--primary-color);

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;

    width: 100%;
    min-width: 0;

    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 45px;
}

.pinecone-logo {
    justify-self: end;
    width: 64px;
    height: 64px;
}

.site-header h1 {
    margin: 5px 0px;
    font-size: 32px;
    color: var(--primary-color);
}

.site-header p {
    margin: 5px 0px;
    font-size: 20px;
    opacity: 0.8;
}


/* SLIDER CSS, source: https://github.com/Vetrivel-VP/html-css-web-ui-components-for-free/tree/main/Buttons/toggle-switch-button */
.switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.switch {
    display: block;
    position: relative;
    width: var(--width-of-switch);
    height: var(--height-of-switch);
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f4f4f5;
    transition: 0.4s;
    border: 1px dashed var(--primary-color);
    border-radius: 30px;
}

.slider::before {
    position: absolute;
    content: "";
    height: var(--size-of-icon, 1.4em);
    width: var(--size-of-icon, 1.4em);
    border-radius: 20px;
    left: var(--slider-offset, 0.3em);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(40deg, yellow, orange 70%);
    transition: 0.4s;
}

.slider-input:checked + .slider {
    background: #303136;
}

.slider-input:checked + .slider::before {
    left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider-offset, 0.3em)));
    background: #303136;

    /* chnage the value of the second inset in boxshadow to change the angle and direction of the moon */
    box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}


#add-slot {
    width: 60px;
    height: 60px;
    border-radius: 30%;
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
    font-size: 35px;
    cursor: pointer;
    background-color: var(--background-color);
}

#gavel-div {
    display: flex;
    gap: 45px;
    align-items: flex-start;
    margin-top: -15px;
}

#gavel-info-container {
    outline: 1px dashed var(--primary-color);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    width: 100%;
    color: var(--primary-color)
}

#gavel-info {
    margin-top: -15px;
}



@media (max-width: 500px) {
    h1 {
        font-size: 24px;
    }

    .site-header h1 {
        font-size: 28px;
    }

    .site-header p {
        font-size: 16px;
    }

    .site-header > img {
        width: 64px;
        height: 64px;
    }

    .gavel-container {
        width: 100%;
        min-width: 0;
    }

    .gavel, .add-slot {
        width: 90%;
        flex: 0 0 auto;
    }

    .add-slot {
        height: 100px;
        padding-bottom: 20px;
    }

    .remove-slot {
        width: 32px;
        height: 32px;
        right: -15px;
        top: -15px;
    }

    .submit {
        width: 100%;
        min-height: 30px;
    }

    .gavel-container > li > input {
        min-width: 50px;
    }

    .header-logo {
        gap: 15px;
    }

    #gavel-div {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    #gavel-info-container {
        max-width: 100%;
    }
}



.silver > .color {
    color: rgb(173, 173, 173);
}

.gold > .color {
    color: gold;
}

.corrupted > .color {
    color: limegreen;
}

.diamond > .color {
    color: deepskyblue;
}

.gem > .color {
    color: magenta;
}

.chrome > .color {
    color: gray;
    animation: mutationPulse 3s infinite;
}

.hologram > .color {
    color: cyan;
    animation: mutationPulse 2.5s infinite;
}

.void > .color {
    color: darkviolet;
    animation: void 3s infinite;
}

.secret > .color {
    color: rgb(227, 0, 0);
    animation: secret 3s infinite
}

.rainbow > .color {
    color: #ff6b6b;
    animation: rainbow 7s infinite;
}

.onyx > .color {
    color: black;
    animation: onyx 4s infinite;
}

@keyframes secret {
    0%, 100% {
        text-shadow:
            0 0 1px lightcoral,
            0 0 2px lightcoral,
    }

    50% {
        text-shadow:
            0 0 2px lightcoral,
            0 0 4px lightcoral;
    }
}

@keyframes onyx {
    0%, 100% {
        text-shadow:
            0 0 1px var(--primary-color),
            0 0 2px var(--primary-color),
    }

    50% {
        text-shadow:
            0 0 2px var(--primary-color),
            0 0 4px var(--primary-color);
    }
}

@keyframes mutationPulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.33;
    }
}

@keyframes void {
    0%, 100% {
        color: #E8B6FF
    }

    15%, 90% {
        color: #D580FF
    }

    30%, 85% {
        color: #C040FF
    }

    45% {
        color: #D000A8
    }

    60% {
        color: #5A006E
    }
}

@keyframes rainbow {
    0% {
        color: #ff6b6b;
    }

    16% {
        color: #ffb347;
    }

    33% {
        color: #fff176;
    }

    50% {
        color: #77dd77;
    }

    66% {
        color: #77b5fe;
    }

    83% {
        color: #b19cd9;
    }

    100% {
        color: #d291bc;
    }
}