﻿/* per element  - try  Layout/Box model/ typography / visual */

html, body {
    background-color: #0e113d;
    height: 100%;
    margin: 0;
}

body {
    background-color: inherit;
    box-sizing: border-box;
    color: white;
    font-family: "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 450;
    line-height: 1.4;
    margin: 0;
    padding: 0 1rem;
}

    body.page {
        display: flex;
        flex-direction: column;
    }

h1, h2, h3 {
    padding-left: 10px;
    color: inherit;
}

/* Improved layout and spacing */
section {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

label {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: bold;
}

a {
    color: aquamarine;
}

ul {
    margin: 20px 7px 2px 4px;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.8);
    margin-left: 5px;
}

form {
    max-width: 800px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    padding-bottom: 100px;
}

.fullcontainer {
    max-width: 96%;
    margin: 0 auto;
    padding: 0 1rem;
    padding-bottom: 100px;
}

.fullscreen-page .container {
    width: 100%;
}

@media (max-width: 600px) {
}

.header {
    background-color: #0e113d;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.header__brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #002147;
    text-decoration: none;
}

.header__toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
}

.menu {
    display: flex;
    flex-direction: row;
    padding-left: 10px;
    z-index: 100;
}

.menu__list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.menu__item {
    position: relative;
}

.menu__link {
    text-decoration: none;
    color: #a8afc8;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

    .menu__link:hover {
        color: #c5a900;
    }

.menu__submenu {
    display: none;
    position: absolute;
    border: 1px solid #666;
    top: 100%;
    left: 0;
    background: #0e113d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.5rem 10px;
    margin: 0;
    min-width: 350px;
    z-index: 1000;
}

.menu__submenu-item {
    width: 100%;
}

.menu__submenu-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #002147;
    text-decoration: none;
}

    .menu__submenu-link:hover {
        background-color: #f0f0f0;
        color: #c5a900;
    }

.menu__item--has-submenu:hover > .menu__submenu {
    display: block;
}

.footer {
    background-color: #f8f8f8;
    padding: 1rem 0;
    text-align: center;
}

.footer__text {
    margin: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 968px) {
    body {
        font-size: 16px;
    }

    form {
        padding: 0 1rem;
    }

    .page {
        min-width: 120px;
    }

    .header__toggle {
        display: block;
    }

    .menu.menu--open {
        display: flex;
    }

    .menu__list {
        flex-direction: column;
        gap: 0;
    }

    .menu__submenu {
        position: static;
        box-shadow: none;
        margin-left: 10px;
    }

    .menu__item--has-submenu:hover > .menu__submenu {
        display: none;
    }

    .menu__item--has-submenu.menu__item--open > .menu__submenu {
        display: block;
    }
}

.content {
    flex: 1;
}

footer {
    background-color: #f1f1f1;
    padding: 10px;
    text-align: center;
}

img.page__logo {
    padding: 15px 10px;
    max-width: 30%;
    height: auto;
}

.header-greeting {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: 0;
    right: 80px;
    width: 100%;
    padding: 0 0 5px 10px;
    color: #a8afc8;
}

    .header-greeting a {
        color: #a8afc8;
    }

.p-3, .p-4 {
    margin-top: 16px;
}

@media screen and (max-width: 768px) {
    .header-greeting {
        display: flex;
        justify-content: flex-start;
        position: absolute;
        top: 0;
        left: 0px;
        width: 100%;
        padding: 0 10px 0px 10px;
        margin-bottom: 5px;
        font-size: 16px;
    }

    h1, h2, h3 {
        padding-left: 10px;
        padding-top: 10px;
    }

    img.page__logo {
        box-sizing: border-box;
        padding: 35px 10px;
        width: 100%;
        min-width: 320px;
        min-height: 30px;
        height: auto;
    }
}

.medical_title {
    font-size: larger;
    padding: 5px 2px 5px 10px;
    font-size: larger;
}

.question_text,
.consent_message {
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    flex: 1 1 auto;
    min-width: 200px;
    text-align: left;
    vertical-align: top;
    align-content: baseline;
}

.consent_question_container {
    padding: 5px 10px 2px 10px;
}

.form_label_check {
    vertical-align: top;
}

/* Layout for consent_question: allows wrapping */
.consent_question {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
}

    .consent_question label {
        white-space: nowrap;
        margin-right: 0.5rem;
    }

    .consent_question::after {
        content: attr(data-question);
        flex: 1 1 auto;
        min-width: 50px;
    }

    .medical__section__question.showblock,
    .consent_question.showblock {
        display: flex;
    }

    .medical__section__question.hideblock,
    .consent_question.hideblock {
        display: none;
    }

/* Allow wrapping inside the message/text blocks */
.consent_message,
.question_text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.standard_note {
    margin-top: 10px;
    resize: none;
    overflow: hidden;
    min-height: 1.5em;
    width: 100%;
    box-sizing: border-box;
}

.medical__section {
    margin-bottom: 100px;
}

.medical__section__question {
    border: 5px solid #868889;
    margin-bottom: 30px;
    margin: 10px 0 10px 0;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    color: #f0f0f0;
    background-color: #ffffff10; /* subtle translucent white */
}

.medical_title.Consent,
.medical_title.Confirm,
.medical_title.Info,
.medical_title.Standard {
    border-radius: 8px;
    font-size: 1.2em;
    padding: 10px;
    color: #ffffff;
}

.medical_title.Standard {
    background-color: #5E2E8D;
}

.medical_title.Info {
    background-color: #1C9DD8;
}

.medical_title.Consent,
.medical_title.Confirm {
    background-color: #4a4d6e;
    border-radius: 8px;
}

.priority {
    background-color: #E74C3D;
    border-radius: 8px;
    color: white;
    font-weight: 550;
    padding: 0.2px 10px;
}

/* Standard Questions*/

/* Layout for standard_question: stays on one line */
.standard_question {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto; /*Optional: scrolls horizontally if needed */
}

    /*.standard_question {
    display: flex;
    flex-wrap: wrap;*/ /* allows children to break lines */
    /*align-items: center;
    gap: 0.75rem;
    overflow-x: auto
}*/
    .standard_question .question_text {
        white-space: normal;
        flex: 1 1 auto;
        min-width: 200px;
    }

    .standard_question label {
        white-space: nowrap;
        margin-right: 0.5rem;
    }

    .standard_question::after {
        content: attr(data-question);
        flex: 1 1 auto;
        min-width: 50px;
    }

    .standard_question.showblock {
        display: flex;
    }

    .standard_question.hideblock {
        display: none;
    }

    .standard_question .textarea_wrapper {
        flex-basis: 100%;
        margin-top: 0.75rem;
    }

        .standard_question .textarea_wrapper textarea {
            width: 100%;
            display: block;
            padding: 0.5rem;
            font-size: 1rem;
            border: 1px solid #ccc;
            border-radius: 4px;
            resize: vertical;
        }

.medical__section__question.valid {
    border: 5px solid #38B449;
}

.medical__section__question.invalid {
    border: 5px solid #E74C3D;
}

.form-submit {
    display: block;
    margin-left: auto; /* Pushes the button to the right */
    padding: 10px 20px;
    background-color: #005a9c; /* BSN blue tone */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .form-submit:hover {
        background-color: #004080; /* Slightly darker on hover */
    }

.medical__section__submit {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Optional: adds spacing */
    gap: 1rem; /* Optional: adds space between GDPR and button */
}

.gdpr {
    background-color: #004080;
    border-radius: 8px;
    font-size: 1.2em;
    padding: 0px 10px;
    color: #ffffff;
    flex: 1; /* Allows GDPR text to take up remaining space */
}

.form-submit {
    flex-shrink: 0; /* Prevents the button from shrinking */
}

.custom-checkbox-group {
    display: flex;
    gap: 1rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    margin-right: 8px;
    position: relative;
    background-color: #fff;
}

    .checkbox-box.checked::after {
        content: "✔";
        position: absolute;
        top: -2px;
        left: 2px;
        font-size: 16px;
        color: green;
    }

/* Hide the native radio button */
input[type="radio"].form-check-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #555;
    border-radius: 4px; /* Makes it square like a checkbox */
    background-color: #fff;
    cursor: pointer;
    margin-right: 8px;
    position: relative;
}

    /* Show a checkmark when selected */
    input[type="radio"].form-check-input:checked::after {
        content: "";
        position: absolute;
        top: 1px;
        left: 4px;
        width: 6px;
        height: 12px;
        border: solid #000;
        border-width: 0 2px 2px 0;
        transform: rotate(40deg);
    }

.form-check {
    display: flex;
    gap: 1rem;
}

    .form-check label {
        display: flex;
        align-items: flex-start;
        gap: 0.25rem;
    }

.question-block {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}