/* 
    Created on : 27 May 2023, 20:04:54
    Author     : fredd
*/

body, div, p, label, a, input, button, img, textarea, svg, h1, h2 {
    padding: 0;
    margin: 0;
    font: 18px Arial, sans-serif;
    box-sizing: border-box;
}

h1 {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 12px;
}

h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: darkcyan;
}

p {
    padding-bottom: 12px;
    font-size: 18px;
}

li {
    font-size: 18px;
}

body {
    margin: auto;
    width: 100vw;
    max-width: 1024px;

    font: 16px Arial, sans-serif;
}

a {
    text-decoration: none;
    color: blue;
}

a:hover, a:focus {
    text-decoration: underline;
    outline: none;
    color: blue;
}

header {
    text-align: center;
    border-bottom: 1px solid black;
    padding: 5px;
    height: 40px;
    background-image: linear-gradient(lightsteelblue, whitesmoke);
}

header img {
    display: block;
    float: left;
    width: 118px;
}

header #logo:hover, header #logo:focus {
    cursor: pointer;
}

#username {
    margin-top: 12px;
    display:inline-block;
}

label {
    display: inline-block;
    text-align: left;
    width: 200px;
}

label input {
    width: 200px;
    box-sizing: border-box;
}

.menu {
    display: block;
    float: right;
    top: 8px;
    position: relative;
    background-color: transparent;
    margin-left: 10px;
    padding: 2px 8px;
    border: none;
    cursor: pointer;
}

.menu:hover, .menu:focus, .menu:focus-within {
    outline: 1px dashed black;
    color: black;
    box-shadow: none;
}


/* Dropdown Button */
.dropbtn {
    background-color: transparent;
    background-image: url('../img/menu.png');
    background-size: contain;
    width: 37px;
    height: 27px;
    color: black;
    padding: 2px 8px;
    font-size: 16px;
    border: none;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    float: right;
    display: block;
    z-index: 1;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position:  absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0;
    top:  32px;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover,
.dropdown-content a:focus,
.dropdown-content a:focus-within{
    background-color: #ddd;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content,
.dropdown:focus .dropdown-content,
.dropdown:focus-within  .dropdown-content{
    display: block;
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn,
.dropdown:focus .dropbtn,
.dropdown:focus-within .dropbtn{
    background-color: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    color: black;
}

#mainWindow {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in;
    position: relative;
    min-height: 100dvh;
}

#content {
    padding-bottom: 7rem
}

footer {
    border-top: 1px solid black;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 4rem;
    display: grid;
    grid-template-columns: auto auto auto;
}

#main {
    padding: 7px 20px;
}

#main p {
    margin-bottom: 8px;
    text-align: justify;
}

/*
    FAQs
*/


#main summary {
    cursor: pointer;
}


/*
    Forms
*/

.form {
    padding: 0 20px 20px 20px;
    position: absolute;
    box-shadow: 10px 10px 10px grey;
    border: 1px solid black;
    text-align: center;
    opacity: 0;
    transition: all 0.2s ease-in;
    border-radius: 3px;
    visibility: visible;
    margin: auto;
    top: 20px;
    z-index: 1;
}

.form h1 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.form .button {
    margin: 0 20px;
    font-weight: bold;
    padding: 7px 7px;
    border: 1px solid black;
    border-radius: 4px;
    background-color: #0099ff;
    background-image: linear-gradient(45deg, #0088ee, #55bbff);
    transition: box-shadow 0.2s ease-in, color 0.2s ease-in;
    cursor: pointer;
}


.form label  {
    font-weight: bold;
    color: blue;
}

.form div {
    margin-bottom: 15px;
}

.form #themessage {
    transition: all 0.2s ease-in;
}

#wait, #save_wait {
    display: none;
    height: 34px;
}
#wait span, #save_wait span {
    display: inline-block;
    position: relative;
    margin:auto;
    animation-name: spin;
    animation-duration: 2000ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}

/*
    LOGIN
*/
#login {
    width: 330px;
    left: 50%;
    margin-left: -165px;
}

.button {
    margin: 0 20px;
    font-weight: bold;
    padding: 7px 7px;
    border: 1px solid black;
    border-radius: 4px;
    background-color: #0099ff;
    background-image: linear-gradient(45deg, #0088ee, #55bbff);
    transition: box-shadow 0.2s ease-in, color 0.2s ease-in;
    cursor: pointer;
}

button, .button:disabled {
    background-color: #ddd;
    background-image: none;
}

button:hover:enabled, button:focus:enabled, .button:hover:enabled, button:focus:enabled {
    box-shadow: 4px 4px 4px grey;
    color: white;
    outline: none;
}

#close {
    display: block;
    float: right;
    position:  absolute;
    top: 0;
    right: 0;
    font-size: 30px;
    padding: 0 6px;
    background-color: white;
    color: black;
    border-radius: 3px;
    border: none;
    transition: all 0.1s ease-in;
    border-left: 1px solid black;
    border-bottom: 1px solid black;
}

#close:hover,
#close:focus,
#close:focus-within {
    box-shadow: none;
    background-color: crimson;
    color: whitesmoke;
}

#close:focus,
#close:focus-within {
    outline: 1px dashed black;
}

/*
    signup
*/
#signup {
    width: 330px;
    margin-top: 0px;
    left: 50%;
    margin-left: -165px;
}

#signup #butOK {
    display: none;
    margin: auto;
}

.centred {
    text-align: center;
}


/* Forgot password */
#forgot {
    width: 330px;
    margin-top: 0px;
    left: 50%;
    margin-left: -165px;
}

#forgot #butOK {
    display: none;
    margin: auto;
}


/* 
Cookie policy
*/
#coookieconsent, #messagebox {
    display: block;
    position: fixed;
    width: 100vw;
    max-width: 1024px;
    margin-top: 0px;
    margin: auto;
    border: 1px solid black;
    z-index: 100;
    font-size: 22px;
    transition: all ease-in 0.5s;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    text-align: center;
}

#messagebox {
    background-color: whitesmoke;
    padding: 30px 20px;
    top: -120px;
    height: 120px;
}

#coookieconsent {
    background-color: darkslateblue;
    color: whitesmoke;
    font-size: 16px;
    padding: 10px 20px;
    height: 260px;
    bottom: -260px;
    text-align: left;
    overflow-y: scroll;
}

#coookieconsent table {
    width: 100%;
}


#closecookie {
    background-color: red;
    color: white;
    position: absolute;
    border: 1px solid black;
    padding: 5px;
    font-weight: bold;
    display: block;
    width: 30px;
    height: 30px;
    right: 0;
    top: 0;
    cursor: pointer;
}
#closecookie:hover, #closecookie:focus {
    background-color: white;
    color: red;
}

/* Customize the label (the container) */
.checkbox {
    display: block;
    position: relative;
    padding-left: 40px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    height: 32px;
    padding-top: 7px;
}

.checkbox:focus, .checkbox:focus-within {
    outline: 1px dashed black;
}

/* Hide the browser's default checkbox */
.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 30px;
    width: 30px;
    background-color: #eee;
    transition: all 0.2s ease-in, color 0.2s ease-in;
    font-size: 22px;
    border-radius: 3px;
    border: 1px solid black;
}

/* On mouse-over, add a grey background color */
.checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.checkbox input:checked ~ .checkmark {
    background-image: linear-gradient(45deg, #0088ee, #55bbff);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox .checkmark:after {
    left: 9px;
    top: 5px;
    width: 8px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/*
    Contact us
*/
#contactus #contactusError{
    margin-top: 20px;
}

#contactus label {
    color: darkcyan;
    font-size: 20px;
    margin-top: 20px;
}

#contactus input {
    width:  100%;
}

#contactus textarea {
    width: 100%;
    resize: vertical;
}

#contactus .button {
    margin: 20px 0;
}

/*
    Percent loading
*/
#loading {
    width: 100%;
    height: 30px;
    border: 1px solid grey;
    border-radius: 10px;
    text-align: center;
}

#percent {
    width: 0;
    height: 30px;
    background-color: green;
    text-align: center;
    border-radius: 10px;
}

#percentText {
    display: block;
    position: relative;
    top: -30px;
    height: 30px;
    line-height: 30px;
}

/*
    Signed out
*/
#signedoutparent {
    display: block;
    position: relative;
    margin: auto;
    width: 300px;
    height: 150px;
    border: 1px solid black;
    border-radius: 7px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    top: 60px;
    padding: 20px;
    font-size: 16px;
}

#signedoutparent button {
    display: block;
    position: relative;
    margin: auto;
    margin-top: 30px;
}

.next button {
    min-width: 120px;
    margin: 0;
}

#next {
    position: relative;
    float: right;
    margin-right: 30px;
}

#back {
    position: relative;
    float: left;
    margin-left: 30px;
}

.rangeslider {
    display: grid;
    grid-template-columns: 40px auto 40px;
    column-gap: 10px;
}

#less, #more {
    font-size: 20px;
    font-weight: bolder;
}


#left {
    width: 100px;
    float: left;
}

#right {
    float: right;
    width: 100px;
}

#centre {
    overflow: hidden;
}


/*
*    Welcome page
*/
#ear_pic_div {
    float:right;
    border: 1px solid black;
    text-align: center;
    font-size: 14px;
    margin-left: 20px;
}

#ear_pic {
    width: 180px;
    margin: 5px;
}

@media (max-width: 700px) {
    #ear_pic {
        width: 120px;
    }
}
/*
*   Page 5 (frequency tests)
*/

#graph {
    border: 1px solid grey;
    margin: 0;
    width: 100%;
}

#prevFreq, #nextFreq {
    padding: 5px;
}

svg {
    pointer-events: all;
}

#frequencies table {
    width: 100%;
}

#frequencies td:first-child {
    width: 100%;
}


#frequencies td {
    padding-right: 20px;
}

#frequencies label {
    display: inline-block;
    text-align: right;
    width: auto;
    margin-left: 8px;
}

#frequencies button {
    font-weight: bold;
    padding: 7px 7px;
    border: 1px solid black;
    border-radius: 4px;
    background-color: #0099ff;
    background-image: linear-gradient(45deg, #ccc, #fff);
    transition: box-shadow 0.2s ease-in, color 0.2s, background-image 0.2s ease-in;
    cursor: pointer;

}

#frequencies button:hover, #frequencies button:focus {
    box-shadow: 4px 4px 4px grey;
    color: black;
    outline: none;
    background-image: linear-gradient(45deg, #fff, #ccc);

}



#osc1, #osc2 {
    width: 100%;
    background-color: black;
    cursor: pointer;
}

#osc1:hover, #osc1:focus, #osc1:focus-within,
#osc2:hover, #osc2:focus, #osc2:focus-within {
    outline: 1px dashed black;
    color: black;
    box-shadow: none;
}

#audio {
    width: 100%;
}

#osc-table, #audiograms-table {
    width: 100%;
    display: table;
}

#osc-table-body, #audiograms-table-body {
    display: table-row-group;
}

.osc-table-row, .audiograms-table-row {
    display: table-row;
}

.audiograms-table-row {
    background-color: lightgrey;
    border: 1px solid darkgray;
}

.audiograms-table-row:hover, .audiograms-table-row:focus {
    border: 1px dashed black;
}
#osc1-table-cell, #osc2-table-cell {
    display: table-cell;
    border: 1px solid black;
    padding: 5px;
}

.osc-table-cell, .audiograms-table-cell {
    display: table-cell;
    text-align: center;
    padding: 4px;
}

.audiograms-table-cell {
    width: 100%;
    height: 50px;
    line-height: 50px;
    font-size: 17px;
    text-align: left;
}

#audiograms-table.a {
    width: 100%;
    height: 100%;
}

#file {
    padding-bottom: 7px;
}

#file::file-selector-button {
    margin: 0 20px;
    font-weight: bold;
    padding: 7px 7px;
    border: 1px solid black;
    border-radius: 4px;
    background-color: #0099ff;
    background-image: linear-gradient(45deg, #0088ee, #55bbff);
    transition: box-shadow 0.2s ease-in, color 0.2s ease-in;
    cursor: pointer;
}

#file::file-selector-button:hover, #file::file-selector-button:focus{
    box-shadow: 4px 4px 4px grey;
    color: white;
    outline: none;
}

#playerMessage {
    text-align: center;
    padding: 5px;
}

/* Save page */
#detailsDiv label, #detailsDiv input {
    display: block;
    width: 100%;
}

#save {
    margin-top: 20px;
    margin-bottom: 20px;
}

#save_themessage {
    margin-bottom: 20px;
}


/* Audiograms list page */
.audiogramListItem {
    display: block;
    width: 100%;
    background-color: lightgrey;
    border: 1px solid darkgray;
    margin: 3px;
    padding: 4px;
    height: 50px;
    line-height: 50px;
}

#audiogramstable {
    border-collapse: collapse;
}

#audiogramstable th {
    text-align: left;
    background-color: white;
}

#audiogramstable a {
    display: block;
    width: 100%;
    height: 100%;
    color: black;
    line-height: 40px;
}

#audiogramstable a:hover {
    text-decoration: none;
    color: black;
}

#audiogramstable tr {
    background-color: #eee;
    border: 1px solid darkgray;
}

#audiogramstable td {
    width: 100%;
}

#audiogramstable td:hover {
    background-color: lightgrey;
    width: 100%;
}

#audiogramstable .symbol {
    text-align: center;
    font-size: 20px;
}

#pages {
    position: absolute;
    bottom: 80px;
    width: 100%;
}

#pages table {
    margin: auto;
    border-collapse: collapse;
    margin-bottom: 12px;
}

#pages table td {
    padding: 4px 10px;
}

/* NOTICE */
#notice {
    border: 1px solid gray;
    background-color: lightblue;
    margin-bottom: 20px;
}

/* Page 2 */
#notice li {
    margin-bottom: 12px;
}

#noscript {
    margin-top: 30px;
    border: 2px solid grey;
    padding: 8px;
    background-color: lightgoldenrodyellow;
}

#testAPIs {
    color: darkred;
}