/*!
 * Copyright (c) 2017 Edelweiss72 GmbH - All Rights Reserved
 * Unauthorized usage or distribution of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 *
 * @author Wladimir Eberts <w.eberts@edelweiss72.de>
 */

.mod-form:not(.no-select) {
    .m-item:not(.no-select) {
        > .m-input {
            //noinspection CssOptimizeSimilarProperties
            > select:not([multiple]) {
                appearance: none;
                background-repeat: no-repeat;
                background-size: $form-select-size;
                background-position: center right $form-input-padding-horizontal;
                background-image: embed($form-select-svg, (double: $form-select-double, color: $form-select-color, strength: $form-select-strength));

                // TODO: verify this for all browsers
                -moz-padding-start: $form-input-padding-horizontal - $form-input-border-width - 4px;

                @if unit($form-select-size) == em {
                    padding-right: calc(#{$form-select-size} + #{2 * $form-input-padding-horizontal});
                }
                @else {
                    padding-right: $form-select-size + 2 * $form-input-padding-horizontal;
                }

                @at-root .mod-form .m-field.is-placeholder .m-item > .m-input > select:not([multiple]) {
                    color: $form-input-placeholder;
                }

                // Internet Explorer 10+
                &::-ms-expand {
                    display: none;
                }

                &,
                > optgroup {
                    > option {
                        color: $form-input-color;

                        &[value=""] {
                            color: $form-input-placeholder;
                        }
                    }
                }
            }
        }
    }
}
