/**
 * Copyright 2021 Jiri Skoda <developer@skodaj.cz>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* File with definitions of styles of main page */

*{
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    font-family: "ClearSans";
}

body{
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-image: var(--image);
    background-position: 0 0;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

main{
    margin: 0;
    width: 30vw;
    border-radius: 5px;
    background-color: var(--background-transparent);
    backdrop-filter: blur(5px);
    color: var(--foreground);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-box-shadow: 5px 5px 15px 5px #000000; 
    box-shadow: 5px 5px 15px 5px #000000;
}

    main > h1{
        font-size: 18pt;
        font-weight: 100;
        padding: 10px;
    }

        main > h1 > strong{
            font-size: 32pt;
            display: block;
            font-weight: 100;
        }

        main > h1 >img{
            float: left;
            padding: 5px;
            height: 64px;
        }

        main > h1 > button{
            display: none;
        }

    main > section#content{
        background-color: var(--background);
        border-radius: 0 0 5px 5px;
    }

    main > section#content > article{
        display: inline-block;
        width: calc(50% - 25px);
        padding: 5px;
        vertical-align: text-top;
    }

    main > section#content > article#messages > div.info{
        border-radius: 5px;
        padding: 20px;
        background-color: var(--info);
        margin: 10px;
    }
    
        main > section#content > article#messages > div.info > img,
        main > section#content > article#messages > div.warning > img,
        main > section#content > article#messages > div.error > img{
            height: 32px;
            float: left;
            margin-right: 10px;
        }

        div#response-message{
            display: none;
        }

    main > section#content > article#messages > div.warning{
        border-radius: 5px;
        padding: 20px;
        background-color: var(--warning);
        margin: 10px;
    }

    main > section#content > article#messages > div.error{
        border-radius: 5px;
        padding: 20px;
        background-color: var(--error);
        margin: 10px;
    }

            main > section#content > article#messages > div.error > p > i{
                display: block;
                font-size: 8pt;
            }

    main > section#content > article#messages > div > p > strong > a{
        text-decoration: none;
        color: var(--foreground);
        font-weight: bold;
    }

    main > section#content > article#messages > div > p > strong > a:hover{
        text-decoration: underline;
    }

    main > section#content > article#messages > div > p > strong > a:visited{
        color: var(--foreground-footer);
    }


    main > section#content > article#form > form{
        width: 100%;
    }

    main > section#content > article#form > form > input{
        border-radius: 5px;
        padding: 10px;
        width: 100%;
        transform: translateX(-10px);
        border: 1px solid var(--foreground);
        margin-bottom: 20px;
        background-color: var(--background);
        color: var(--foreground);
    }

    main > section#content > article#form > form > label{
        font-size: 18pt;
        font-weight: 200;
    }

    main > section#content > article#form > form > label > img{
        height: 24px;
        vertical-align: middle;
    }

    main > section#content > article#form > form > button{
        border-radius: 5px;
        width: calc(100% + 22px);
        padding: 5px;
        font-size: 18pt;
        border: 1px solid var(--foreground);
        transform: translateX(-10px);      
        font-weight: 200;  
        background-color: var(--background);
        transition: 200ms;
        margin-bottom: 20px;
        color: var(--foreground);
    }

        main > section#content > article#form > form > button:hover,
        main > section#content > article#form > form > input:hover{
            background-color: var(--background-button);
            cursor: pointer;
        }

        main > section#content > article#form > form > button:active{
            transform: translateX(-9px) scale(0.90);
        }

        main > section#content > article#form > form > button > img{
            height: 24px;
            margin-right: 10px;
            vertical-align: middle;
        }

        main > section#content > article#error{
            width: 100%;
        }

            main > section#content > article#error > div.error{
                border-radius: 5px;
                padding: 20px;
                background-color: var(--error);
                margin: 10px;
            }

            main > section#content > article#error > div.info{
                border-radius: 5px;
                padding: 20px;
                background-color: var(--info);
                margin: 10px;
            }

            main > section#content > article#error > div > img{
                height: 32px;
                float: left;
                margin-right: 10px;
            }

            main > section#content > article#error > div > p > i{
                display: block;
                font-size: 8pt;
            }

            main > section#content > article#error > div > p > strong > a{
                text-decoration: none;
                color: var(--foreground);
                font-weight: bold;
            }

            main > section#content > article#error > div > p > strong > a:hover{
                text-decoration: underline;
            }

            main > section#content > article#error > div > p > strong > a:visited{
                color: var(--foreground-footer);
            }
 
section#language-select,
section#theme-select{
    position: fixed;
    bottom: 50px;
    background-color: var(--background);
    border-radius: 5px;
    padding: 10px;
    display: none;
    -webkit-box-shadow: 5px 5px 15px 5px #000000; 
    box-shadow: 5px 5px 15px 5px #000000;
}

    section#language-select > h2,
    section#theme-select > h2{
        font-size: 18pt;
        font-weight: 100;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--foreground);
        color: var(--foreground);
    }

        section#language-select > h2 > img,
        section#theme-select > h2 > img{
            height: 32px;
            margin-right: 10px;
            vertical-align: middle;
        }

    section#language-select > ul,
    section#theme-select > ul{
        list-style: none;
    }

        section#language-select > ul > li > button,
        section#theme-select > ul > li > button{
                padding: 5px;
                width: 100%;
                font-size: 14pt;
                border: none;
                transition: 200ms;
                border-radius: 5px;
                background-color: var(--background);
                color: var(--foreground);
            }

                section#language-select > ul > li > button > img,
                section#theme-select > ul > li > button > img{
                        height: 20px;
                        margin-right: 10px;
                        vertical-align: middle;
                    }

                    section#language-select > ul > li > button:hover,
                    section#theme-select > ul > li > button:hover{
                        background-color: var(--background-button);
                        cursor: pointer;
                    }

                        section#theme-select > ul > li > button > span.theme{
                            display: none;
                        }

button:disabled, input:disabled, button:disabled:hover, input:disabled:hover{
    background-color: var(--background-button) !important;
    cursor: not-allowed  !important;
}

footer{
    background-color: var(--background-transparent);
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 10pt;
    font-weight: 600;
    color: var(--foreground-footer);
    padding: 5px;
    backdrop-filter: blur(5px);
    -webkit-box-shadow: 0px -5px 10px 0px #000000; 
    box-shadow: 0px -5px 10px 0px #000000;
}
    footer > ul{
        float: right;
        margin-right: 20px;
    }
        footer > ul > li{
            display: inline-block;
            padding: 5px;
            border-right: 1px solid var(--foreground-footer);
        }

            footer > ul > li:last-child{
                border-right: none;
            }

            footer > ul > li:hover{
                cursor: pointer;
                text-decoration: underline;
            }

            footer > ul > li:nth-child(7):hover,
            footer > ul > li:last-child:hover{
                text-decoration: none;
                cursor: default;
            }

            footer > ul > li > img{
                height: 16px;
                margin-right: 5px;
                vertical-align: middle;
            }

            footer > ul > li > span.link{
                display: none;
            }
            
            footer >ul >li#footer-more{
                display: none;
            }