/* hahmo */
#feedback-character {
    position: fixed;
    right: 40px;
    bottom: 0;
    width: 140px;
    z-index: 99999;

    transform: translateY(100%);
    opacity: 0;

    transition: transform .6s ease, opacity .4s;
    cursor: pointer;
}

#feedback-character.is-visible {
    transform: translateY(0);
    opacity: 1;
}

#feedback-character.is-hidden {
    transform: translateY(100%);
    opacity: 0;
}

/* kuva */
#feedback-character img {
    width: 100%;
    animation: knock 2s infinite;
    animation-delay: 3s;
    transform-origin: bottom center;
}

@keyframes knock {
    0%,100% { transform: rotate(0); }
    20% { transform: rotate(-5deg); }
    40% { transform: rotate(5deg); }
}

#feedback-character:hover img {
    animation-play-state: paused;
}

/* sulje-nappi */
#feedback-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}

/* puhekupla */
#feedback-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    background: #fff;
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    /* white-space: nowrap; */
    pointer-events: none;
    width: 200px;
    height: auto;
    text-align: center;
}

#feedback-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

#feedback-bubble {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px) scale(0.95);
    transition: all 0.3s ease;
}

#feedback-character.is-visible #feedback-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px) scale(1);
}

/* overlay */
#feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    z-index: 100000;
}

/* popup */
#feedback-modal {
    position: fixed;
    right: 40px;
    bottom: 120px;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    width: 360px;
    z-index: 100001;
}

#feedback-modal input,
#feedback-modal textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    font-size: 14px;
}
#feedback-send {
    margin: 10px auto;
    font-size: 16px;
    background-color: white;
    border: 1px solid #000;
    color: black;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 10px;
    cursor: pointer;
    line-height: 30px;
    transition: all 0.5s ease-out;
    min-width: 104px;
}
#feedback-send:hover{
    cursor:pointer;
    background-color: #fff; /* Hieman vaaleampi musta hoverilla */
    color: var(--e-global-color-30c4ccb);
    border-color: var(--e-global-color-30c4ccb) ; /* Vaihtoehtoisesti voi käyttää accent-väriä */
    transform: translateY(-1px);
}

#feedback-modal button {
    margin-top: 10px;
}
