﻿/* http://adrianroselli.com/2017/05/under-engineered-custom-radio-buttons-and-checkboxen.html */

@import url(https://fonts.googleapis.com/css?family=Lato:400,700);

body {
    background-color: rgba(204,204,204,.7);
    font-size: 90%;
    color: #333;
    font-family: Lato, Arial, sans-serif;
    padding: 5;
    margin: 0;
}

main {
    display: block;
    box-sizing: border-box;
    width: 95%;
    margin: 1em auto;
    padding: 1em 2em;
    color: #000;
    background-color: rgba(204,204,204,.7);
    border: .07em solid rgba(0,0,0,.5);
    border-radius: .5em;
}

/*-- forms --*/

form {
    background-color: #fff;
    padding: 1em 2em;
}

    form div {
        box-sizing: border-box;
        position: relative;
    }

    form > div,
    form fieldset > div {
        margin: 1.5em 0;
    }

        form fieldset > div:first-of-type {
            margin-top: 1em;
        }

        form fieldset > div:last-of-type {
            margin-bottom: 1em;
        }

fieldset {
    border: .1em solid rgba(0, 0, 0, .15);
}

input,
textarea,
select {
    font-size: 100%;
    color: #333;
    font-family: Lato, Arial, sans-serif;
}

    input[disabled] + label::after,
    input[disabled] + datalist + label::after,
    textarea[disabled] + label::after,
    select[disabled] + label::after {
        content: " (disabled)";
    }

    /* Buttons */

    input:not([type=radio]):not([type=checkbox])[type=reset] {
        display: none;
    }

    input:not([type=radio]):not([type=checkbox])[type=submit],
    button {
        color: #fff;
        background-color: #00f;
        border: .1em solid #00f;
        border-radius: .2em;
        font-weight: bold;
        font-size: 15px;
        padding: .5em;
        text-align: center;
        width: 45%;
        box-shadow: .25em .25em .5em rgba(0, 0, 0, .5);
    }

        input:not([type=radio]):not([type=checkbox])[type=submit]:focus,
        button:focus,
        input:not([type=radio]):not([type=checkbox])[type=submit]:hover,
        button:hover {
            color: #00f;
            background-color: #fff;
            outline: 0;
        }

        input:not([type=radio]):not([type=checkbox])[type=submit]:active,
        button:active {
            box-shadow: 0 0 .5em rgba(0, 0, 0, .5);
        }

    /* Radios and checkboxen */

    input[type=radio],
    input[type=checkbox] {
        position: absolute;
        top: auto;
        overflow: hidden;
        clip: rect(1px 1px 1px 1px); /* IE 6/7 */
        clip: rect(1px, 1px, 1px, 1px);
        width: 1px;
        height: 1px;
        white-space: nowrap; /* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe */
    }

        input[type=radio] + label,
        input[type=checkbox] + label {
            display: block;
            padding: .5em;
            padding-left: 2em;
            /* text-indent: 0em; */
            max-width: calc(100% - 2em);
            /*margin: -1em 0;*/
        }

fieldset > div input[type=radio] + label {
    margin: -1em 0;
}

input[type=radio]:focus + label,
input[type=checkbox]:focus + label {
    color: #00f;
    outline: 1px dotted #00f;
}

input[type=radio] + label:before,
input[type=checkbox] + label:before {
    content: '';
    background: #fff;
    border: .1em solid rgba(0, 0, 0, .75);
    background-color: rgba(255, 255, 255, .8);
    display: block;
    box-sizing: border-box;
    float: left;
    width: 1em;
    height: 1em;
    margin-left: -1.5em;
    margin-top: .15em;
    vertical-align: top;
    cursor: pointer;
    text-align: center;
    transition: all .1s ease-out;
}

input[type=radio] + label:before {
    border-radius: 100%;
}

input[type=radio]:disabled + label:before,
input[type=checkbox]:disabled + label:before {
    border: .1em solid rgba(0, 0, 0, .1);
    background-color: rgba(0, 0, 0, .1);
}

input[type=radio]:disabled + label,
input[type=checkbox]:disabled + label {
    color: #ccc;
}

input[type=radio]:checked + label:before {
    background-color: #00f;
    box-shadow: inset 0 0 0 .15em rgba(255, 255, 255, .95);
}

input[type=checkbox] + label:before {
    /*content: '\00d7';*/
    /*content: '\002718';*/
    /*content: '\002715';*/
    /*content: '\0025a0';*/
    content: '\002713';
    font-weight: bold;
    text-align: center;
    line-height: 1.15;
    color: rgba(0, 0, 255, 0);
}

input[type=checkbox]:checked + label:before {
    color: rgba(0, 0, 255, 1);
    line-height: .75;
    text-shadow: .05em 0 0 rgba(0, 0, 255, 1), -.05em 0 0 rgba(0, 0, 255, 1);
}

input[type=checkbox]:disabled + label:before {
    color: rgba(255, 255, 255, 0);
}

input[type=checkbox]:checked:disabled + label:before {
    color: #bbb;
    text-shadow: .05em 0 0 #bbb, -.05em 0 0 #bbb;
}

@media screen and (-ms-high-contrast: active) {
    input[type=checkbox] + label:before {
        content: ' ';
    }

    input[type=checkbox]:checked + label:before {
        content: '\002713';
    }

    input[type=radio] + label:before {
        content: ' ';
    }

    input[type=radio]:checked + label:before {
        content: '\00d7';
        line-height: .75;
        background-color: transparent;
        box-shadow: none;
    }
}

.my-space {
    width: 4%;
    height: auto;
}

/* Resize textarea based on device screen width */

/* Phones in portrait mode */

@media only screen and (max-width: 480px) {

    textarea {
        width: 85%;
    }

    .output {
        width: 85%;
    }

    .my-image100 {
        width: 8%;
        height: auto;
        object-fit: cover;
        padding-bottom: 2%;
    }

    .my-image200 {
        width: 16%;
        height: 5%;
        max-height: 5%;
        object-fit: fill;
        padding-bottom: 2%;
    }

    .my-image50 {
        width: 4%;
        height: 5%;
        max-height: 5%;
        object-fit: fill;
        padding-bottom: 2%;
    }
   
    }


/* Phones in landscape mode / pc */
    
@media only screen and (min-width: 480px) {

        textarea {
            width: 30%;
        }

    .output {
        width: 30%;
    }

    .my-image100 {
        width: 8%;
        height: auto;
        object-fit: cover;
        padding-bottom: 2%;
    }

    .my-image200 {
        width: 16%;
        height: auto;
        object-fit: cover;
        padding-bottom: 2%;
    }

    .my-image50 {
        width: 4%;
        height: auto;
        object-fit: cover;
        padding-bottom: 2%;
    }


   

    }


.tooltip .tooltiptext {
    top: -5px;
    left: 105%;
}

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
}

    .tooltip .tooltiptext {
        visibility: hidden;
        width: 200px;
        background-color: black;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 5px 0;
        /* Position the tooltip */
        position: absolute;
        z-index: 1;
        top: -5px;
        right: 105%;
    }

    .tooltip:hover .tooltiptext {
        visibility: visible;
    }


.redtext {
    color: red;
}
