/**
 * Copyright (C) 2011-2013, Datahouse AG
 * All information and intellectual or technical concepts contained
 * herein remains the property of Datahouse AG. Any reproduction,
 * modification, distribution or public displaying of this source code
 * without written consent from the copyright holder is strictly
 * prohibited.
 */

html, body, div#page {
    height: 100%;
}

div#page {
    display: flex;
    flex-direction: column;
}

div#content {
    flex: 1 0 auto;
}

div#footer {
    flex-shrink: 0;
}

/* header */
div.survey_header h1 {
    float: left;
}

/* progess bar */
div#progress_bar {
    position: relative;
    float: right;
    width: 300px;
}

div#progress_bar img {
    position: absolute;
}

div#progress_bar span {
    position: absolute;
    top: 50%;
    left: 50%;
}

/* general form layout */
div.form {
    clear: both;
    position: relative;
}

div.answer {
    margin-bottom: 10px;
    width: 480px;
}

div.answer div {
    padding: 5px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

div.jnt {
    margin-bottom: 30px;
    overflow: hidden;
}

div.question {
    border-bottom: 1px dotted #000;
    padding: 10px 0;
    width: 800px;
}

div.answer label {
    display: block;
    width: 425px;
    margin-left: 20px;
}

div.answer input[type="radio"],
div.answer input[type="checkbox"] {
    width: 22px;
    height: 22px;
}

div.form_survey > div.answer,
div.form_survey > div.answer textarea {
    width: 100%;
}

div.form_survey > div.answer textarea {
    min-height: 150px;
}

/* titles */
div.intro {
    clear: both;
    margin: 15px 0 15px;
    font-size: 15px;
    font-weight: bold;
}

div.intro ul, div.intro p {
    font-size: 15px;
    font-weight: normal;
}

div.page {
    clear: both;
    margin: 15px 0 15px;
    font-size: 19px;
    font-weight: bold;
}

div.intro li {
    background-image: url("../img/ic_list.png");
    background-position: 10px 2px;
    background-repeat: no-repeat;
    margin: 5px 0;
    padding-left: 26px;
}

div.page {
    clear: both;
    margin: 15px 0 15px;
    font-size: 19px;
    font-weight: bold;
}

div.desc {
    margin: 10px 0 10px;
}

/* paragraphs */
p.error {
    clear: both;
    color: #FF0000;
}


p.question {
    margin: 20px 0 12px;
}

p.desc {
    display: inline;
    margin-left: 5px;
}

/* joint fields */
div.jnt div.question {
    clear: both;
    float: left;
    width: 800px;
    display: flex;
    align-items: center;
}

div.jnt div.answer {
    float: left;
    margin: 0;
}

div.jnt div.header {
    margin: 0 0 25px 209px;
    overflow: hidden;
}

div.jnt div.header div,
div.jnt div.answer div {
    display: flex;
    justify-content: center;
    float: left;
    margin: 0 3px;
    text-align: center;
    width: 73px;
}

div.jnt p.question {
    float: left;
    margin: 0 0 5px 0;
    width: 200px;
}

/* joint 3 answers */
div.jnt.c3 div.header {
    margin-left: 288px; /* := x */
}

div.jnt.c3 p.question {
    width: 288px;
}

div.jnt.c3 div.header,
div.jnt.c3 div.answer {
    width: 512px; /* = 800 - x */
}

div.jnt.c3 div.header div,
div.jnt.c3 div.answer div {
    width: 164px; /* = floor(800 - x / 3)  - 6 */
}

/* joint 4 answers */
div.jnt.c4 div.header {
    margin-left: 288px; /* := x */
}

div.jnt.c4 p.question {
    width: 288px;
}

div.jnt.c4 div.header,
div.jnt.c4 div.answer {
    width: 512px; /* = 800 - x */
}

div.jnt.c4 div.header div,
div.jnt.c4 div.answer div {
    width: 122px; /* = floor(800 - x / 4)  - 6 */
}

/* The :has pseudo-class presents a way of selecting a parent element or a previous sibling element
   with respect to a reference element by taking a relative selector list as an argument. */
div.jnt.c4 p.question:has(+ button.remove-question) {
    width: 238px;
}

div.jnt.c4 button.remove-question {
    cursor: pointer;
    background: none;
    border: none;
    margin: 0 16px;
}

div.jnt.c4 button.remove-question > img {
    height: 18px;
}


/* joint 5 answers */
div.jnt.c5 div.header {
    margin-left: 300px; /* := x */
}

div.jnt.c5 p.question {
    width: 300px; /* x */
}

div.jnt.c5 div.header,
div.jnt.c5 div.answer {
    width: 500px; /* = 800 - x */
}

div.jnt.c5 div.header div,
div.jnt.c5 div.answer div {
    width: 94px; /* = floor(800 - x) / 5 - 6 */
}

/* joint 6 answers */
div.jnt.c6 div.header {
    margin-left: 280px; /* := x */
}

div.jnt.c6 p.question {
    width: 280px; /* x */
}

div.jnt.c6 div.header,
div.jnt.c6 div.answer {
    width: 520px;  /* = 800 - x */
}

div.jnt.c6 div.header div,
div.jnt.c6 div.answer div {
    width: 98px; /* = floor(755 - x) / 5 - 6 */
}

div.lastchild {
    background-color: #E1E1E1;
}

/* joint 7 answers */
div.jnt.c7 div.header {
    margin-left: 320px; /* := x */
}

div.jnt.c7 p.question {
    width: 320px; /* x */
}

/* The :has pseudo-class presents a way of selecting a parent element or a previous sibling element
   with respect to a reference element by taking a relative selector list as an argument. */
div.jnt.c7 p.question:has(+ button.remove-question) {
    width: 270px;
}

div.jnt.c7 button.remove-question {
    cursor: pointer;
    background: none;
    border: none;
    margin: 0 16px;
}

div.jnt.c7 button.remove-question > img {
    height: 18px;
}

div.jnt.c7 div.header,
div.jnt.c7 div.answer {
    width: 480px; /* = 800 - x */
}

div.jnt.c7 div.header div,
div.jnt.c7 div.answer div {
    width: 62px;  /* = floor(800 - x) / 7 - 6 */
}

div.jnt div.question .question-header {
    display: flex;
}

/* div.jnt.c7 div.header div:nth-child(2),
div.jnt.c7 div.answer div:nth-child(3),
div.jnt.c7 div.header div:nth-child(3),
div.jnt.c7 div.answer div:nth-child(4),
div.jnt.c7 div.header div:nth-child(4),
div.jnt.c7 div.answer div:nth-child(5),
div.jnt.c7 div.header div:nth-child(5),
div.jnt.c7 div.answer div:nth-child(6) {
    width: 62px;
}

div.jnt.c7 div.header div:nth-child(1),
div.jnt.c7 div.answer div:nth-child(2),
div.jnt.c7 div.header div:nth-child(6),
div.jnt.c7 div.answer div:nth-child(7) {
    width: 62px;
} */

/* input fields */
input[type="text"] {
    width: 150px;
}

input[type="text"].suggestion {
    width: 350px;
}

.ui-autocomplete {
    height: 200px;
    overflow-y: scroll;
    overflow-x: hidden;
}

a.suggestion_no_answer {
    margin-left: 20px;
}

span.underline {
    text-decoration: underline;
}

div.form div.desc ul li {
    list-style-type: initial;
    margin-left: 15px;
}