/* setup palette for school */
:root {
    
    /* add some fallbacks */
    --widget-border-size: 2;
    --widget-colour: #0091da;
    --widget-accent: #0161a0;
    --widget-outline: #0192da36;
    --banner-image: url("https://via.placeholder.com/640x360");    
    /* done with fallbacks */
    
    --primary: var(--widget-colour);
    --primary-accent:var(--widget-accent);
    --bs-primary-bg-subtle:var(--widget-subtle) !important;
}
:root h1, :root h2{
     color: var(--heading-colour)
}
:root .accordion{ 
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem var(--widget-outline); 
} 
.form-control:focus, .form-select:focus{ 
    border-color: var(--widget-subtle); 
    box-shadow: 0 0 0 .25rem var(--widget-outline);
} 
.btn:focus-visible { 
    box-shadow: 0 0 0 .25rem var(--widget-outline);
} 
.banner-image{
    background: linear-gradient(90deg, rgba(255, 255, 255, 100) 0%, rgba(255, 255, 255, 0) 30%), var(--banner-image);
    background-position: center center;
    background-size:cover;
    width:100%;
}

.logo-image{
    width:250px;
    height:100px;
    background: var(--logo-image) no-repeat;
    background-size:contain;
    background-position: center left;
} 




/* hide the asterisk for required, and replace it with a bold caption */
.require, .answer br{
    display:none;
}
.mandatory .elementcaption{
    font-weight:bold;
}

/* set the colours for warning text, in-error and valid controls */
.warning{
    color:#8f0000;
    font-size:0.9em;
}

.form-control:focus, .form-select:focus {
    border-color: #dee2e6 !important;
    box-shadow: 0 0 0 .25rem var(--widget-outline) !important;  
}

.form-control.inerror{
    border-color: #dc3545;
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat:no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
.form-select.inerror{
    border-color: #dc3545;
    padding-right: 4.125rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat:no-repeat;
    background-position: right .75rem center, center right 2.25rem;
    background-size: 16px 12px, calc(.75em + .375rem) calc(.75em + .375rem);
}
/*
.form-control.valid{
    border-color: #198754;
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
.form-select.valid{
    border-color: #198754;
    padding-right: 4.125rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat:no-repeat;
    background-position: right .75rem center, center right 2.25rem;
    background-size: 16px 12px, calc(.75em + .375rem) calc(.75em + .375rem);
}

.optional .form-control.valid{
    background-image:none;
    border-color:rgb(222, 226, 230);
}*/

/* style radio buttons */
input[type="radio"] { /* hides the real control, the label is clickable */
    position: absolute;
    left: -99999px;
}
.productField input[type="radio"] + label{
    border: 2px solid rgba(0, 0, 0, 0);
    padding: 5px;
}
.productField { /* allows answers to float side by side */
    float: left;
    display: flex;
    max-width: 100%;
    width: 100%;
    margin-bottom: 0;
}
.checkbox .productField:first-of-type{ /* set checkboxes to have the checkbox class to override the floats */
    max-width: unset;
    width:auto;
    zoom:2;
    padding-right:5px;
} 

input[type="radio"] + label::before, input[type="checkbox"] + label::before { /* draws a grey circle for unselected radio*/
    content: '';
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-right: .5em;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: 200px;
    vertical-align: middle;
    cursor: pointer;
}
input:checked + label::before { /* puts a tick in the selected item */
    content: '';
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"><style type="text/css">.st0{fill:%23FFFFFF;}</style><g><path class="st0" d="M16.8,2.5l-9.3,9.3L3.2,7.6C3,7.3,2.6,7.3,2.3,7.6L0.2,9.7c-0.2,0.2-0.2,0.6,0,0.9l4.3,4.3L7,17.5 c0.2,0.2,0.6,0.2,0.9,0l2.6-2.6l9.3-9.3c0.2-0.2,0.2-0.6,0-0.9l-2.2-2.2C17.4,2.3,17,2.3,16.8,2.5z"/></g></svg>') center no-repeat;
    display: inline-block;
    background-color: var(--primary);
    border: none;
}

input[type="radio"] + label:hover::before,
input[type="checkbox"] + labelhover::before,
input[type="radio"] + label:focus::before,
input[type="checkbox"] + labelfocus::before,
input[type="checkbox"] + label:hover::before { /* adds hover to the radio */
    border: var(--widget-border-size) solid var(--primary);
}

/* handle jQuery widgets */
.ui-slider-horizontal { /* default bar scale and position (with extended right hand edge */
    height: .3em;
    border:none;
    margin:1em;
    border-right:1em var(--bs-border-color) solid;
    width:calc(100% - 1em); /* allows the right hand edge to extend beyond margin*/
}

.ui-slider-range { /* selected bar */
    background: var(--primary);
    border-radius:0;
}
.ui-slider-range:before { /* extend the selected bar to account for the margin of 1em on the slider*/
    background: var(--primary);
    content:'';
    display:block;
    height:.3em;
    margin-left:-1em;
    font-size: 1.5em;
    border-radius: 3px 0 0 3px
}

.ui-slider .ui-slider-handle { /* position the slider handle */
    border: 1px solid var(--primary);
    background: var(--primary);
    width: 2em;
    height: 2em;
    border-radius:40px;
    top: -0.9em;
    margin-left: -1em;
    border:var(--widget-border-size) solid var(--primary);
    background:white;
}

/* sort buttons */
#main .btn-primary, #main .buttonState{
    background:var(--primary);
    border-color:var(--primary);
}
#main .buttonState{ /* should be slightly transparent unless active */
 color:rgba(255,255,255,0.6);
}   
#main .btn-primary:hover, #main .buttonState.active, #main .buttonState:hover{
    background:var(--primary-accent);
    border-color:var(--primary-accent);
    color:white;
}
/* extend to allow button state stretch */
.bs-stretch .strm-bs-group-3{
    width:33%;
    text-align:center;
}
/* format accordion content */
.accordion-body h2{
    font-size:1rem;
}
