/* keyboard - jQuery UI Widget */
.ui-keyboard {
    padding: 0 0 2px;
    position: absolute;
    z-index: 16000;
    background: #404b51;
    border-radius: 2px;
    border: 1px solid #82888b;
    box-shadow: none;
    left: initial !important;
    top: initial !important;
}

.ui-keyboard-has-focus {
    z-index: 16001;
}

.ui-keyboard div {
    font-size: 1.1em;
}

.ui-keyboard-button {
    height: 38px;
    padding: 0 5px;
    min-width: 38px;
    margin: 2px 4px 3px 3px;
    cursor: pointer;
    overflow: hidden;
    -moz-user-focus: ignore;
    background: #878f94 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-color: #515b61 !important;
    border-left-color: #767f84 !important;
    border-bottom-color: #727b80 !important;
    border-right-color: #747c81 !important;
    border-radius: 4px;
    font-size: 13.5px;
    /*border: 0 !important;*/
    box-shadow: 2px 0 0 rgba(0, 0, 0, 0.15);
}
.ui-keyboard-button:active {
    background: #333 !important;
}

.ui-keyboard > span {
    width: 16px;
    height: 8px;
    display: block;
    position: absolute;
    top: -8px;
    right: 19px;
}

.ui-keyboard-shift, .ui-keyboard-meta1, .ui-keyboard-meta2, .ui-keyboard-meta3, .ui-keyboard-default, .on-keyboard {
    background: #87bc38;
    border-color: #7cad32;
    margin-top: 5px;
}

.ui-keyboard-button span {
    padding: 0;
    margin: 0;
    white-space: nowrap;
    display: inline-block;
    color: #fff;
    font-size: 13.5px;
}

.ui-keyboard-button-endrow {
    clear: left;
}

.ui-keyboard-widekey {
    padding: 0 15px;
    width: auto;
    background: #667780 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-color: #48555b !important;
    border-left-color: #5d6d75 !important;
    border-bottom-color: #5a6971 !important;
    border-right-color: #667780 !important;
}

.ui-keyboard-space {
    width: 15em;
}

.ui-keyboard-space span, .ui-keyboard-empty span {
    font: 0/0 a;
    text-shadow: none;
    color: transparent;
}
/* see http://nicolasgallagher.com/another-css-image-replacement-technique/ */
.ui-keyboard-preview-wrapper {
    text-align: center;
}

.ui-keyboard-preview {
    text-align: left;
    margin: 0 0 3px 0;
    display: inline;
    width: 99%;
}
/* width is calculated in IE, since 99% = 99% full browser width =( */
.ui-keyboard-keyset {
    text-align: center;
    white-space: nowrap;
}

.ui-keyboard-input {
    text-align: left;
}

.ui-keyboard-input-current { /*-moz-box-shadow: 1px 1px 10px #00f; -webkit-box-shadow: 1px 1px 10px #00f; box-shadow: 1px 1px 10px #00f;*/
}

.ui-keyboard-placeholder {
    color: #888;
}

.ui-keyboard-nokeyboard {
    color: #888;
    border-color: #888;
}
/* disabled or readonly inputs, or use input[disabled='disabled'] { color: #f00; } */
.ui-keyboard-button.disabled {
    opacity: 0.5;
    filter: alpha(opacity=50);
}
/* used by the acceptValid option to make the accept button appear faded */
.ui-keyboard-spacer {
    display: inline-block;
    width: 1px;
    height: 0;
}

/* combo key styling - toggles diacritics on/off */
.ui-keyboard-button.ui-keyboard-combo.ui-state-default {
    border-color: #ffaf0f;
}

/* (in)valid inputs */
button.ui-keyboard-accept.ui-keyboard-valid-input {
    border-color: #0c0;
    background: #080;
    color: #fff;
}

button.ui-keyboard-accept.ui-keyboard-valid-input:hover {
    background: #0a0;
}

button.ui-keyboard-accept.ui-keyboard-invalid-input {
    border-color: #c00;
    background: #800;
    color: #fff;
}

button.ui-keyboard-accept.ui-keyboard-invalid-input:hover {
    background: #a00;
}

/*** jQuery Mobile definitions ***/
/* jQuery Mobile styles - need wider buttons because of font size and text-overflow:ellipsis */
.ui-bar .ui-keyboard-button {
    width: 3em;
    display: inline-block;
}

.ui-bar .ui-keyboard-widekey {
    width: 5.5em;
}

.ui-bar .ui-keyboard-space {
    width: 15em;
}

.ui-bar .ui-keyboard-space span {
    visibility: hidden;
}
/* hides the ellipsis */
.ui-bar .ui-keyboard-keyset {
    line-height: 0.5em;
}

.ui-bar input.ui-input-text, .ui-bar textarea.ui-input-text {
    width: 95%;
}

/* over-ride padding set by mobile ui theme - needed because the mobile script wraps button text with several more spans */
.ui-bar .ui-btn-inner {
    height: 2em;
    padding: 0.2em 0;
    margin: 0;
}

.ui-bar .ui-btn {
    margin: 0;
    font-size: 13px;
}
/* mobile default size is 13px */

/* Media Queries (optimized for jQuery UI themes; may be slightly off in jQuery Mobile themes) */
/* 240 x 320 (small phone)  */
@media all and (max-width: 319px) {
    .ui-keyboard div {
        font-size: 9px;
    }

    .ui-keyboard .ui-keyboard-input {
        font-size: 12px;
    }
    /* I don't own an iPhone so I have no idea how small this really is... is it even clickable with your finger? */
    .ui-bar .ui-btn {
        margin: 0;
        font-size: 9px;
    }

    .ui-bar .ui-keyboard-button {
        width: 1.8em;
        height: 2.5em;
    }

    .ui-bar .ui-keyboard-widekey {
        width: 4em;
    }

    .ui-bar .ui-keyboard-space {
        width: 8em;
    }

    .ui-bar .ui-btn-inner {
        height: 2.5em;
        padding: 0.3em 0;
    }
}

/* 320 x 480 (iPhone)  */
@media all and (min-width: 320px) and (max-width: 479px) {
    .ui-keyboard div {
        font-size: 9px;
    }

    .ui-keyboard .ui-keyboard-input {
        font-size: 14px;
    }
    /* I don't own an iPhone so I have no idea how small this really is... is it even clickable with your finger? */
    .ui-bar .ui-btn {
        margin: 0;
        font-size: 11px;
    }

    .ui-bar .ui-keyboard-button {
        width: 1.8em;
        height: 3em;
    }

    .ui-bar .ui-keyboard-widekey {
        width: 4.5em;
    }

    .ui-bar .ui-keyboard-space {
        width: 10em;
    }

    .ui-bar .ui-btn-inner {
        height: 3em;
        padding: 0.7em 0;
    }
}

/* 480 x 640 (small tablet) */
@media all and (min-width: 480px) and (max-width: 767px) {
    .ui-keyboard div {
        font-size: 13px;
    }

    .ui-keyboard .ui-keyboard-input {
        font-size: 14px;
    }

    .ui-bar .ui-btn {
        margin: 0;
        font-size: 10px;
    }

    .ui-bar .ui-keyboard-button {
        height: 2.5em;
    }

    .ui-bar .ui-btn-inner {
        height: 2.5em;
        padding: 0.5em 0;
    }
}


.ui-keyboard + span.input.type-2, .ui-keyboard-input + span.input.type-2 { display: none; }


.ui-keyboard-bksp {
    background: #d02239 url(../../_img/bksp.png) no-repeat 12px center !important;
    width: 70px;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-color: #a82b3d !important;
    border-left-color: #62414b !important;
    border-bottom-color: #643e48 !important;
    border-right-color: #5a3942 !important;
    text-indent: 5px;
}
.ui-keyboard-bksp span {
    font-size: 12px;
}
.ui-keyboard-shift {
    background: #878f94 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-color: #515b61 !important;
    border-left-color: #767f84 !important;
    border-bottom-color: #727b80 !important;
    border-right-color: #747c81 !important;
    background-image: url(../../_img/shift-up.png) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.ui-keyboard-shift span {
    visibility: hidden;
}
.ui-keyboard-meta2 {
    display: none;
}
