/* The parent of the input - made to look like a text field */
.theme-semantic-ui {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    color: rgba(0,0,0,.7);
    display: inline-block;
    font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 38px;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-overflow: ellipsis;
    transition: background-color .3s ease-out, box-shadow .2s ease, border-color .2s ease;
    vertical-align: top;
    white-space: nowrap;
    width: 350px;
}


/* The actual input - made opaque but styled so the cursor positions well */
.theme-semantic-ui input[type="file"] {
    border: none;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
    font-size: inherit;
    height: 100%;
    line-height: 38px;
    left: 0;
    margin: 0;
    opacity: 0;
    outline: none;
    padding: 0 8px;
    position: absolute;
    top: 0;
    width: 100%;
}
/*
 * This makes the cursor appear nicely within the field when you tab into it in IE10/IE11
 * (target IE10/11 but not 9 - http://www.impressivewebs.com/ie10-css-hacks/)
 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .theme-semantic-ui input[type="file"] {
        line-height: normal;
    }
}


/* The field value */
.theme-semantic-ui[data-ffi-value]:after {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    color: rgba(0,0,0,.7);
    content: attr(data-ffi-value);
    display: block;
    font-style: normal;
    overflow: hidden;
    padding: 0 7px 0 15px;
    text-overflow: ellipsis;
    z-index: -1;
}
.theme-semantic-ui[data-ffi-value].is-focused:after {
    color: rgba(0,0,0,.85);
}

/* The "browse" button */
.theme-semantic-ui:before {
    background-color: #FAFAFA;
    background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.05));
    background-image: linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.05));
    border-left: 1px solid #ccc;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset;
    color: #808080;
    content: attr(data-ffi-button-text);
    float: right;
    font-weight: bold;
    line-height: 38px;
    margin: 0;
    padding: 0 22px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity .25s ease,background-color .25s ease, color .25s ease, box-shadow .25s ease;
}

/* various states for interaction */
.theme-semantic-ui:hover:before {
    background-color: #f1f1f1;
    background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.05));
    background-image: linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.05));
    color: rgba(0, 0, 0, 0.7);
}
.theme-semantic-ui:active:before,
.theme-semantic-ui:active:hover:before,
.theme-semantic-ui:focus:before,
.theme-semantic-ui:focus:hover:before {
    background-color: #F1F1F1;
    background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.05));
    background-image: linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.05));
    border-color: #aaa;
    color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}
.theme-semantic-ui:active:before,
.theme-semantic-ui:active:hover:before {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

/* focused */
.theme-semantic-ui.is-focused {
    border-color: rgba(0,0,0,.2);
    box-shadow: .3em 0 0 0 rgba(0,0,0,.2) inset;
    color: rgba(0,0,0,.85);
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    outline: none;

}
.theme-semantic-ui.is-invalid {
    background: #FFFAFA;
    border-color: #E7BEBE;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}
.theme-semantic-ui.is-invalid.is-focused {
    box-shadow: .3em 0 0 0 #D59392 inset;
}
.theme-semantic-ui.is-invalid:before {
    background: #D95C5C;
    border-color: #E7BEBE;
    color: #fff;
}
.theme-semantic-ui.is-invalid.is-active:before {
    background: #D95C5C;
    border-color: #E7BEBE;
    color: #fff;
}
.theme-semantic-ui.is-invalid[data-ffi-value]:after {
    color: #D95C5C;
}

/* disabled */
.theme-semantic-ui.is-disabled {
    background: #EEE;
}
.theme-semantic-ui.is-disabled:hover {
    background: #EEE;
    border-color: #ccc;
}
.theme-semantic-ui.is-disabled:before {
    opacity: .65;
    filter: alpha(opacity=65);
}
.theme-semantic-ui.is-disabled:hover:before,
.theme-semantic-ui.is-disabled:active:before,
.theme-semantic-ui.is-disabled:active:hover:before,
.theme-semantic-ui.is-disabled:focus:before,
.theme-semantic-ui.is-disabled:focus:hover:before {
    background: #fff;
    border-color: #ccc;
    box-shadow: none;
}
.theme-semantic-ui.is-disabled:hover:before {
    color: #999;
}


/* The clear field button */
.theme-semantic-ui > .ffi-clear {
    background: url(../dist/clear.png) no-repeat 0 0;
    background-image: url(../dist/clear.svg);
    border: none;
    color: #333;
    cursor: pointer;
    float: right;
    height: 16px;
    line-height: 16px;
    margin: 11px;
    opacity: 0.56;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0.56)";
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: left;
    text-indent: 999em;
    white-space: nowrap;
    width: 16px;
}
.theme-semantic-ui > .ffi-clear:hover {
    opacity: 1;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)";
}


@media all and (max-width : 500px) {
    .theme-semantic-ui {
        height: 40px;
        width: 100%;
    }
    .theme-semantic-ui[data-ffi-value] {
        height: 80px;
    }
    .theme-semantic-ui.is-focused {
        box-shadow: none;
        border-radius: 4px;
        outline: none;
    }
    .theme-semantic-ui:before {
        border-left: none;
        border-top: 1px solid #ccc;
        bottom: 0;
        right: 0;
        left: 0;
        position: absolute;
        text-align: center;
        width: auto !important;
    }
    .theme-semantic-ui[data-ffi-value]:before {
        border-top: 1px solid #ccc;
    }
}