////
///
/// Forms Reset
/// ===========================================================================
///
/// Normalize form elements across browsers.
/// Removes default styling inconsistencies.
///
/// @group Reset
/// @author Scape Press
/// @link https://scape.style
/// @since 0.1.0 initial release
/// @access public
///
////

// ============================================================================
// Form Elements
// ============================================================================

@use "../01-core/external" as *;

@layer ss.reset {

    button,
    input,
    optgroup,
    select,
    textarea {
        font-family: inherit;
        font-size: 100%;
        line-height: 1.15;
        margin: 0;
    }

    button,
    select {
        text-transform: none;
    }

    button,
    [type="button"],
    [type="reset"],
    [type="submit"] {
        -webkit-appearance: button;
    }

    ::-moz-focus-inner {
        border-style: none;
        padding: 0;
    }

    :-moz-focusring {
        outline: q(1) dotted ButtonText;
    }

    :-moz-ui-invalid {
        box-shadow: none;
    }

    // ============================================================================
    // Textarea
    // ============================================================================

    textarea {
        resize: vertical;
    }

    // ============================================================================
    // Fieldset & Legend
    // ============================================================================

    fieldset {
        border: 0;
        margin: 0;
        padding: 0;
    }

    legend {
        padding: 0;
    }

    // ============================================================================
    // Progress
    // ============================================================================

    progress {
        vertical-align: baseline;
    }

    // ============================================================================
    // Number Input
    // ============================================================================

    ::-webkit-inner-spin-button,
    ::-webkit-outer-spin-button {
        height: auto;
    }

    // ============================================================================
    // Search Input
    // ============================================================================

    [type="search"] {
        -webkit-appearance: textfield;
        outline-offset: q(-2);
    }

    ::-webkit-search-decoration {
        -webkit-appearance: none;
    }

    // ============================================================================
    // File Input
    // ============================================================================

    ::-webkit-file-upload-button {
        -webkit-appearance: button;
        font: inherit;
    }
}
