/*
 * Save this as wwwroot/css/doctor-character.css
 * This CSS uses the separated doctor parts image
 */

.doctor-container {
    position: relative;
    width: 300px;
    height: 500px;
    pointer-events: none;
    /* Allow clicks to pass through to container */
}

/* Head with glasses */
.doctor-head {
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: url('../images/doctor-parts/head.png');
    background-size: contain;
    background-repeat: no-repeat;
    left: 75px;
    top: 0;
}

/* Eyes */
.doctor-eyes {
    position: absolute;
    width: 100px;
    height: 30px;
    background-image: url('../images/doctor-parts/eyes.png');
    background-size: contain;
    background-repeat: no-repeat;
    left: 100px;
    top: 200px;
}

/* Eyebrows */
.doctor-eyebrows {
    position: absolute;
    width: 100px;
    height: 20px;
    background-image: url('../images/doctor-parts/eyebrows.png');
    background-size: contain;
    background-repeat: no-repeat;
    left: 100px;
    top: 185px;
}

/* Mouth */
.doctor-mouth {
    position: absolute;
    width: 60px;
    height: 20px;
    background-image: url('../images/doctor-parts/mouth.png');
    background-size: contain;
    background-repeat: no-repeat;
    left: 120px;
    top: 240px;
}

/* Body/Lab coat */
.doctor-body {
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: url('../images/doctor-parts/body.png');
    background-size: contain;
    background-repeat: no-repeat;
    left: 50px;
    top: 150px;
}

/* Left arm */
.doctor-arm-left {
    position: absolute;
    width: 80px;
    height: 160px;
    background-image: url('../images/doctor-parts/arm-left.png');
    background-size: contain;
    background-repeat: no-repeat;
    left: 10px;
    top: 200px;
    transform-origin: top center;
}

/* Right arm */
.doctor-arm-right {
    position: absolute;
    width: 80px;
    height: 160px;
    background-image: url('../images/doctor-parts/arm-right.png');
    background-size: contain;
    background-repeat: no-repeat;
    right: 10px;
    top: 200px;
    transform-origin: top center;
}

/* Stethoscope */
.doctor-stethoscope {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url('../images/doctor-parts/stethoscope.png');
    background-size: contain;
    background-repeat: no-repeat;
    right: 0;
    top: 250px;
}

/* Character container for movement */
.doctor-character {
    position: absolute;
    width: 300px;
    height: 500px;
    transition: left 0.5s ease;
    bottom: 0;
}

/* Speech bubble */
.speech-bubble {
    position: absolute;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 100px;
    max-width: 300px;
    min-height: 50px;
    display: none;
}

/* Animation classes */
.walking .doctor-body {
    animation: body-walk 0.5s infinite alternate;
}

.walking .doctor-arm-left {
    animation: arm-walk-left 0.5s infinite alternate;
}

.walking .doctor-arm-right {
    animation: arm-walk-right 0.5s infinite alternate-reverse;
}

.talking .doctor-mouth {
    animation: mouth-talk 0.3s infinite alternate;
}

.waving .doctor-arm-right {
    animation: arm-wave 1s;
}

.pointing .doctor-arm-right {
    animation: arm-point 1s;
}

.nodding .doctor-head {
    animation: head-nod 1s;
}

/* Keyframe animations */
@keyframes body-walk {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-5px);
    }
}

@keyframes arm-walk-left {
    0% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(15deg);
    }
}

@keyframes arm-walk-right {
    0% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(-15deg);
    }
}

@keyframes mouth-talk {
    0% {
        height: 15px;
    }

    100% {
        height: 25px;
    }
}

@keyframes arm-wave {
    0% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-30deg);
    }

    50% {
        transform: rotate(-20deg);
    }

    75% {
        transform: rotate(-30deg);
    }

    100% {
        transform: rotate(0);
    }
}

@keyframes arm-point {
    0% {
        transform: rotate(0);
    }

    50% {
        transform: rotate(-45deg);
    }

    100% {
        transform: rotate(-30deg);
    }
}

@keyframes head-nod {
    0% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0);
    }
}
