/* form */
form {
    margin: 0;
    padding: 0;
}

fieldset {
    border: 0;
    margin-bottom: 10px;
    padding: 0;
}

fieldset:last-child {
    margin-bottom: 0;
}

legend {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
}

.nl {
    margin-bottom: 15px;
    position: relative;
}

.form-buttons {
    text-align: right;
}

.form-buttons input {
    padding: 0 20px;
    height: 26px;
    line-height: 26px;
}

.nl:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

/* normal */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
select,
textarea {
    border-radius: 2px;
    padding: 0 5px;
    border: 1px solid #747474;
    height: 26px;
    font: 13px 'Open Sans', sans-serif;
    display: block;
    width: 100%;
    background: #f7f7f7 95% center no-repeat;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    resize: none;
}

.lt-ie9 input[type="text"],
.lt-ie9 input[type="password"],
.lt-ie9 input[type="email"],
.lt-ie9 input[type="url"],
.lt-ie9 select,
.lt-ie9 textarea {
    line-height: 36px;
}

select {
    padding: 7px 3px 7px 10px;
}

textarea {
    height: 135px;
    padding: 10px;
    line-height: 1.3em;
}

input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="email"]:disabled,
input[type="url"]:disabled,
select:disabled,
textarea:disabled {
    background: #f5f5f5;
    color: #ddd;
}

/* radio */
.choice-input {
    float: left;
    width: 40px;
}

.choice-label {
    font-size: 13px;
    line-height: 16px;
    padding-top: 3px;
    min-height: 23px;
    margin-left: 40px;
    vertical-align: top;
}

/* buttons */
input[type=submit]:focus input[type=button]:focus {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 0;
}

input[type=submit]:disabled,
input[type=button]:disabled {
    border: 1px solid #ddd;
    color: #ddd;
    background: #F5F5F5;
    cursor: default;
}

/* errors */
.error .radio-button:not(.disabled),
.lt-ie9 .error .radio-button,
.error .checkbox-button:not(.disabled),
.lt-ie9 .error .checkbox-button,
.error input[type="text"]:not(:disabled),
.error input[type="password"]:not(:disabled),
.error input[type="email"]:not(:disabled),
.error input[type="url"]:not(:disabled),
.error select:not(:disabled),
.error .select-container:not(.disabled) .text,
.lt-ie9 .error .select-container .text,
.error textarea:not(:disabled),
.error .file-container .input-file {
    outline: none;
    color: #D53B3B;
    border: 1px solid #D53B3B;
}

.error .file-container .input-file {
    background: #ffe9e6;
    color: #EB3921;
}


/* error text */
.field-error {
    font: 11px/15px 'Open Sans', sans-serif;
    color: #D53B3B;
    position: relative;
}


/* custom file */
.file-container {
    vertical-align: top;
    width: 100%;
    height: 36px;
    display: block;
    position: relative;
    overflow: hidden;
}

.file-container .input-file {
    float: left;
    height: 36px;
    width: 90px;
    cursor: pointer;
    margin-right: 10px;
    color: #fff;
    background: #5B92E5;
    background: -moz-linear-gradient(top, #7CAAED 0%, #5B92E5 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7CAAED), color-stop(100%, #5B92E5));
    background: -webkit-linear-gradient(top, #7CAAED 0%, #5B92E5 100%);
    background: -o-linear-gradient(top, #7CAAED 0%, #5B92E5 100%);
    background: -ms-linear-gradient(top, #7CAAED 0%, #5B92E5 100%);
    background: linear-gradient(to bottom, #7CAAED 0%, #5B92E5 100%);
    font: bold 13px 'Open Sans', sans-serif;
    line-height: 36px;
    /* ie8 winXP fix */
    position: relative;
    text-align: center;
    border: 1px solid #5B92E5;
    border-radius: 3px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.file-container.disabled .input-file {
    background: #eee;
    border: 1px solid #ddd;
}

.file-container input[type="file"] {
    position: absolute;
    right: 0;
    top: 0;
    opacity: 0;
    filter: alpha(opacity=0);
    height: 36px;
    display: block;
    cursor: pointer;
}

.file-container .text {
    float: left;
    width: 200px;
    height: 36px;
    font: bold 13px/36px'Open Sans', sans-serif;
    color: #333;
    display: block;
    position: relative;
}

/*disabled */
.file-container.disabled,
.file-container.disabled * {
    cursor: default !important;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    -webkit-user-modify: read-write-plaintext-only;
}

.file-container.disabled .text,
.file-container.disabled .input-file {
    color: #ddd;
    pointer-events: none;
}

@media only screen and (max-width: 320px) {
    .file-container input[type="text"] {
        display: none;
    }

    .file-container .input-file {
        width: 100%;
        margin: 0;
    }
}

/* custom select */
.select-container {
    display: block;
    position: relative;
}

.select-container select {
    font-size: 12px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
    opacity: 0;
    filter: alpha(opacity=0);
}

.select-container .select-arrow {
    background: url(../images/select-arrow.png) center center no-repeat;
    width: 36px;
    height: 30px;
    position: absolute;
    right: 1px;
    top: 3px;
    z-index: 1;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.select-container .text {
    border-radius: 2px;
    padding: 0 5px;
    padding-right: 40px;
    vertical-align: top;
    border: 1px solid #ddd;
    height: 36px;
    width: 100%;
    font: 13px/36px 'Open Sans', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 36px;
    color: #666;
    display: block;
    z-index: 0;
    position: relative;
    pointer-events: none;
    background: #fff;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/*disabled */
.select-container.disabled,
.select-container.disabled * {
    cursor: default !important;
    color: #ddd;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    -webkit-user-modify: read-write-plaintext-only;
}

.select-container.disabled .text {
    background: #eee;
    border: 1px solid #ddd;
}

.lt-ie9 .error .select-container.disabled .text {
    background-color: #eee;
    border-color: #ddd;
}

.select-container.disabled .select-arrow {
    opacity: 0.5;
    filter: alpha(opacity=50);
}