/* ==========================================================================
   Near Miss form (observations/create) - same look as Leaders Listen to Learn
   All rules are scoped to .guestcss so no other page is affected.
   ========================================================================== */

/* Card */
.guestcss {
    max-width: 1110px;
    margin: 0px auto 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}

/* Card header (page title) */
.guestcss > .gc-form-title {
    margin: 0;
    padding: 20px 15px;
    background: #545859;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.guestcss .cardcls {
    padding: 18px 28px 26px;
}
.guestcss > .gc-form-title h5 {
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding-bottom: 0;
}

/* Identity note under the header */
.guestcss > .alert.alert-secondary {
    margin: 22px 28px 0;
    padding: 12px 16px;
    background: #f3f3f3;
    border: 0;
    border-left: 4px solid #D22730;
    border-radius: 12px;
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

/* Card body */
.guestcss form > .card-body {
    padding: 18px 28px 26px;
}

.guestcss .form-group {
    margin-bottom: 14px;
}

/* Labels */
.guestcss .form-group > label {
    display: block;
    margin-bottom: 5px;
    color: #545859;
    font-size: 14px;
    font-weight: 600;
}

.guestcss .required {
    margin-left: 2px;
    color: #D22730;
}

/* Inputs / textareas */
.guestcss .form-control {
    height: 40px;
    border-color: #ced4da;
    border-radius: 4px;
    font-size: 15px;
}

.guestcss textarea.form-control {
    height: auto;
    min-height: 90px;
    resize: vertical;
}

.guestcss .form-control:focus {
    border-color: #D22730;
    box-shadow: 0 0 0 .15rem rgba(210, 39, 48, .2);
}

/* Searchable select boxes (select2) */
.guestcss .select2-container {
    width: 100% !important;
}

.guestcss .select2-container .select2-selection--single,
.guestcss .gcsptreeviewwapepe .select2-container--default .select2-selection--single {
    height: 40px;
    padding: 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.guestcss .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    line-height: 38px;
    color: #495057;
    font-size: 15px;
}

.guestcss .select2-container .select2-selection--single .select2-selection__arrow,
.guestcss .gcsptreeviewwapepe .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 6px;
}

.guestcss .select2-container--open .select2-selection--single,
.guestcss .select2-container--focus .select2-selection--single,
.guestcss .gcsptreeviewwapepe .select2-container--open .select2-selection--single {
    border-color: #D22730;
}

/* Check boxes + radio buttons - square box, red with white tick when selected */
.guestcss .form-check {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-left: 0;
}

.guestcss .form-check > .invalid-feedback {
    flex-basis: 100%;
}

.guestcss .form-check-input[type="checkbox"],
.guestcss .form-check-input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    border: 2px solid #545859;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    transition: all .15s ease;
}

.guestcss .form-check-input[type="checkbox"]:hover,
.guestcss .form-check-input[type="radio"]:hover {
    border-color: #D22730;
}

.guestcss .form-check-input[type="checkbox"]:checked,
.guestcss .form-check-input[type="radio"]:checked {
    border-color: #D22730;
    background: #D22730;
}

.guestcss .form-check-input[type="checkbox"]:checked::after,
.guestcss .form-check-input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.guestcss .form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(210, 39, 48, .25);
}

.guestcss .form-check-label {
    margin: 0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.guestcss .form-check-label a {
    color: #D22730;
}

/* Radio groups (Action required / How would you like to submit) - grey box like LLTL questions */
.guestcss .rightcheckbox {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 6px;
}

.guestcss .rightcheckbox .form-check {
    margin: 0;
}

/* Submit button - centred like LLTL */
.guestcss .gcspaddobservation {
    display: block;
    margin: 20px auto 0;
    padding: 9px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
}

/* Hidden popup trigger next to the submit button should not take up space */
.guestcss .gcspopenagreepopup {
    position: absolute;
}

/* Error messages */
.guestcss .invalid-feedback {
    color: #D22730;
    font-size: 12px;
}

@media (max-width: 767px) {
    .guestcss {
        margin-top: 15px;
    }

    .guestcss > .alert.alert-secondary {
        margin: 16px 15px 0;
    }

    .guestcss form > .card-body {
        padding: 16px 15px 22px;
    }
}
