@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Leckerli+One&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&family=Send+Flowers&display=swap');

:root{
    --background-color-main: white;
    --background-color: #f8f9f9;
    --secondary-background-color: #e5e7e9 ;
    --accent-color: #d055e7 ;
    --text-color-main: #212121;
    --text-color-secondary: #7d7d7d;
    --text-color-third: #d7dbdd;

    --text-regular1: Roboto;
    --text-regular2: Open Sans;
    --text-bold: Cal Sans;                           
    --text-stylish1: Leckerli One;
    --text-stylish2: Send Flowers;
}

main{
    .popup{
        position: fixed;
        width: 60%;
        height: 70%;
        top: 15%;
        left: 20%;
        font-family: var(--text-regular1);
        transform: scale(0.9);
        border-radius: 18px;
        border: none;
        overflow-x: hidden;
        background: rgba(255, 255, 255, 0.6); 
        backdrop-filter: blur(10px); 
        box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.35), 
                    -0px -.1px 3px rgba(0, 0, 0, 0.15); 
        transition: all .3s ease-in-out;

        opacity: 0;
        visibility: hidden;
        z-index: 130;
        
        -webkit-backdrop-filter: blur(10px);
        ::-webkit-scrollbar {
            width: 6px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.877); 
            border-radius: 10px;
            transition: all 0.3s ease-in-out;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(20, 0, 0, 0.4); 
        }
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent;


        .popup-padding{
            padding: 15px 15px;
            height: 100%;
            width: 100%;

            .product-info{
                display: flex;
                height: 70%;

                .image{
                    width: 60%;
                    height: 100%;
                    border-radius: 18px;

                    img{
                        width: 100%;
                        height: inherit;
                        object-fit: cover;
                        border-radius: inherit;
                    }
                }

                .basic-info{
                    display: flex;
                    flex-direction: column;
                    height: 100%;
                    width: 40%;
                    padding-left: 5%;
                    padding-top: 2.5%;
                    font-size: 20px;
                    
                    .name{
                        display: flex;
                        align-items: center;
                        
                        p{
                            margin-right: 18%;
                            text-wrap: nowrap;
                        }

                        button{
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            padding: 5px 12px;
                            border-radius: 20px;
                            border: none;
                            background: var(--text-color-main);
                            color: var(--background-color-main);
                            box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.15), 
                            -0px -.1px 3px rgba(0, 0, 0, 0.15);
                            cursor: pointer;
                            transition: all .4s ease-in-out;

                            svg{
                                fill:  var(--background-color-main);;
                                transform: rotate(45deg);
                            }
                        }
                        button:hover{
                            box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.35), 
                            -0px -.1px 2px rgba(0, 0, 0, 0.15);
                        }
                    }

                    .category{
                        padding-top: 10%;
                        padding-bottom: 3%;
                        font-family: var(--text-stylish1);

                        .category-content{
                            font-family: var(--text-regular1);
                        }
                    }

                    .price-container{
                        .price{
                            font-family: var(--text-stylish1);
                        }
                    }
                }
            }

            .product-details{
                display: flex;
                width: 99%;
                padding: 7% 0;
                
                .left, .right{
                    display: flex;
                    flex-direction: column;
                    gap: 17px;

                    .header{
                        font-size: 18px;
                        margin-bottom: 3px
                    }
                }
                .left{
                    width: 48%;
                    padding-right: 10px;
                    border-right: 2px solid rgba(0, 0, 0, 0.1);
                }
                .right{
                    width: 50%;
                    padding-left: 4%;
                    padding-right: 3%;
                }
            }

            .product-review{
                padding-bottom: 3%;
                .review-header{
                    margin-bottom: 3px;
                    font-size: 18px;
                }

                .review-content{
                    display: flex;
                    align-items: center;
                    gap: 20px;

                    .input{
                        padding-top: 2%;
                        input{
                            height: 52px;
                            width: 220px;
                            padding-left: 5%;
                            padding-right: 45%;
                            border-radius: 15px;
                            border: none;
                            font-family: var(--text-regular1);
                            font-size: 16px;
                            background: rgba(0, 0, 0, 0.2);
                        }
                        input:focus{
                            border: 2px solid rgba(255, 255, 255, 0.6);;
                            outline: none; 
                           
                        }
                        input::placeholder{
                            padding-left: 2%;
                            color: var(--text-color-main);
                            font-style: italic;
                        }
                        input:focus::placeholder {
                            opacity: 0;
                            transition: opacity 0.3s;
                        }
                        input:-webkit-autofill {
                            -webkit-text-fill-color: #000 !important;
                            transition: background-color 5000s ease-in-out 0s;
                        }

                        .submit-review{
                            position: absolute;
                            transform: translate(340%, -115%);
                            padding: 12px 17px;
                            color: var(--background-color-main);
                            border: none;
                            border-radius: 15px;
                            background: var(--text-color-main);
                            cursor: pointer;
                        }
                    }

                    .reaction-buttons{
                        display: flex;
                        margin-top: 1.2%;
                        margin-left: 15%;
                        gap: 25%;

                        .liked, .disliked{
                            display: flex;
                            flex-direction: column;
                            font-size: 14px;
                            color: #bebbbb;
                            transition: all .3s ease-in-out;

                            button{
                                width: 35px;
                                padding: 5px 5px;
                                background: #e9e7e7;
                                border-radius: 100%;
                                border: none;
                                transition: all .3s ease-in-out;
                                cursor: pointer;
                                svg{
                                    fill: var(--text-color-secondary)
                                }
                            }
                        }
                        .disliked{
                            align-items: center;
                        }
                        .liked:hover, .disliked:hover{
                            button{
                                background: #dfdada;
                            }
                            color: #e2dede;
                        }
                    }
                }
            }
        }
    }
    .popup::backdrop{
        background: rgba(0, 0, 0, 0.4);
    }
    
    .show {
        visibility: visible;
        opacity: 1;
        transform: scale(1);
    }

    .closing {
        visibility: hidden;
        opacity: 0;
        transform: scale(0.8);
    }
}

@media (max-width: 1150px){
    main{
        .popup{
            top: 5%;
            height: 90%;
            .popup-padding{
                .product-info{
                    flex-direction: column;
                    margin-bottom: 19%;
                    .image, .basic-info{
                        width: 100%
                    }
                    .image{
                        height: 95%;
                        img{
                            width: 95%;
                            margin-right: 10%
                        }
                    }
                    .basic-info{
                        flex-direction: column;
                        .name{
                            margin-top: 2px;
                            p{
                                margin-right: 40%;
                            }
                        }
                        .category{
                            padding-top: 0;
                        }
                    }
                }
                .product-details{
                    flex-direction: column;
                    .left, .right{
                        width: 90%;
                        padding-left: 2%;
                        div{
                            padding-bottom: 10px;
                            border-bottom: 1px solid rgba(255, 255, 255, 0.55);
                        }
                    }
                    .left{
                        border-right: none;
                        margin-bottom: 10px;
                    }
                    .right{
                        padding-top: 2%;
                    }
                }
                .product-review{
                    flex-direction: column;
                    .review-content{
                        flex-direction: column;
                        align-items: start;
                        .reaction-buttons{
                            margin-left: 5%;
                        }
                    }
                }
            }
        }
    }
}
@media (max-width: 950px){
    main{
        .popup{
            left: 15%;
            width: 70%;
        }
    }
}
@media (max-width: 650px){
    main{
        .popup{
            left: 10%;
            width: 80%;
            .popup-padding{
                .product-info{
                    .basic-info{
                        .name{
                            p{
                                margin-right: 35%;
                            }
                        }
                    }
                }
            }
        }
    }
}
@media (max-width: 520px){
    main{
        .popup{
            top: 10%;
            left: 0;
            width: 100%;
            border-bottom-left-radius: 0%;
            border-bottom-right-radius: 0%;
            .popup-padding{
                .product-info{
                    margin-bottom: 25%;
                    .image{
                        img{
                            width: 93%;
                            margin-right: 20%;
                        }
                    }
                    .basic-info{
                        .name{
                            p{
                                margin-right: 20%
                            }
                        }
                    }
                }
                .product-review{
                    margin-top: 5%;
                    .review-content{
                        .input{
                            input{
                                width: 200px;
                            }
                            .submit-review{
                                transform: translate(295%, -118%);
                            }
                        }
                        .reaction-buttons{
                            .liked, .disliked{
                                button{
                                    margin-bottom: 5px
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}