
/*  As we are working with Mobile first then all of these elements will relate to the mobile root sizes. I have added medium and large to the media as well. */

/*
    TODO:   What are the supported font weights for Roboto?

    NOTE:   These could probably be covered using bold and bolder but I want a little more flexibility.
*/

    :root {

        --mobile: 320px;
        --tablet-screen: 800px;
        --pc-screen: 1280px;
        --min-reasonable-height: 800px;

/*  Work on everything being a font size related to this.   */

        --fs-default: 16px;

        --fs-mult-smaller: 0.8rem;
        --fs-mult-small: 1rem;
        --fs-mult-medium: 1.2rem;
        --fs-mult-large: 1.4rem;
        --header-one: 1.5rem;
        --header-two: 1rem;
        --standard-border-radius: 0.8rem;

        --button-size: 1.5rem;
/*        --button-size: 2.2rem;    */
        --inner-button-size: 0.8rem;

        --padding-one-unit: 1em;
        --padding-two-unit: 2em;
        --padding-three-unit: 3em;
        --padding-four-unit: 4em;
        --padding-five-unit: 5em;

/*  Image widths    */

        --image-width-small: 250px;
        --image-proportion-width: 0.7;

/*  Colours */

        --instruction-box-color: black;
        --button-color: rgba( 61, 30, 130, 1 );
        --instruction-box-bg: rgba( 56, 97, 75, 0.2 );
        --darkish-green: rgba( 56, 97, 75, 0.8 );
        --dark-brown: rgba( 97, 56, 78, 1 );
        --survey-box-background-color: rgba( 56, 78, 97, 0.05 );
        --light-grey: #AAA;
        --lightest-grey: #DDD;

        --button-background: rgba( 120, 105, 113, 1 );
        --button-background-hover: rgba( 97, 56, 78, 1 );
        --contact-us-colour: rgba( 240, 230, 163, 0.3 );
        --contact-us-colour-hover: rgba( 240, 230, 163, 0.5 );
    }

    * {
        font-size: var( --fs-default );
        margin: 0;
        padding: 0;
        box-sizing: border-box; /*  When you calculate the box size it includes padding and margin, otherwise the padding and margin expand the size of boxes */
        scroll-behavior: smooth;
        scroll-margin: 2rem;
    }

    html, body {
        font-family: 'Roboto', sans-serif;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    img, picture, svg {
        display: block;
        max-width: 100%;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h2, h3 {
        font-weight: 600;
        margin-bottom: 1.2rem;
    }

    p {
        display: inline-block;
        margin-bottom: 0.25em;
    }

    a {
        text-decoration: none;
        color: black;
    }

/*  This is going to be the main section    */

    .all-apart-from-footer {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        min-height: var( --min-reasonable-height );
        min-width: var( --mobile );
        max-width: var( --pc-screen );
        margin: 0 auto;
    }

/*  These are the shared elements between the pages. Header, Footer */

    header {
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: space-around;
        height: 10em;
        padding: var( --padding-one-unit );     /*  Using space around, this should not be needed. Although, in this instance I have buffered further with the padding  */
        background-color: var( --dark-brown );
        width: 100%;
    }

    nav {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        padding: 0.5em var( --padding-one-unit );
        border: 1px solid var( --lightest-grey );
        font-weight: 700;
        color: #555;
    }

    .display-when-not-mobile {
        display: none;
        visibility: hidden;
    }

    nav span {
        display: inline-block;
    }

    footer {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column-reverse;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 20em;
        padding: var( --padding-two-unit );
        font-weight: 700;
        font-size: var( --fs-mult-smaller );
    }

    .color-text-blue {

        color: blue;
    }

    .add-pointer {

        cursor: pointer;
    }

/*  These relate to the header  */

    .format-cas-logo {
        width: var( --image-width-small );
    }

    .display-image-full-width {
        display: none;
        visibility: hidden;
    }

    .mobile-element {
        display: inherit;
        visibility: visible;
        text-align: center;
    }

    .survey-title {
        margin-left: auto;
        margin-right: auto;
        color: white;
        font-size: var( --header-one );
    }

    .position-in-header {
        display: inline-block;
        color: white;
        font-size: var( --fs-mult-smaller );
        text-align: right;
    }

/*  These relate to the footer  */

    .much-smaller-text {
        font-size: calc( var( --fs-default ) * var( --fs-mult-smaller ) );
    }

    .display-image-mobile {
        width: 150px;
    }

/*  The main container elements which are shared between scripts    */

    .container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        margin: 0 auto;
        padding: var( --padding-one-unit );
        max-width: var( --pc-screen );
        min-width: var( --mobile );
        width: 100%;
        height: 100%;
    }

/*  Commonly used   */

    .full-width {
        width: 100%;
    }

    .spacer-top {
        margin-top: var( --padding-one-unit );
    }

    .hide-me {
        display: none !important;
        visibility: hidden !important;
    }

    /*
    .add-opacity {
        opacity: 0.3;
        transition: opacity 0.5s ease-in;
    }
    */

    .svg-button {
        display: inline-block;
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        cursor: pointer;
        width: var( --button-size );
        height: var( --button-size );
    }

    .svg-button-off {
        background-image: url('../images/button-off.svg');
    }

    .svg-button-on {
        background-image: url('../images/button-on.svg') !important;
    }

    .fade-in {
        opacity: 1 !important;
        transition: opacity 0.3s ease-in;
    }

    .fade-out {
        opacity: 0;
        transition: opacity 0.3s ease-out;
    }

    .make-button {
        display: inline-block;
        text-align: center;
        cursor: pointer !important;
        background-color: var( --button-background );
        color: white;
        font-weight: 500;
        letter-spacing: 2px;
        border-radius: 10px;
        padding: 0.75em 1.5em;
    }

    .make-button:hover {
        background-color: var( --button-background-hover );
        transition: background-color 0.3s ease-in-out;
    }

    .instruction-box {

        font-size: calc( var( --fs-default ) * var( --fs-mult-medium ) );
        font-weight: 600;
        padding: var( --padding-one-unit );
        margin-bottom: var( --padding-two-unit );
        background-color: var( --instruction-box-bg );
        border: 1px solid var( --light-grey );
        color: var( --instruction-box-color );
        border-radius: var( --standard-border-radius );
        line-height: 2rem;
        text-align: center;

    }

    .wrap-in-border {
        cursor: pointer;
        display: flex;
        flex-direction: row;
        align-items: center;
        border: 1px solid #999;
        padding: 0.75rem 1.5rem;
        border-radius: 0.25rem;
        font-size: var( --fs-mult-large );
        background-color: var( --contact-us-colour );
    }

    .wrap-in-border:hover {
        background-color: var( --contact-us-colour-hover );
    }

    .wrap-in-border img {
        margin-right: 1.5rem;
    }

    .envelope {
        width: 2.5rem;
    }

    .add-small-indent {
        padding-left: var( --padding-two-unit );
    }

    .index-mid-block-spacing {
        margin-top: 2rem;
    }

    .message-box::before {
        position: absolute;
        content: "!";
        font-size: 5rem;
        color: rgba( 255, 0, 0, 0.6 );
        font-weight: bolder;
        top: -1.75rem;
        left: -1.75rem;
        width: 6rem;
        height: 6rem;
        border: 2px solid #AAA;
        border-radius: 90%;
        background-color: white;
    }

    .message-box {
        position: relative;
        width: 90%;
        font-size: 1.4rem;
        color: white;
        text-align: center;
        margin: 3em auto;
        padding: 4em 2em 2em 2em;
        border-radius: 0.5rem;
        background-color: #555;
        -webkit-box-shadow: 5px 5px 5px 0 rgba(0,0,0,0.5);
        -moz-box-shadow: 5px 5px 5px 0 rgba(0,0,0,0.5);
        box-shadow: 5px 5px 5px 0 rgba(0,0,0,0.5);
        border: #AAA;
    }

    @media only screen and ( min-width: 768px ) {

        :root {
            --fs-default: 18px;
            --fs-mult-small: 1rem;
            --fs-mult-medium: 1.2rem;
            --fs-mult-large: 1.4rem;
            --header-two: 1.2rem;
        }

        header {
            flex-direction: row;
            justify-content: flex-start;
        }

        footer {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            height: 10em;
            padding: var(--padding-two-unit);
            font-weight: 700;
            font-size: var(--fs-mult-small);
        }

        .container {
            min-width: 768px;
            width: 90%;
        }

        .display-when-not-mobile {
            display: inherit;
            visibility: visible;
        }

        .spacer-top {
            margin-top: var(--padding-five-unit);
        }

        .instruction-box {
            padding: var(--padding-one-unit) var(--padding-two-unit);
        }

        .display-image-mobile {
            display: none;
            visibility: hidden;
        }

        .mobile-element {
            display: none !important;
            visibility: hidden !important;
        }

        .display-image-full-width {
            display: block;
            visibility: visible;
        }

        .message-box {
            font-size: 2rem;
            padding: 1em 2em;
        }
    }

    @media only screen and ( min-width: 1024px ) {

        :root {
            --fs-default: 20px;
            --fs-mult-smaller: 0.5rem;
            --fs-mult-small: 1rem;
            --fs-mult-medium: 1.2rem;
            --fs-mult-large: 1.4rem;
        }

        .all-apart-from-footer {
            min-width: var( --pc-screen );
            max-width: var( --pc-screen );
        }
    }
    /*

    @media ( max-height: 770px ) and ( min-width: 1350px ) {

        :root {
            --fs-default: 14px;
        }

        header {
            height: 13em;
        }

    }

    */
