﻿
#TrainingWrapper > section {
    @media (max-width: 1001px) {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;

        .inputs {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            position: relative;
            width: 90%;
            max-width: 400px;

            > label {
                height: 20px;
                line-height: 20px;
            }
        }

        .required {
            position: absolute;
            top: 0;
            right: 0;
        }
    }
}

.practitionerDesc {
    width: 60%;
    margin: 0px auto;
    text-align: left;

    p {
        margin: 2em 0em 2em 0em;
    }
}

#btnAttachCertificate {
    width: 100%;
    margin: 10px 0 1em 0;
    background-color: var(--yellow) !important;
    border: none;
    color: var(--black) !important;
    white-space: normal;
}

#TrainingWrapper,
#CertificateWrapper {
    width: 100%;
    text-align: center;
    margin-top: 0.5em;
    display: none;
}

#TrainingWrapper {
    @media (max-width: 768px) {
        margin-top: 0;
    }
}

#CertificateWrapper label {
    display: none;
}

#CertificateFile {
    display: none;
}

.warning {
    color: red;
}

.practStatusWrapper {
    --size: 1.8rem;

    width: 450px;
    max-width: 100%;
    margin: 0px auto;
    text-align: left;
    margin-bottom: 2em;

    @media (max-width: 768px) {
        text-align: center;
    }

    label {
        display: block;
    }

    input {
        appearance: none;
        position: relative;
        width: var(--size);
        height: var(--size);
        margin-left: 1.0em;
        margin-right: 0.3em;

        &::before {
            content: "";
            display: block;
            width: var(--size);
            height: var(--size);
            background-color: #fff;
            border: 0.5px solid var(--black);
            border-radius: 50%;
        }

        &:checked::after {
            content: "";
            display: block;
            position: absolute;
            top: 50%;
            left: 50%;
            width: calc(var(--size) / 2);
            height: calc(var(--size) / 2);
            background-color: var(--black);
            border-radius: 50%;
            transform: translate(-50%, -50%);
        }

        + span {
            height: var(--size);
            line-height: var(--size);
        }
    }

    .rWrapper {
        display: flex;
        margin-bottom: 8px;
    }
}

#studentWrapper,
#qualifiedWrapper,
#clientWrapper {
    display: none;
    margin: 1em 0em 1em 0em;
    text-align: center;
}

#newsletterWrapper {
    width: 100%;
    text-align: center;
    margin-top: 3em;
    display: none;
}

.practTypeQu {
    margin: 0 0 0.7em 1em;
    color: #444;
}

#qualificationRequirementWrapper {
    display: block;
    width: 100%;
    margin-bottom: 2em;
    text-align: center;

    @media (max-width: 1001px) {
        margin-bottom: 1rem;
    }
}

#SelectedMembershipIds_chosen .search-choice,
#SelectedDisciplineIds_chosen .search-choice,
#SelectedQualificationIds_chosen .search-choice,
#SelectedTrainingEstablishmentIds_chosen .search-choice {
    padding: 8px 20px 8px 8px !important;
    font-size: 14px !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

#SelectedMembershipIds_chosen .chosen-search-input,
#SelectedDisciplineIds_chosen .chosen-search-input,
#SelectedQualificationIds_chosen .chosen-search-input,
#SelectedTrainingEstablishmentIds_chosen .chosen-search-input {
    font-size: 14px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: #777 !important;
}

#AnticipatedFinishDate {
    width: 400px;
    min-height: 38px;
    padding: 8px;
    background: transparent;
    border-radius: 5px;
    border: 1px solid var(--black);
}

.multi-select {
    --size: 40px;

    display: flex;
    flex-wrap: wrap;

    > label {
        line-height: var(--size);
    }

    .multi-select__container {
        display: inline-block;
        position: relative;

        @media (max-width: 1001px) {
            width: 100%;
        }

        select {
            height: 0;
            min-height: 0;
            padding: 0;
            border: none !important;

            @media (min-width: 1001px) {
                height: 0;
                min-height: 0;
            }
        }

        .multi-select__cover {
            max-width: 400px;
            width: 100%;
            min-height: var(--size);
            padding-left: 0.5rem;
            background-color: #fff;
            border: 1px solid var(--black);
            border-radius: 5px;
            font-size: 1rem;
            line-height: var(--size);
            cursor: pointer;

            > span {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                padding-left: 0.5rem;
                color: rgb(50, 50, 50);
                white-space: nowrap;
                overflow: hidden;
            }
        }
    }

    .multi-select__selected {
        display: flex;
        flex-wrap: wrap;
        padding-top: 2px;

        > li {
            display: flex;
            min-height: calc(var(--size) - 6px);
            margin-right: 0.5rem;
            margin-bottom: 2px;
            padding-left: 0.5rem;
            background-color: var(--yellow);
            border-radius: 4px;
            line-height: calc(var(--size) - 6px);

            button {
                display: flex;
                justify-content: center;
                align-items: center;
                width: calc(var(--size) - 6px);
                height: calc(var(--size) - 6px);
                margin-left: 0.5rem;
                background-color: transparent;
                border: none;
                transition: 500ms;
                outline: none;

                &:hover {
                    background-color: rgba(0, 0, 0, 0.3);
                    color: #fff;
                }
            }

            svg {
                width: calc(var(--size) - 12px);
                height: calc(var(--size) - 12px);

                line {
                    stroke-width: 2px;
                    stroke: var(--black);
                    stroke-linecap: round;
                }
            }
        }
    }

    .multi-select__pop-out {
        &::before {
            content: "";
            display: block;
            position: fixed;
            z-index: 1;
            top: 100%;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.3);
            opacity: 0;
            transition: opacity 500ms;
        }

        &.multi-select__pop-out--visible {
            &::before {
                top: 0;
                opacity: 1;
            }

            .multi-select__wrapper {
                top: 50%;
            }
        }

        &.multi-select__pop-out--closing {
            &::before {
                top: 0;
                opacity: 0;
            }

            .multi-select__wrapper {
                top: 150%;
            }
        }
    }

    .multi-select__wrapper {
        position: fixed;
        z-index: 1;
        top: 150%;
        left: 50%;
        width: 90%;
        max-width: 400px;
        height: 80vh;
        padding: 3rem 0;
        background-color: #fff;
        border-radius: 1rem;
        transform: translate(-50%, -50%);
        overflow-y: auto;
        transition: 500ms;

        > p {
            position: absolute;
            top: 1rem;
            width: 100%;
            margin-bottom: 0.5rem;
            font-size: 1rem !important;
            text-align: center;
            line-height: 1rem;
        }

        button {
            display: flex;
            justify-content: center;
            align-items: center;
            position: absolute;
            top: 4px;
            right: 4px;
            width: 42px;
            height: 42px;
            margin: 0;
            padding: 0;
            background-color: #fff;
            border: none;
            transition: 500ms;
            outline: none;

            &:hover {
                background-color: rgba(0, 0, 0, 0.3);
                color: #fff;
            }

            svg {
                width: 38px;
                height: 38px;

                line {
                    stroke-width: 2px;
                    stroke: var(--black);
                    stroke-linecap: round;
                }
            }
        }

        li input {
            width: 25px;
        }
    }

    .multi-select__choices {
        list-style: none;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow-y: auto;

        > li {
            font-size: 1rem !important;
            line-height: 1.5rem;
            cursor: pointer;
            transition: 500ms;

            &:hover {
                background-color: var(--yellow);
                color: #fff;
            }

            > label {
                display: flex;
                justify-content: flex-start;
                gap: 1rem;
                margin-bottom: 0;
                padding: 0.5rem;
                cursor: pointer;

                span {
                    width: calc(100% - 1rem - 25px);
                    text-align: left;
                    -webkit-user-select: none;
                    user-select: none;
                }
            }
        }
    }

    .multi-select__other {
        width: 100%;
    }
}

/* The referring-practitioner label is longer than the fixed label column.
   The field row is nowrap, so without this the label paints across the text box. */
#clientWrapper .inputs label {
    white-space: normal;
    line-height: 20px;
}

#clientWrapper .inputs .required {
    vertical-align: middle;
}
