/* --------------------------------

Primary style

-------------------------------- */
*, *::after, *::before {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}


a {
    /*color: #CD4324;*/
    text-decoration: none;
}

/* --------------------------------

Form

-------------------------------- */
.cd-form {
    /*   width: 90%;
       max-width: 600px;
       margin: 4em auto;
       */
}

.cd-form::after {
    clear: both;
    content: "";
    display: table;
}

.cd-form fieldset {
    /*margin: 24px 0;*/
}

.cd-form legend {
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 2rem;
    border-bottom: 1px solid #ecf0f1;
}

.cd-form div {
    /* form element wrapper */
    position: relative;
}

.cd-form h4, .cd-form .cd-label {
    font-size: 1.3rem;
    color: #94aab0;
    margin-bottom: 10px;
}

.cd-form .cd-label {
    display: block;
}


.cd-form input[type="text"],
.cd-form input[type="email"],
.cd-form textarea,
.cd-form select,
.cd-form legend {
    display: block;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    appearance: none;
}

.cd-form input[type="text"],
.cd-form input[type="email"],
.cd-form textarea,
.cd-form select {
    /* general style for input elements */
    padding: 12px;
    border: 1px solid #cfd9db;
    background-color: #ffffff;
    border-radius: .25em;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08);
}

.cd-form input[type="text"]:focus,
.cd-form input[type="email"]:focus,
.cd-form textarea:focus,
.cd-form select:focus {
    outline: none;
    border-color: #CD4324;
    box-shadow: 0 0 5px rgba(44, 151, 222, 0.2);
}

.cd-form .ipreo-select {
    /* select element wapper */
    position: relative;
}

.cd-form .ipreo-select::after {
    font-family: FontAwesome;
    /* arrow icon for select element */
    content: '\f00c';
    position: absolute;
    z-index: 1;
    right: 16px;
    top: 50%;
    margin-top: -8px;
    display: block;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.cd-form select {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.cd-form select::-ms-expand {
    display: none;
}

.cd-form .cd-form-list {
    margin-top: 16px;
    margin-left: 6px;
}

.cd-form .cd-form-list::after {
    clear: both;
    content: "";
    display: table;
}

.cd-form .cd-form-list li {
    /* wrapper for radio and checkbox input types */
    display: inline-block;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin: 0px 26px 0px 0px;
    float: left;
}

.cd-form input[type=radio],
.cd-form input[type=checkbox] {
    /* hide original check and radio buttons */
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}

.cd-form input[type="radio"] + label,
.cd-form input[type="checkbox"] + label {

    padding-left: 30px;
    margin-bottom: 0px;

}

.cd-form input[type="radio"] + label::before,
.cd-form input[type="radio"] + label::after,
.cd-form input[type="checkbox"] + label::before,
.cd-form input[type="checkbox"] + label::after {
    /* custom radio and check boxes */
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -8px;
    width: 16px;
    height: 16px;
}

.cd-form input[type="radio"] + label::before,
.cd-form input[type="checkbox"] + label::before {
    border: 2px solid #cfd9db;
    background: #ffffff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08);
}

.cd-form input[type="radio"] + label::before,
.cd-form input[type="radio"] + label::after {
    border-radius: 50%;
}

.cd-form input[type="checkbox"] + label::before,
.cd-form input[type="checkbox"] + label::after {
    border-radius: .25em;
}

.cd-form input[type="radio"] + label::after,
.cd-form input[type="checkbox"] + label::after {
    background-color: #bb5a3f;
    background-position: center center;
    background-repeat: no-repeat;
    box-shadow: 0 0 2px rgba(205, 30, 9, 0.49);
    display: none;
}

.cd-form input[type="radio"] + label::after {
    /* custom image for radio button */
    background-image: url("../img/cd-icon-radio.svg");
}

.cd-form input[type="checkbox"] + label::after {
    /* custom image for checkbox */
    font-family: FontAwesome;
    /* arrow icon for select element */
    content: '\f00c';
    color: white;
}

.cd-form input[type="radio"]:focus + label::before,
.cd-form input[type="checkbox"]:focus + label::before {
    /* add focus effect for radio and check buttons */
    box-shadow: 0 0 2px rgb(205, 67, 37);
}

.cd-form input[type="radio"]:checked + label::after,
.cd-form input[type="checkbox"]:checked + label::after {
    display: block;
    padding-left: 1px;
    font-size: 14px;
    line-height: 16px;
}

.cd-form input[type="radio"]:checked + label::before,
.cd-form input[type="radio"]:checked + label::after,
.cd-form input[type="checkbox"]:checked + label::before,
.cd-form input[type="checkbox"]:checked + label::after {
    -webkit-animation: cd-bounce 0.3s;
    animation: cd-bounce 0.3s;
}

.cd-form textarea {
    min-height: 200px;
    resize: vertical;
    overflow: auto;
}

.cd-form input[type="submit"] {
    /* button style */
    border: none;
    background: #CD4324;
    border-radius: .25em;
    padding: 16px 20px;
    color: #ffffff;
    font-weight: bold;
    float: right;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    appearance: none;
}

.no-touch .cd-form input[type="submit"]:hover {
    background: #CD4324;
}

.cd-form input[type="submit"]:focus {
    outline: none;
    background: #2b3e51;
}

.cd-form input[type="submit"]:active {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
}

.cd-form [required] {
    background: url("../img/cd-required.svg") no-repeat top right;
}

.cd-form .error-message p {
    background: #e94b35;
    color: #ffffff;
    font-size: 1.4rem;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    border-radius: .25em;
    padding: 16px;
}

.cd-form .error {
    border-color: #e94b35 !important;
}

@media only screen and (min-width: 600px) {
    .cd-form div {
        /* form element wrapper */
        margin: 0px 0px;
    }

    .cd-form legend + div {
        /* reduce margin-top for first form element after the legend */
        margin-top: 20px;
    }

    .cd-form h4, .cd-form .cd-label {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .cd-form input[type="text"],
    .cd-form input[type="email"],
    .cd-form textarea,
    .cd-form select {
        padding: 16px;
    }
}

@-webkit-keyframes cd-bounce {
    0%, 100% {
        -webkit-transform: scale(1);
    }
    50% {
        -webkit-transform: scale(0.8);
    }
}

@keyframes cd-bounce {
    0%, 100% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    50% {
        -webkit-transform: scale(0.8);
        transform: scale(0.8);
    }
}
