import { styled } from "styled-components";
import { Colors } from "@/app/components/common/variable";
import { device } from "@/app/components/common/Devices";

export const CommonCardRow = styled.section`
    .newsletter-card{
        display: flex;
        align-items: center;
        justify-content: space-between;
        grid-column-gap: 16px;
        padding: 42px;
        position: relative;
        overflow: hidden;
        z-index: 1;
        &::before{
            content: '';
            position: absolute;
            top: 0;
            right: -170px;
            margin: auto;
            width: 1300px;
            height: 230px;
            object-fit: cover;
            object-position: right;
            background: url('/client/assets/images/icon-flash-bg.svg') no-repeat center;
            background-size: cover;
            background-position-y: -96px;
            z-index: -1;
            @media ${device.mobile}{
                top: 0;
                height: 100%;
            }
        }
        h3{
            font-size: 26px;
            margin: 0;
            font-weight: 600;
            @media ${device.mobileS}{
                font-size: 24px;
                line-height: 1.3;
            }
        }
        &.center{
            flex-direction: column;
            &::before{      
                height: 100%;
                background-position-y: -8px;
                right: -210px;
                opacity: 0.4;
            }
            h3{
                font-size: 42px;
                font-weight: 700;
                color: ${Colors.white};
                max-width: 862px; 
                text-align: center;
                margin-bottom: 66px;
            }
            input{
                min-width: 490px;
            }
            .newsletter-input-group{
                grid-column-gap: 28px;
                border: 1px solid ${Colors.white};
            }
        }
    }
    @media ${device.laptop}{
        .newsletter-card{
            padding: 36px;
            &.center {
                h3{
                    font-size: 32px;
                    margin-bottom: 24px;
                }
                .newsletter-input-group{
                    grid-column-gap: 20px;
                }
            }
        }
    }
    @media ${device.laptopS}{
        .newsletter-card{
            flex-direction: column;
            grid-row-gap: 24px;
            h3{
                max-width: 862px; 
                text-align: center;
            }
            &.center {
                h3{
                    font-size: 30px;
                    margin: 0;
                }
                input{
                    min-width: auto;
                    width: 100%;
                }
            }
        }
    }
    @media ${device.tablet}{
        .newsletter-card{
            &.center {
                h3{
                    font-size: 28px;
                }
            }
        }
    }
    @media ${device.mobile}{
        .newsletter-card{
            &.center {
                h3{
                    font-size: 26px;
                }
                .newsletter-input-group{
                    grid-column-gap: 10px;
                }
            }
        }
    }
    @media ${device.mobileS}{
        .newsletter-card{
            padding: 16px;
            border-radius: 20px;
            &.center {
                h3{
                    font-size: 24px;
                }
            }
        }
    }
`;