
/* global layout */
.container {
    max-width: 800px;
}

main.container {
    padding: 0;
}

main p,
form fieldset {
    font-size: 1.2em;
}

/* motivation part */
    h2 {
        margin-top: 1em;
        padding: 0 1em;

        font-size: 2em;
        text-align: center;
        text-transform: lowercase;
    }
    h2 br {
        display: none;
    }

    main > p {
        margin: 0 10% 1em;
        text-align: center;
    }


/* form layout */
form#new_race {
    margin-top: 3em;
}
    form {
        display: block;
        max-width: 800px;
        margin: auto;
    } 
    form fieldset {
        margin: 0;
        padding: 0 1em;

        border: none;
    }
        form fieldset.odd {
            background: #f5f5f5;
        }
        form .fieldset_content {
            padding: 1em 0;
        }

    form fieldset legend {
        margin: 1em 0 .5em;
        width: 100%;

        line-height: 1.25em;
        text-align: center;
    }


/* form field layout */
form .field {
    clear: both;
}
    form .field:not(:first-child) {
        margin-top: .5em;
    }
    form .field > label {
        line-height: 1em;
    }

    form label:not(.dd-selected-text):not(.dd-option-text):not(.notransform) {
        text-transform: lowercase;
    }

/* form field appearance */
form input[type=text],
form input[type=date],
form input[type=password],
form input[type=email],
form textarea,
form select,
form .helptext {
    padding: 0 .15em;
    width: 97%;

    line-height: 1.4em;
}

    form input:not([type=checkbox]):not([type=radio]):not([type=range]),
    form textarea,
    form select {
        border: 1px solid #ccc;
        box-shadow: 0 0 4px rgba(49,158,179,0);

        -webkit-transition: border .6s, box-shadow .6s;
                transition: border .6s, box-shadow .6s;
    }
    form input:not([type=checkbox]):not([type=radio]):not([type=range]):focus,
    form textarea:focus,
    form select:focus {
        border-color: #aaa;
        box-shadow: 0 0 4px rgba(49,158,179,.6);
        outline: none;

        -webkit-transition: border .15s, box-shadow .15s;
                transition: border .15s, box-shadow .15s;
    }

form textarea {
    height: 7em;
    vertical-align: top;
}

form select {
    width: 98%;

    padding-right: 0;

    background-color: #fff;
    background: -webkit-linear-gradient(top, #fff 0%,#eee 100%);
    background: linear-gradient(to bottom, #fff 0%,#eee 100%);
    border: 1px solid #aaa;

    line-height: 1.5em;
}
    form .field.wrapped-text-input input,
    form .field.wrapped-text-input select {
        display: inline;
        margin: 0 .35em;
        width: 3.5em;
    }
    form .field.wrapped-text-input input {
        width: 2.9em;
        padding-left: .35em;
    }

    select::-ms-expand {
        padding: 0 .15em;
        border: 0px solid #ccc;
        border-left-width: 1px;
    }

form input[type=range] {
    width: 85%;

    vertical-align: middle;
}

form .button {
    display: block;
    margin: 2em auto;

    clear: both;
}

.button b {
    font-weight: 800;
}


/* form with errors */
form .field.has_error input.has_error,
form .field.has_error select,
form .field.has_error textarea,
form .field.has_error input.has_error:focus,
form .field.has_error select:focus,
form .field.has_error textarea:focus,
form .field.has_error .dd-select {
    border: 1px solid #a94442;

}

form .errors {
    float: right;
    position: relative;
    top: .45em;

    margin: 0 .4em;
    padding: 0;

    color: #a94442;
    font-size: 1em;
    line-height: 1.5;
}
    form ul .errors {
        margin-left: 1.35em;
    }

    form .errors.nonfield {
        float: none;
        position: static;
        margin: 0 auto 1em;
        padding: .5em;

        background-color: #a94442;
        color: #fff;

        font-size: 1em;
        font-weight: normal;
        text-align: center;
    }

    #field_route_select .errors,
    #field_about .errors {
        top: .35em;
    }
        #id_teams_type .errors {
            top: -.2em;
        }


/* form custom elements */
form .range_value {
    margin-left: 1em;
}

form .helptext {
    margin: 0 0 1em;

    font-size: .8em;
    line-height: 1.5em;
    opacity: .7;
}
    form .helptext .wrap {
        word-break: break-all;
    }


/* fancy select */
.dd-container {
    display: inline-block;

    line-height: 1em;
    vertical-align: top;
}
    .dd-selected {
        background: -webkit-linear-gradient(top, #fff 0%,#eee 100%);
        background: linear-gradient(to bottom, #fff 0%,#eee 100%);
    }
    .dd-container a {
        color: #333;
    }
        .dd-container a:hover {
            text-decoration: none;
        }

    .dd-option,
    .dd-selected {
        padding: 5px !important;
    }

    .dd-selected-image {
        height: 40px;
    }
    .dd-selected-text {
        font-weight: 400;
    }
    .dd-selected-text,
    .dd-selected-description {
        position: relative;
        top: 1px;
    }
        .dd-selected-description-truncated {
            margin-right: 1.5em;
        }

        .dd-option-description b {
            margin-left: .1em;
        }

    /* don't allow empty selection */
    .dd-options li:first-child {
        display: none;
    }

    .dd-option-text {
        line-height: 2em;
    }

    .dd-multirow-text .dd-option-text {
        line-height: 1.5em;
    }
    .dd-multirow-text .dd-option-description {
        margin-top: -.15em;
        line-height: 1.25em;
    }

/* race type/team selection */
#field_route_request,
#field_teams_type,
#field_teams_size {
    display: none;
}

form .field > ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
    #id_racer_type li {
        display: inline;
    }
        #id_racer_type li:not(:first-child) {
            margin-left: 1em;
        }

    #field_teams_type {
        margin-top: 0;
    }
        #id_teams_type {
            position: relative;
            margin-top: 20px; /* for ::before */
            padding: .5em 1em;

            background-color: #f5f5f5;
        }
            #id_teams_type::before {
                content: " ";
                width: 0;
                height: 0;

                position: absolute;
                top: -15px;
                left: 144px;

                border-color: transparent transparent #f5f5f5 transparent;
                border-style: solid;
                border-width: 0 30px 15px 30px;
            }

.field .separator {
    height: 1em;
    margin: 1em 0;

    font-size: .7em;
    overflow: hidden;
}
    .field .separator hr {
        width: 100%;

        border: none;
        border-bottom: 1px solid #d5d5d5;
    }
    .field .separator span {
        position: relative;
        left: 3em;
        top: -1.2em;

        padding: 0 .5em;

        color: #999;
        background-color: #f5f5f5;
    }


form .field[id^=field_team_name_] {
    position: relative;
}
    #team_name_remaining {
        position: absolute;
        bottom: 0.3em;
        right: .5em;

        font-size: .9em;
    }
        #team_name_remaining.low {
            color: #a94442;
        }
        #team_name_remaining.zero {
            font-weight: 400;
        }

.field[id^=field_team_name_] label {
    display: none;
}
    form input[id^=id_team_name_] {
        width: 91%;
        margin-left: 1em;

        -webkit-transition: color .6s, opacity .6s;
                transition: color .6s, opacity .6s;
    }
        form input[id^=id_team_name_][disabled] {
            color: #999;
            opacity: .55;

            -webkit-transition: color .15s, opacity .15s;
                    transition: color .15s, opacity .15s;
        }

    /* before field is moved to correct position */
    form .fieldset_content > .field[id^=field_team_name] {
        display: none;
    }

/* about text */
#field_about {
    display: none;
}

/* user saving fields */
.group .label {
    margin-top: 1em;
}
    .group .label + .field {
        margin-top: 0;
    }

.group .field {
    position: relative;
}

.group + .group:not(.visible) {
    display: none;
}

#forgot-nickname {
    margin-top: .5em;

    font-size: .75em;
    text-align: center;
}


.field .helpicon {
    display: none;
}

/* sponsoring section */
#field_sponsoring ~ .field {
    display: none;
}

:not(.inline-help) + .tooltip {
    margin-top: 1em;
}
    .tooltip p, .tooltip ul {
        margin: 0;
        font-size: .85em;
    }
    .tooltip h3 {
        margin: 0;

        font-size: 1em;
        font-weight: 300;
    }


/* nickname link modal */

.modal h3 {
    font-weight: 300;
    text-align: center;
    text-transform: lowercase;
}

.modal-content [class^=button] {
    border-radius: 2em;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1em;
    text-transform: lowercase;
}
.modal-content form input[type=email] {
    width: 95.15%;
}
    .modal-content a[class^=button] {
        color: #fff;
    }
        .modal-content a[class^=button]:hover {
            text-decoration: none;
        }

#hows_it_work_content {
    margin: 0 15% 1em;
    text-align: center;
}

    #hows_it_work_content h2 {
        font-size: 1.4em;
        font-weight: 600;
    }

#hows_it_work_content #size_helper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

#hows_it_work_content #size_helper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#not_ready_to_get_involved {
    background: #f5f5f5 none repeat scroll 0 0;
    text-align: center;
    padding-bottom: 1em;
}

    #not_ready_to_get_involved h2:first-of-type {
        padding-top: 0.5em;
    }

    #not_ready_to_get_involved .smaller {
        font-size: 1em;
    }

    #not_ready_to_get_involved ul {
        margin: auto;
        padding-bottom: 1em;
        max-width: 400px;
        text-align: left;
    }

#contact_form {
    display:none;
    margin-top: 2em;
}

    #contact_form .field label {
        vertical-align: top;
        padding-top: 0.1em;
    }

@media (min-width: 640px) {
    main.container {
        padding: 0 1em;
    }

    h2 {
        font-size: 2.5em;
    }
        h2 br {
            display: block;
        }

    main > p {
        margin: 0 15% 1em;
    }

    form {
        line-height: 2.25em;
    }
        .modal-content form {
            line-height: 1em;
        }

    form fieldset {
        padding: 0;
    }
        form fieldset legend {
            width: auto;
            text-align: left;
        }

        form fieldset legend,
        .group .label {
            margin-left: 13.15em;
        }

    form .field > label {
        display: inline-block;
        margin-right: 1em;
        width: 12em;

        text-align: right;
    }
        form .field.wrapped-text-input label {
            padding-left: 1.85em;
            width: auto;
        }
        form .field.wrapped-checkbox-input label {
            margin: 0 0 0 14.4em;
            width: 19.3em;

            line-height: 1.5em;
            text-align: left;
        }
            form .field.wrapped-checkbox-input label input {
                margin: 0 .3em 0 -1.2em;
            }

    form textarea,
    form input[type=text],
    form input[type=date],
    form input[type=password],
    form input[type=email] {
        width: 325px;
    }
    form select {
        background: white;
        width: 333px;
    }
    form input[type=range] {
        width: 290px;
    }
    form .helptext {
        width: 305px;
    }
    form .field > ul {
        width: 335px;
    }

    form .helptext {
        margin-left: 18em;
    }


    form .field > ul {
        display: inline-block;
    }
        form .field > ul li {
            padding-left: 1%;
        }

    #id_racer_type {
        position: relative;
        top: -1px;

        vertical-align: middle;
    }
        #id_racer_type li:not() { /* :not() is there for override */
            width: 49%;
            margin-left: 0;

            float: left;
        }

    #id_teams_type {
        margin-left: 0px;
        width: 330px;
    }
        form input[id^=id_team_name_] {
            width: 299px;
        }
        #id_teams_type::before {
            top: -20px;
            left: 41%;

            border-width: 0 50px 20px 50px;
        }

    form .field[id^=field_team_name_] {
        margin-top: 0;
    }
        #team_name_remaining {
            bottom: .1em;

            font-size: .85em;
        }

    .field .separator {
        margin: .5em 0;
    }
        .field .separator span {
            top: -1.85em;
        }

    .field .helpicon {
        display: block;
        position: absolute;
        bottom: 5px;
        left: 560px;
        height: 18px;
        width: 18px;

        overflow: hidden;
        background-color: #bbb;
        border-radius: 18px;
        color: #fff;

        font-size: 15px;
        font-weight: bold;
        line-height: 18px;
        text-align: center;

        cursor: help;
        opacity: .6;
    }
        .field .helpicon:before {
            content: "?";
            display: block;
        }

    form .errors {
        float: none;
        margin: 0 0 0 13em;
        top: .2em;
    }
        #field_route_select .errors,
        #field_about .errors {
            top: -.05em;
        }
        #id_teams_type .errors {
            top: .25em;
        }

    span.tooltip_trigger {
        border-bottom: 1px dotted #4f555f;
    }

    .tooltip {
        display: none;

        position: absolute;
        top: 0;
        left: -16em;
        width: 16em;

        padding: .4em .5em .5em .75em;

        background: #fff;
        border: 1px solid #f0f0f0;
        border-radius: 5px;
        box-shadow: 0 0 9px rgba(0, 0, 0, 0.1);

        opacity: 0;
        z-index: 50;

        -webkit-transition: opacity .6s;
                transition: opacity .6s;
    }
        .tooltip.animate {
            display: block;
        }
        .tooltip.visible {
            opacity: 1;

            -webkit-transition: opacity .15s;
                    transition: opacity .15s;
        }
        .tooltip p,
        .tooltip ul.list li {
            line-height: 1.3em;
        }
        .tooltip h3 {
            margin-bottom: .2em;
            line-height: 1.3em;
        }

        .inline-help + .tooltip {
            width: 10em;
        }

    .modal-content [class^=button] {
        font-size: 1.1em;
    }
}

@media (min-width: 800px) {
    form textarea,
    form input[type=text],
    form input[type=date],
    form input[type=password],
    form input[type=email] {
        width: 446px;
    }
    form select {
        background: white;
        width: 454px;
    }
    form input[type=range] {
        width: 350px;
    }
    form .helptext {
        width: 370px;
    }
    form .field > ul {
        width: 395px;
    }
        form input[id^=id_team_name_] {
            width: 360px;
        }

    #id_teams_type {
        width: auto;
    }
        #id_teams_type::before {
            left: 35%;
        }

    .field .helpicon {
        left: 635px;
    }
}

.race_type_select {
    font-size: 0.7em;
    line-height: 1.2;
    display: inline-block;
    width: 250px;
    vertical-align: top;
}

    .race_type_select span {
        display: block;
        margin-top: 5px;
        margin-left: 15px;
    }

    .race_type_select>label {
        font-size: 1.5em;
    }

    .race_type_select ul {
        padding-left: 10px;
        margin-top: 5px;
        font-style: italic;
    }

.field_race_type_select label {
    vertical-align: top;
}

#new_race fieldset {
    display: none;
}

#new_race button {
    display: none;
}

#diy_race,
#paidracerequest_form {
    display: none;
    font-size: 0.8em;
}

    #diy_race>h2,
    #paidracerequest_form>h2 {
        font-size: 2em;
    }

    #diy_race>fieldset,
    #paidracerequest_form>fieldset {
        margin: 20px auto 10px auto;
        width: 670px;
    }

    #diy_race .field>label,
    #paidracerequest_form .field>label {
        vertical-align: top;
        font-weight: 600;
    }

    #diy_race .field ul,
    #paidracerequest_form .field ul {
        width: 415px;
        margin-top: -5px;
    }

    #diy_race #id_team_name_0,
    #diy_race #id_team_name_1,
    #diy_race #id_team_name_2,
    #diy_race #id_team_name_3,
    #diy_race #id_team_name_4,
    #diy_race #id_team_name_5,
    #diy_race #id_team_name_6,
    #diy_race #id_team_name_7,
    #diy_race #id_team_name_8 {
        width: 90%;
    }

    #diy_race .field:not(:first-child),
    #paidracerequest_form .field:not(:first-child) {
        margin-top: 2em;
    }

    #diy_race.field li label,
    #paidracerequest_form .field li label {
        display: inline-block;
        margin-left: 20px;
    }

    #diy_race .field li label input,
    #paidracerequest_form .field li label input {
        margin-right: 5px;
    }

    #field_othergoaltext {
        display: none;
        margin-top: 0 !important;
    }

        #field_othergoaltext input {
            font-size: 0.7em;
            font-style: italic;
            margin-left: 5px;
        }

.checkboxmultiwithtext {
    font-size: 1em;
    display: inline-block;
}

    .checkboxmultiwithtext>input {
        display: block;
    }

    .checkboxmultiwithtext input[type="text"] {
        display: inline-block;
        margin-left: 5px;
        width: 220px !important;
        font-size: 0.7em;
        font-style: italic;
    }


.container {
    max-width: 100%;
}

.testimonials {
    padding: .75em 5%;
    background: #319eb3;
    color: #fff;

    font-size: 2.5em;
    text-align: center;
    font-style: italic;
    font-weight: bold;
}


#header {
    position: fixed;
    width: 100%;
    top: 0;
}

#content {
    margin-top: 59px;
}

#create-your-virtual-race-button {
    text-decoration: none;
    color: white;
}

    #create-your-virtual-race-button h1:hover {
        background-color: #FFFFFF;
        color: #319eb3;
    }

#footer {
    margin-top: 0;
}

.featured_desc {
    font-size: 1.9em;
    font-weight: bold;
    max-width: 25em;
    margin: 1em auto;
}

.featured_title {
    font-size: 2em;
}

.waypointLabel > h2 {
    color: #177fa5;
    text-align: center;
    margin-top: 0;
}

.featured-title {
    margin: auto auto;
    max-width: 1080px;
    font-size: 2em;
    padding: 0;
}

#featured-box {
    max-width: 1080px;
    margin: auto;
}

#featured-box .featured-img {
    width: 100%;
    clear: both;
}

#featured-box .featured-img img {
    max-width: 100%;
    width: 100%;
    margin-top: 20px;
}

#featured-box .featured-desc {
    width: 99%;
    clear: both;
    margin: auto;
}

#featured-box .featured-desc.description {
    font-size: 150%;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-left: 10px;
    margin-right: 10px;
}

#featured-box .timeline-table {
    position: relative;
    left: 2vw;
}

#featured-box .timeline-table .mile-marker {
    width: 20vw;
}

#featured-box .timeline-table .mile-marker-container {
    background: #f0f0f0;
    margin-top: auto;
    margin-bottom: auto;
    clip-path: polygon(0% 0%, 80% 0%, 100% 50%, 80% 100%, 0% 100%);
    -webkit-clip-path: polygon(0% 0%, 80% 0%, 100% 50%, 80% 100%, 0% 100%);
}

#featured-box .timeline-table .mile-marker-milestone {
    color: #319eb3;
    font-family: arial;
    font-size: 3.2vw;
    text-align: right;
    padding-right: 20%;
    padding-top: 5%;
    margin: 0;
}

#featured-box .timeline-table .mile-marker-description {
    color: #7a7a7a;
    font-family: arial;
    font-size: 2vw;
    text-align: right;
    font-weight: normal;
    margin: 0;
    padding-right: 20%;
    padding-top: 5%;
    padding-bottom: 5%;
}

#featured-box .timeline-table .center-line-and-circle {
    position: relative;
    margin: 0;
    left: -1.5vw;
    z-index: 1;
}

#featured-box .timeline-table .center-line-and-circle .blue-line-top,
#featured-box .timeline-table .center-line-and-circle .blue-line-bottom {
    background-color: #319eb3;
    border: 1px solid #319eb3;
    height: 50%;
    width: 2vw;
    left: 100px;
    position: absolute;
    left: 0;
    top: 0;
}

#featured-box .timeline-table .center-line-and-circle .blue-line-bottom {
    height: 100%;
    top: 50%;
}

#featured-box .timeline-table .center-line-and-circle .circle {
    background-color: #319eb3;
    width: 2.6vw;
    height: 2.6vw;
    border: 0.8vw solid white;
    border-radius: 50%;
    position: relative;
    left: -1vw;
}

#featured-box .timeline-table .right-image {
    position: relative;
    top: 2vh;
    left: -4vw;
    z-index: 0;
    width: 60vw;
}

#featured-box .timeline-table .right-image img {
    max-width: 100%;
    max-height: 70vh;
    padding: 2%;
    padding-left: 6vw;
    margin-bottom: 4vh;
    display: block;
    background-color: #f0f0f0;
    clip-path: polygon(5vw 0%, 100% 0%, 100% 100%, 5vw 100%, 0% 50%);
    -webkit-clip-path: polygon(5vw 0%, 100% 0%, 100% 100%, 5vw 100%, 0% 50%);
}

@media (max-width: 640px) {
   #header > .container > h1 {
        width: 18px;
        height: 45px;
        overflow: hidden;
   }
   #cssmenu {
        padding-left: 0;
   } 
   #cssmenu > ul > li > a {
       font-size: 10px;
       padding: 12px 10px;
   }
   #social {
       display: none;
   }

   #testimonials > .container img {
       max-width: 100% !important;
   }
   #testimonials > .container > div > div {
       width: 100% !important;
   }
   .nomargin-mobile {
       margin: 0 !important;
   }
   .hide-mobile {
       display: none;
   }
   #diy_race>fieldset, #diy_race .field input[type=text], #diy_race .field input[type=email], #diy_race .field ul {
       width: 98% !important;
   }
   form fieldset {
       padding: 0 0;
   }
   #featured-box .featured-img {
       width: 100% !important;
   }
   #featured-box .featured-desc {
       width: 97% !important;
   }
   #id_racer_type_0, #id_racer_type_1 {
       width: 1em;
       margin-left: 0 !important;
       margin-top: 1em;
   }
   #login_logout {
       display: none;
   }
   #cssmenu li ul a {
       font-size: 11px !important;
   }
   .featured_title {
       font-size: 2.5em;
   }
   .featured_desc {
       font-size: 1.2em;
       font-weight: normal;
       max-width: 90%;
   }
   
}
