@import url(styles/field.css);
@import url(styles/items.css);


/* PUISSANCE 4 EDITOR */
puissance-4-loader, puissance-4-editor{
    display: flex;
    flex-direction: row;
    background-color: gainsboro;
    margin: auto;
    box-sizing: border-box;
    height: 100%;
    
    .menu{
        border: gray 0.1em solid;
        sam-onglet{
            height: 1em;
            text-align: center;
        }
    }
    sam-onglets.menu>div>div, .menu:not(sam-onglets){
        padding: 1em;
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 100%;
        box-sizing: border-box;

        >input[type=number], >input[type=text]{
            text-align: center;
            width: 6em;
            font-size: 1.1em;
        }
        >input[type=button]{
            padding: 0.1em;
            width: 100%;
            font-variant-caps: all-petite-caps;
            font-size: 1.2em;
            &:hover{
                background-color: lightskyblue;
            }
        }

        >label{
            font-family: Arial, Helvetica, sans-serif;
            font-variant-caps: all-petite-caps;
        }


        >sam-numberinput{
            margin-bottom: 0.5em;
            margin-top: 0.5em;
        }

        >sam-selector{
            height: 0;
            flex-grow: 1;
            >*{
                padding-top: 0.5em;
                padding-bottom: 0.5em;
            }
            puissance-4{
                width: 3em;
                margin: 0.2em;
            }
            div.remover{
                background-image: url(assets/remove.png);
                background-size: 3em 3em;
                width: 3em;
                height: 3em;
                margin: 0.2em;
            }
        }

        >puissance-4{
            overflow: hidden;
            margin-top: 10%;
            margin-bottom: 10%;
            width: 70%;
            box-sizing: border-box;
            padding: 15%;
            border: black 0.1em solid;
        }
        
        >puissance-4-filemenu{

            flex-grow: 1;
        }
    }

    puissance-4-filemenu{
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.2em;
        &>*{
            margin: 0.1em;
        }
        &>sam-selector{
            min-width: 80%;
        }
        &>hr{
            margin: 0;
            width: 80%;
        }
        &>input{
            min-width: 6em;
            &[type=button]{
                cursor: pointer;
            }
        }
    }

    >puissance-4{
        flex-grow: 1;
    }
}

div.presentation{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    >*{
        width: 60%;
        height: 60%;
        background-color: transparent;
        &:first-child{
            position: absolute;
            animation: presentation 3s infinite ease-in-out alternate;
            opacity: 0.4;
        }
        &:last-child{
            position: absolute;
            animation: presentation 3s infinite ease-in-out alternate-reverse;
        }
    }
}

@keyframes presentation {
    from{
        transform: translateX(-30%) rotate(-30deg);
    }
    to{
        transform: translateX(30%) rotate(30deg);
    }
}

#host {
    display: flex;
    flex-direction: column;
    width: min(90vw, 120vh);
    margin: auto;
    aspect-ratio:1.35;
    >*{
        margin: auto;
        min-height: 0;
        flex-grow: 1;
        width: 100%;
    }
    border: black solid 0.5em;
    background-image: url(assets/coin_background.png);
    background-size: cover;
    background-color: white;
}

.help{
    overflow-y: scroll;
    font-size: 1.5em;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    h1{
        text-align: center;
        background-color: rgba(255,255,255,0.3);
        font-variant-caps: all-petite-caps;
        margin-bottom: 0.1em;
    }
    h2{
        padding-left: 1em;
        font-variant-caps: all-petite-caps;
        background-color: rgba(255,255,255,0.3);
        margin-bottom: 0.1em;
    }
    ol{
        margin-left: 3em;
        margin-right: 2em;
        padding: 1em;
        background-color: rgba(255,255,255,0.3);
        margin-bottom: 0.1em;
        list-style: none;
        li{
            &::before{
                content: " ";
                display: inline-block;
                width: 0.6em;
                height: 0.6em;
                margin-right: 0.2em;
                background-color: rgba(255,255,255,0.5);
            }
        }
    }
    em{
        font-style: normal;
        font-weight: bolder;
        color: white;
        text-shadow: black 0em 0em 0.2em, black 0em 0em 0.2em;
    }
    p{
        margin-left: 2em;
        margin-right: 2em;
        padding: 1em;
        background-color: rgba(255,255,255,0.3);
        margin-bottom: 0.1em;
    }
}