/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Le thème cache tous les labels dans .brochures-form-container form,
   on réaffiche ceux qui ont besoin d'être visibles */
.brochures-form-container .fieldset--boolean label {
    display: inline-block;
    color: #fff;
}


/* Uniform fields: white background, dark grey text (inputs, textareas, selects) */
.brochures-form-container form input:not([type="checkbox"]):not([type="radio"]),
.brochures-form-container form textarea,
.brochures-form-container form select,
.brochures-form-container form select option {
    background-color: #fff;
    color: #494948;
}
.brochures-form-container form input::placeholder,
.brochures-form-container form textarea::placeholder {
    color: #494948;
    opacity: 1;
}

/* Multi-select widget */
.ocs-ms {
    position: relative;
    display: block;
}
/* Hide the .formSelect wrapper injected by the parent theme inside the widget */
.brochures-form-container .ocs-ms .formSelect {
    display: none !important;
}
.ocs-ms__ctrl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-height: 35px;
    padding: 6px 42px 6px 10px;
    border: 0 none;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    position: relative;
    outline: none;
}
.ocs-ms__arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #000;
    transition: transform .18s;
    pointer-events: none;
}
.ocs-ms--open .ocs-ms__arrow {
    transform: translateY(-50%) rotate(180deg);
}
.ocs-ms__ph {
    color: #494948;
    pointer-events: none;
    font: -webkit-small-control; /* match the native select/input fields in the form */
}
.ocs-ms__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 7px;
    background: #e8e8e8;
    border-radius: 2px;
    color: #494948;
    font-size: .82em;
    font-weight: 500;
    line-height: 1.3;
}
.ocs-ms__x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(0,0,0,.15);
    border-radius: 50%;
    font-size: .8em;
    font-style: normal;
    cursor: pointer;
    line-height: 1;
}
.ocs-ms__x::after {
    content: '×';
}
.ocs-ms__x:hover {
    background: rgba(0,0,0,.3);
}
.ocs-ms__menu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 0 none;
    border-radius: 0;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.ocs-ms--open .ocs-ms__menu {
    display: block;
}
.ocs-ms__item {
    padding: 9px 14px;
    color: #494948;
    font: -webkit-small-control; /* match the native select/input fields in the form */
    cursor: pointer;
    transition: background .12s;
}
.ocs-ms__item:hover:not(.ocs-ms__item--on) {
    background: #f0f0f0;
}
.ocs-ms__item--on {
    background: #e8e8e8;
    font-weight: 600;
}
.ocs-ms__item--on::before {
    content: '✓ ';
    opacity: .6;
}
.ocs-ms__item--off {
    display: none;
}

/* Submit button */
.brochures-form-container .btn-container {
    text-align: center !important;
}
.brochures-form-container .btn-container button {
    color: #fff !important;
}

/* Specific */

@media only screen and (min-width: 768px) {

    #ocs-form-2 fieldset:nth-of-type(2n +1),
    #ocs-form-46 fieldset:nth-of-type(2n +1) {
        clear: none;
    }

    #ocs-form-2 .fieldset--civilite_common_ref_id,
    #ocs-form-46 .fieldset--civilite_common_ref_id {
        clear: both;
        width: 100%;
        padding-right: calc(50% + 40px);
    }
}

.brochures-form-container .fieldset--wide {
    width: 100% !important;
    clear: both;
    float: none;
}

@media only screen and (min-width: 768px) {
    .brochures-form-container form fieldset.fieldset--no-clear {
        clear: none !important;
    }
}
/* Validation error state for field groups */
.fieldset--ocs-group.fieldset--error .ocs-ms__ctrl,
.fieldset--ocs-group.fieldset--error select {
    border-color: #dc3232 !important;
    outline-color: #dc3232;
}

/* Validation error state for boolean (checkbox) fields */
.fieldset--boolean.fieldset--error input[type="checkbox"] + label::before,
.fieldset--boolean.fieldset--error input[type="checkbox"] + label {
    outline: 2px solid #dc3232;
    outline-offset: 2px;
}
