////
///
/// Nod Animations Mixin Module
/// ===========================================================================
///
/// Provides nodding animations that rotate elements on the X-axis.
/// Simulates head nodding or agreement gestures. Useful for confirmation
/// feedback, avatars, and character animations.
///
/// @group Animations
/// @author Scape Agency
/// @link https://move.gl
/// @since 0.1.0 initial release
/// @access public
///
////


// ============================================================================
// Use
// ============================================================================

@use "../../dev" as *;
@use "../../variables" as *;
@use "../keyframes" as *;
@use "base" as *;


// ============================================================================
// Mixins
// ============================================================================


///
/// Nod Animation
/// ---------------------------------------------------------------------------
/// Creates a nodding animation where the element rotates back and forth on
/// the X-axis.
///
/// @name animate_nod
/// @param {Angle} $angle [10deg] - Angle of rotation for the nod
/// @param {Time} $duration [$animate_base_duration] - Animation duration
/// @param {String} $timing_function [ease-in-out] - Timing function
/// @param {Number|String} $iteration_count - Number of iterations
///
/// @example scss - Basic usage
///   .avatar {
///     @include animate_nod;
///   }
///
@mixin animate_nod(
    $angle: 10deg,
    $duration: $animate_base_duration,
    $timing_function: ease-in-out,
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_nod,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_nod($angle);
}


///
/// Slow Nod Animation
/// ---------------------------------------------------------------------------
/// Creates a slower nodding animation with more gradual movement on the
/// X-axis.
///
/// @name animate_nod_slow
/// @param {Angle} $angle [10deg] - Angle of rotation for the nod
/// @param {Time} $duration [$animate_base_duration_slow] - Animation duration
/// @param {String} $timing_function [ease-in-out] - Timing function
/// @param {Number|String} $iteration_count - Number of iterations
///
/// @example scss - Usage
///   .gentle-nod {
///     @include animate_nod_slow;
///   }
///
@mixin animate_nod_slow(
    $angle: 10deg,
    $duration: $animate_base_duration_slow,
    $timing_function: ease-in-out,
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_nod_slow,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_nod_slow($angle);
}


///
/// Nod with Bounce Animation
/// ---------------------------------------------------------------------------
/// Creates a nodding animation combined with a bounce effect.
///
/// @name animate_nod_bounce
/// @param {Angle} $angle [10deg] - Angle of rotation for the nod
/// @param {Length} $bounce-height [5px] - Height of the bounce during the nod
/// @param {Time} $duration [$animate_base_duration] - Animation duration
/// @param {String} $timing_function [ease-in-out] - The timing function for the nod animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
///
@mixin animate_nod_bounce(
    $angle: 10deg,
    $bounce-height: 5px,
    $duration: $animate_base_duration,
    $timing_function: ease-in-out,
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_nod_bounce,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_nod_bounce($angle, $bounce-height);
}


///
/// Continuous Nod
/// Creates a continuous nodding animation where the element rotates back and
/// forth without stopping.
///
/// @name animate_nod_continuous
/// @param {Number|String} $angle [10deg] - The angle of rotation for the nod.
/// @param {Number|String} $duration [$animate_base_duration_fast] - The duration of the nod animation.
/// @param {String} $timing_function [linear] - The timing function for the nod animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
///
@mixin animate_nod_continuous(
    $angle: 10deg,
    $duration: $animate_base_duration_fast,
    $timing_function: linear,
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_nod_continuous,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_nod_continuous($angle);
}
