.sbc-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.sbc-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
    position: relative;
}

.sbc-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.sbc-close:hover,
.sbc-close:focus {
    color: #000;
    text-decoration: none;
}

.questionnaire-button {
    text-align: center;
}

.questionnaire-button p {
    margin-bottom: 10px;
}

#open-medical-questionnaire {
    background-color: #0073aa;
    color: #fff!important;
    padding: 10px 18px;
    border: none!important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 22px;
    margin-bottom: 20px;
}

#open-medical-questionnaire:hover {
    background-color: #005177;
}

#medical-questionnaire-modal button#saveandclose {
    margin-top: 20px;
    background-color: #0073aa;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#medical-questionnaire-modal button#saveandclose:hover {
    background-color: #005177;
}

#medical-questionnaire-modal h3 {
    padding-top: 15px;
    padding-bottom: 5px;
}

#medical-questionnaire-modal .flex {
    display: flex;
    flex-wrap: wrap;
}

#medical-questionnaire-modal .flex > .element {
    flex-basis: 33.33%;
}

#medical-questionnaire-modal .flex > * {
    padding: 2px;
}

.medical_history {
    margin-bottom: 0px;
    display: flex;
    flex-wrap: wrap;
}

.medical_history .medical_history_question {
    flex-basis: 50%;
    border-bottom: thin solid var(--color-content-border);
    border-left: thin solid var(--color-content-border);
    box-sizing: border-box;
    padding: 10px;
    display: flex;
}

.medical_history .medical_history_question:nth-of-type(1), .medical_history .medical_history_question:nth-of-type(2) {
    border-top: thin solid var(--color-content-border);
}

.medical_history .medical_history_question:nth-of-type(2n) {
    border-right: thin solid var(--color-content-border);
}

.medical_history .medical_history_question label {
    cursor: auto;
}

.medical_history .medical_history_question label, .medical_history .medical_history_question .answer {
    flex: 1
}

#medical-questionnaire-modal input, #medical-questionnaire-modal select {
    box-shadow: none;
    border: thin solid #333;
    border-radius: 10px;
}

.sleepiness_scale {
    display: flex;
    flex-wrap: wrap;
}

.sleepiness_scale label {
    font-size: 17px;
}

.sleepiness_scale .question {
    flex-basis: 50%;
    padding: 2px;
}

.frequency tr td:first-of-type {
    width: 75%;
}

.frequency label {
    font-size: 17px;
    line-height: 56px;
}

@media (max-width: 768px) {
    #medical-questionnaire-modal .flex > .element, .medical_history .medical_history_question, .sleepiness_scale .question {
        flex-basis: 100%;
    }
    .frequency tr td:first-of-type {
        width: 50%;
    }
    .frequency label {
        line-height: normal;
    }
}