@import "general.css";

body{
    main{
        display: flex;
        flex-direction: column;
        align-items: center;
        .heading{
            text-align: center;
            color: black;
            font-family: "KyivTypeBold", serif;
            font-size: min(7.5vw, 50px);
            margin: 10px 0 5px 0;
            max-width: 95vw;
            position: relative;
            padding-right: 1px;
        }
        .subheading{
            text-align: center;
            color: var(--gray3);
            font-family: "Kurale", serif;
            font-size: min(4vw, 25px);
            margin: 5px 0 5px 0;
            max-width: 95vw;
        }
        .wrapper{
            width: 97.5vw;
            margin: 10px 0;
            display: grid;
            row-gap: max(10px, 1vw);
            justify-items: center;
            grid-template-columns: repeat(4, 1fr);
            .container{
                display: flex;
                flex-direction: column;
                gap: 5px;
                align-items: center;
                width: 85%;
                font-size: 1.5vw;
                img{
                    width: 100%;
                    border-radius: 15px;
                    border: solid clamp(1.5px, 0.35vw, 3px) var(--gray3);
                    box-sizing: border-box;
                    cursor: pointer;
                    transition: transform 0.25s ease;
                    user-select: none;
                    -webkit-user-select: none;
                }
                h1{
                    color: black;
                    text-align: center;
                    font-family: "KyivTypeBold", serif;
                    font-size: 0.95em;
                }
                p{
                    color: var(--gray3);
                    text-align: center;
                    font-family: "Kurale", serif;
                    font-size: 0.75em;
                }
                h2{
                    color: var(--gray3);
                    font-family: "KyivType", serif;
                    font-size: 0.85em;
                }
            }
        }
    }
    #windowContainer{
        position: fixed;
        z-index: 40;
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        overflow-y: auto;
        transition: opacity 0.25s ease;
        #popUpWindow{
            position: relative;
            z-index: 31;
            width: 80%;
            background-color: white;
            border: solid 5px var(--gray3);
            display: flex;
            flex-direction: column;
            align-items: center;
            #name{
                color: black;
                font-family: "Kurale", serif;
                font-size: clamp(15px, 3.5vw, 40px);
                padding: 10px 0;
                text-align: center;
            }
            svg{
                position: absolute;
                top: clamp(8px, 3vmin, 15px);
                right: clamp(8px, 3vmin, 15px);
                cursor: pointer;
                transition: transform 0.25s ease;
                width: max(2vmax, 20px);
                height: max(2vmax, 20px);
                path{
                    fill: var(--gray3);
                }
            }
            .info{
                width: 95%;
                padding-bottom: 20px;
                display: flex;
                gap: 15px;
                img{
                    border: solid 3px var(--gray3);
                    border-radius: 15px;
                    aspect-ratio: 1 /1;
                    width: calc(var(--containrHeight) * 0.8 * 0.75);
                    user-select: none;
                    -webkit-user-select: none;
                }
                .description{
                    flex-grow: 1;
                    display: flex;
                    flex-direction: column;
                    gap: 5px;
                    font-size: clamp(15px, 1.5vw, 30px);
                    p{
                        color: var(--gray3);
                        font-family: "Kurale", serif;
                        font-size: 1em;
                        span{
                            font-size: 0.85em;
                            color: var(--gray2);
                        }
                    }
                    .availability{
                        font-size: 0.85em;
                        color: var(--green);
                    }
                    .warning{
                        width: 100%;
                        margin-top: auto;
                        text-align: center;
                        font-size: 0.85em;
                        color: var(--gray2);
                    }
                }
            }
        }
        #mainShade{
            position: fixed;
            top: 0;
            z-index: 30;
            width: 100%;
            height: 100%;
            background-color: var(--gray3);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }
    }
}

@media (max-height: 415px) {
    body{
        #windowContainer{
            align-items: flex-start;
        }
    }
}

@media (max-aspect-ratio: 1.25/1), (max-width: 700px){
    body{
        #windowContainer{
            #popUpWindow{
                width: 90%;
                .info{
                    flex-direction: column;
                    img{
                        align-self: center;
                        width: clamp(min(80vw, 400px), 35vh, min(650px, 82vw));
                    }
                    .description{
                        font-size: max(15px, 2vh);
                    }
                }
            }
        }
    }
}

@media (max-aspect-ratio: 1.25/1) and (max-height: 663px), (max-width: 700px) and (max-height: 663px){
    body{
        #windowContainer{
            align-items: flex-start;
        }
    }
}

@media (max-width: 1000px){
    body{
        main{
            .wrapper{
                grid-template-columns: repeat(3, 1fr);
                .container{
                    font-size: 2.25vw;
                }
            }
        }
    }
}

@media (max-width: 700px){
    body{
        main{
            .wrapper{
                grid-template-columns: repeat(2, 1fr);
                .container{
                    font-size: 3vw;
                }
            }
        }
    }
}

@media (hover: hover) and (pointer: fine){
    .container img:hover{
        transform: scale(1.025);
    }
    #popUpWindow svg:hover{
        transform: scale(1.1);
    }
}