// ============================================================================
// Elements | Button | Switch
// ============================================================================

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

@use "../../soul_type" as *;

// ============================================================================
// Custom Select Dropdown Mixins
// ============================================================================

/// The custom select container must be positioned relative
/// @group Custom Select
@mixin custom-select {
    position: relative;
    font-family: Arial;
}

/// Hide the original SELECT element
/// @group Custom Select
@mixin custom-select-select {
    display: none;
}

/// Style the selected item
/// @group Custom Select
@mixin select-selected {
    background-color: DodgerBlue;
}

/// Style the arrow inside the select element
/// @group Custom Select
@mixin select-selected-after {
    position: absolute;
    content: "";
    top: q(14);
    right: q(10);
    width: 0;
    height: 0;
    border: q(6) solid transparent;
    border-color: var(--color_surface_primary) transparent transparent
        transparent;
}

/// Point the arrow upwards when the select box is open (active)
/// @group Custom Select
@mixin select-selected-arrow-active-after {
    border-color: transparent transparent var(--color_surface_primary)
        transparent;
    top: q(8);
}

/// Style the items (options), including the selected item
/// @group Custom Select
@mixin select-items-div-and-selected {
    color: var(--color_surface_primary) fff;
    padding: q(8) q(16);
    border: q(1) solid transparent;
    border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
    cursor: pointer;
}

/// Style for the options (items) in the dropdown
/// @group Custom Select
@mixin select-items {
    position: absolute;
    background-color: DodgerBlue;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
}

/// Hide the items when the select box is closed
/// @group Custom Select
@mixin select-hide {
    display: none;
}

/// Hover state for the items and style for the selected item
/// @group Custom Select
@mixin same-as-selected {
    background-color: rgba(0, 0, 0, 0.1);
}
