/* ========================================
   Emote Wheel (Stardew Valley Style)
   ======================================== */

#emote-wheel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

#emote-wheel-overlay.active {
    pointer-events: all;
}

.emote-wheel-container {
    position: absolute;
    width: 300px;
    height: 300px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.emote-wheel {
    position: relative;
    width: 100%;
    height: 100%;
}

.emote-wheel-btn {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-tan);
    border: 3px solid var(--border-dark-brown);
    box-shadow: inset 2px 2px 0 0 var(--border-highlight), inset -2px -2px 0 0 var(--border-light-brown);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Retro Gaming', monospace;
    padding: 5px;

    /* Calculate position based on --angle */
    left: 50%;
    top: 50%;
    transform:
        translate(-50%, -50%) rotate(var(--angle)) translateY(-110px) rotate(calc(-1 * var(--angle))) scale(0);

    /* Animation */
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Animate in when active */
#emote-wheel-overlay.active .emote-wheel-btn {
    transform:
        translate(-50%, -50%) rotate(var(--angle)) translateY(-110px) rotate(calc(-1 * var(--angle))) scale(1);
    opacity: 1;
}

/* Stagger animation delays */
#emote-wheel-overlay.active .emote-wheel-btn:nth-child(1) {
    transition-delay: 0.05s;
}

#emote-wheel-overlay.active .emote-wheel-btn:nth-child(2) {
    transition-delay: 0.1s;
}

.emote-wheel-btn:hover {
    background: var(--border-light-brown);
    transform:
        translate(-50%, -50%) rotate(var(--angle)) translateY(-110px) rotate(calc(-1 * var(--angle))) scale(1.15);
    transition-duration: 0.15s;
}

.emote-wheel-btn:active {
    box-shadow: inset -2px -2px 0 0 var(--border-highlight), inset 2px 2px 0 0 var(--border-light-brown);
}

.emote-icon {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.emote-label {
    font-size: 0.6rem;
    color: var(--text-brown);
    margin-top: 2px;
    text-align: center;
}

.emote-wheel-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 80px;
    height: 80px;
    background: var(--text-dark);
    border: 3px solid var(--border-dark-brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Retro Gaming', monospace;
    font-size: 0.8rem;
    color: white;
    box-shadow: inset 2px 2px 0 0 #ff6b7a, inset -2px -2px 0 0 #c42838;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Animate center circle */
#emote-wheel-overlay.active .emote-wheel-center {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}