/* -------------------------------- Koodi Character */
.Koodi-place {
    position: fixed;
    top: 60px;
    right: 60px;
    display: grid;
    grid-template-areas:
            "popup space avatar"
            "  .   space logo";
    grid-template-columns: 1fr 3px 70px;
    grid-template-rows: 70px auto;
    gap: var(--gap-small);
    z-index: 10;
}

.koodi-body-container {
    grid-area: avatar;
    width: 70px;
    height: 70px;
}

#koodi-character {
    cursor: pointer;
    width: 100%;
}

.Koodi-character-black {
    fill: black;
}

.Koodi-character-white {
    fill: white;
}

.Koodi-character-accent {
    fill: var(--accent);
}

#koodi-eyes {
    fill: var(--wb-80);
    translate: 20px 50px;
}


/* ------------------------------------------ Popup */
popup-message {
    pointer-events: none;
    font-size: 0.85rem;
    margin-top: 10px;
    grid-area: popup;
    width: 100%;
    max-width: 0;
    height: fit-content;
    max-height: 105px;
    box-sizing: border-box;
    padding: 15px;
    opacity: 0;
    border-radius: 8px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition:
            max-width 1s ease;
    animation: hidePopupMessage 1s ease-in-out;
}

popup-message.show {
    opacity: 1;
    max-width: 450px;
    max-height: 105px;
    animation: showPopupMessage 1s ease-in-out;
}

popup-message.info {
    border: 1px solid var(--wb-40);
    background-color: white !important;
}

popup-message.warning {
    border: 1px solid #f4a902;
    background-color: #efe8d5 !important;
}

popup-message.error {
    border: 1px solid red;
    background-color: #f1e0e0 !important;
}

popup-message.success {
    border: 1px solid #02dd02;
    background-color: #cdf1ce !important;
}

@keyframes showPopupMessage {
    0% {
        max-height: 0;
        opacity: 1;
        max-width: 0;
    }
    25% {
        max-height: 105px;
    }
    100% {
        max-height: 105px;
        opacity: 1;
        max-width: 450px;
    }
}

@keyframes hidePopupMessage {
    0% {
        opacity: 1;
        max-width: 450px;
        max-height: 105px;
    }
    25% {
        max-height: 0;
    }
    to {
        opacity: 0;
        max-width: 0;
        max-height: 0;
    }
}

.popup-message-content {
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.popup-message-content.hide {
    opacity: 0;
}

.koodi-logo {
    grid-area: logo;
    width: 70px;
}

.header-logo {
    margin: 0;
    font-family: 'Avenir', sans-serif;
    color: var(--wb-5);
    font-weight: 700;
    font-size: 20pt;
}

.header-logo span {
    font-weight: 200;
}

/* ------------------------------- Koodi Character Animations */
@keyframes koodiLookingAround1 {
    0% {
        translate: 20px 50px;
    }
    10% {
        translate: 25px 50px;
    }
    20% {
        translate: 25px 50px;
    }
    30% {
        translate: 20px 55px;
    }
    40% {
        translate: 20px 50px;
    }
    55% {
        translate: 28px 53px;
    }
    65% {
        translate: 28px 53px;
    }
    70% {
        translate: 25px 50px;
    }
    75% {
        translate: 25px 50px;
    }
    80% {
        translate: 25px 50px;
    }
    90% {
        translate: 25px 50px;
    }
    95% {
        translate: 20px 50px;
    }
    100% {
        translate: 20px 50px;
    }
}

@keyframes koodiLookingAround2 {
    0% {
        translate: 20px 50px;
    }
    55% {
        translate: 20px 50px;
    }
    65% {
        translate: 28px 48px;
    }
    70% {
        translate: 28px 48px;
    }
    75% {
        translate: 25px 50px;
    }
    80% {
        translate: 23px 50px;
    }
    90% {
        translate: 23px 50px;
    }
    95% {
        translate: 20px 50px;
    }
    100% {
        translate: 20px 50px;
    }
}

.koodi-eyes-bored,
.koodi-eyes-sad {
    translate: 0 7px;
}

.koodi-tears {
    fill: #03afd5;
    translate: 23px 62px;
    animation: fallTear 3s infinite;
}

@keyframes fallTear {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.koodi-sleeping-zzz-background,
.koodi-sleeping-zzz {
    animation: zzz 4s infinite ease-in-out;
}

.koodi-sleeping-zzz-background {
    fill: white;
}

.koodi-sleeping-zzz {
    fill: #03afd5;
}

@keyframes zzz {
    0% {
        opacity: 0;
        translate: 56px 0;
    }
    20% {
        opacity: 1;
        translate: 60px 5px;
    }
    50% {
        opacity: 1;
        translate: 56px 3px;
    }
    80% {
        opacity: 1;
        translate: 59px 8px;
    }
    100% {
        opacity: 0;
        translate: 56px 0;
    }
}

.koodi-angry-marks-background,
.koodi-angry-marks {
    transform-origin: center;
    transform-box: fill-box;
    translate: 55px 6px;
    animation: angryMarks 2s infinite ease-in-out;
}

.koodi-angry-marks-background {
    fill: black;
}

.koodi-angry-marks {
    fill: #ff0000;
}

@keyframes angryMarks {
    0% {
        rotate: 0deg;
    }
    49% {
        rotate: 0deg;
    }
    50% {
        rotate: 180deg;
    }
    99% {
        rotate: 180deg;
    }
    100% {
        rotate: 0;
    }
}

/* ------------------------------------------- Food */
.koodi-food {
    translate: 0 60px;
}
.Koodi-character-mid-brown {
    fill: #c69c6d;
}

.pizza-mushrooms {
    fill: #f4e7d9;
}

.pizza-vegetables {
    fill: #64af4f;
}

.pizza-dough {
    fill: #e5a46c;
}

.Koodi-character-red-orange {
    fill: #ed412f;
}

.Koodi-character-mostaza {
    fill: #f2c85f;
}

.Koodi-character-magenta {
    fill: #ed1e79;
}

/* ------------------------------------------- Sing */
.koodi-music-notes {
    animation: sing 5s infinite ease-in-out;
}

@keyframes sing {
    0% {
        opacity: 0;
    }
    25% {
        opacity: 1;
        translate: 0 10px;
    }
    50% {
        opacity: 1;
        translate: 0 0;
    }
    75% {
        opacity: 1;
        translate: 0 10px;
    }
    100% {
        opacity: 0;
    }
}
