:host{
    display: block;
    margin: var(--margin);
    width: var(--width);
}

.jb-input-web-component .control .clear-button[hidden] {
    display: none;
}

.jb-input-web-component {
    width: 100%;
    label {
        width: 100%;
        margin: var(--label-margin);
        display: block;
        font-size: var(--label-font-size);
        color: var(--label-color);
        font-weight: var(--label-font-weight);
        &:empty{
            display: none;
        }
    }
    .control {
        width: 100%;
        box-sizing: border-box;
        height: var(--height);
        border: solid var(--border-width) var(--border-color);
        background-color: var(--control-bg-color);
        margin: var(--box-margin);
        border-bottom: solid var(--border-bottom-width) var(--border-color);
        border-radius: var(--border-radius);
        transition: ease 0.3s all;
        overflow: var(--box-overflow);
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: minmax(0, 1fr);
        box-shadow: var(--box-shadow);
        corner-shape: var(--box-corner-shape);
        &:focus-within {
            border-width: var(--border-width-focus);
            border-bottom-width: var(--border-bottom-width-focus);
            box-shadow: var(--box-shadow-focus);
        }
        input {
            border: none;
            width: 100%;
            box-sizing: border-box;
            height: 100%;
            background-color: transparent;
            padding: var(--input-padding);
            display: block;
            font-family: inherit;
            font-size: var(--value-font-size);
            color: var(--value-color);
            margin: 0;
            border-radius: 0;
            text-align: var(--input-text-align);
            direction: var(--input-direction);
            font-weight: var(--input-font-weight);
            cursor: inherit;
            &:focus-visible{
                outline: none;
            }
            &::placeholder {
                color: var(--placeholder-color);
                font-size: var(--placeholder-font-size);
            }
            /*remove number input arrow keys of browser*/
            /* Chrome, Safari, Edge, Opera */
            &::-webkit-outer-spin-button,
            &::-webkit-inner-spin-button {
                -webkit-appearance: none;
                margin: 0;
            }

            /* Firefox */
            &[type="number"] {
                -moz-appearance: textfield;
            }
        }
        .jb-input-inline-start-wrapper{
            display: flex;
            height: 100%;
            width: auto;
            align-items: center;
            justify-content: center;
        }
        .jb-input-inline-end-wrapper {
            display: flex;
            height: 100%;
            width: auto;
            align-items: center;
            justify-content: center;
        }
        .clear-button {
            display: flex;
            flex: 0 0 auto;
            align-items: center;
            justify-content: center;
            width: var(--height);
            height: 100%;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--value-color);
            cursor: pointer;
            font-size: var(--value-font-size);
            --jb-icon-color: var(--clear-icon-color);
            --jb-icon-size: 1em;

            &:focus-visible {
                outline: 2px solid var(--jb-input-focus-ring-color, Highlight);
                outline-offset: -2px;
            }

        }
        ::slotted([slot="inline-start"]), ::slotted([slot="inline-end"]){
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            max-height: 100%;
            overflow-y: hidden;
            background-color: transparent;
            padding: var(--inline-slots-padding);
            width: auto;
            box-sizing: border-box;
        }
    }
    .message-box {
        font-size: var(--message-font-size);
        padding: var(--message-padding);
        color: var(--message-color);
        display: var(--message-box-display);
        &:empty {
            padding: 0;
        }
    }
}
