@import "colors.css";

.single {
    display: inline-block;
    height: 3rem;
    vertical-align: middle;
    width: 3rem;
}

.rectangle {
    background-color: var(--brown-light);
    border-radius: 0.5rem;
    display: inline-block;
    font-family: "DS-Digital-Bold", serif;
    font-size: 2rem;
    height: 2.5rem;
    line-height: 2.5rem;
    width: 10rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--brown-dark);
    color: var(--white);
    font-family: sans-serif;
    font-size: 20px;
}

body {
    background-color: var(--white);
    color: var(--brown-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    line-height: 1.2;
    margin: 0;
    min-height: 100vh;
}

header {
    background-color: var(--brown-dark);
    color: var(--white);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;

    .circle {
        background-color: var(--white);
        border-radius: 0.5rem;
        height: 2rem;
        width: 2rem;

        & img {
            height: 1.5rem;
            margin: 0.3rem;
            width: auto;
        }
    }

    & a {
        color: inherit;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 2rem;
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }
}

main {
    background-color: var(--white);
    color: var(--brown-dark);
}

footer {
    background-color: var(--brown-dark);
    color: var(--white);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-evenly;
    line-height: 2rem;
    padding: 1rem;
    white-space: nowrap;

    & div {
        width: 13rem;

        & a {
            color: var(--gray-medium);
            display: block;
            text-decoration: none;

            &:first-child {
                border-bottom: 1px solid var(--white);
                color: var(--white);
                font-weight: bold;
                margin-bottom: 0.5rem;
            }
   
            &:hover {
                text-decoration: underline;
            }
        }
    }
}

.filler {
    flex: 1;
}

section {
    margin: 1rem;

    &:nth-child(even) {
        background-color: var(--gray-lighter);
        border-radius: 2vw;
        padding: 1rem;
    }
}

.choices {
    background-color: var(--white);
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    justify-content: center;
    margin-top: 2rem;

    > * {
        border: 0.1rem solid var(--gray-light);
        border-radius: 1vw;
        margin-bottom: 1rem;
        padding: 1rem 1rem 0;
        position: relative;
        width: 24rem;

        .basicinfo {
            display: flex;
            flex-wrap: wrap;
            font-size: 0.8rem;
            justify-content: space-around;
            margin-bottom: 1rem;

            > * {
                height: 2.5rem;
                text-align: center;
            }

            .stars {
                font-size: 1rem;
                line-height: 1.3rem;
                margin-bottom: 0.2rem;
            }

            .difficulty {
                text-align: center;
                white-space: nowrap;
                width: 5rem;
            }

            .flag {
                display: block;
                height: 1.3rem;
                margin-bottom: 0.2rem;
                width: 1.3rem;
            }

            .price {
                display: inline-block;
                font-size: 2.1rem;
                height: 2.1rem;
            }
        }

        .title {
            color: inherit;
            text-decoration: none;
        }

        &:hover {
            cursor: pointer;

            .title {
                text-decoration: underline;
            }
        }
    }
}

h1, h2 {
    color: var(--green-dark);
    font-size: 1.5rem;
    margin: 0 0 1rem;
    text-align: center;
}

strong {
    border: 0.1rem solid var(--red);
    color: var(--red);
    border-radius: 0.5vw;
    display: inline-block;
    padding: 0.5rem 1rem;
}

.photo {
    border-radius: 2vw;
    display: block;
    height: auto;
    margin: 1rem auto;
    max-width: 30rem;
    width: 100%;
}

p {
    margin: 0 0 1rem;
    text-align: center;
}

dl.characteristics, dl.questions {
    line-height: 1.5rem;
    margin: 0;
    padding: 1rem 0.5rem;

    & dt {
        color: var(--green-dark);
        font-style: italic;
    }

    & dd {
        margin-bottom: 0.5rem;
        margin-inline-start: 1.5rem;
    }
}

dl.instructions {
    background-color: var(--white);
    border: 1px dashed var(--gray-dark);
    border-radius: 1vw;
    font-size: 80%;
    line-height: 1.2em;
    margin: 0 50% 1rem;
    max-width: 100%;
    overflow: hidden;
    padding: 0.5em;
    transform: translate(-50%, 0);
    width: 25em;

    & dt {
        color: var(--green-dark);
        display: inline-block;
        font-style: italic;
        text-align: right;
        width: 7em;
    }

    & dd {
        margin-inline-start: 8em;
        margin-top: -1.2em;
    }
}

.button {
    background-color: var(--green-dark);
    border: 0;
    border-radius: 0.5vw;
    box-shadow: 0.5rem 0.5rem 0.5rem rgba(0, 0, 0, 0.3);
    color: var(--white);
    display: inline-block;
    font-family: inherit;
    font-size: 1.2rem;
    line-height: 1.5rem;
    padding: 1rem 2rem;
    text-align: center;
    text-decoration: none;
    transition: transform 0.5s;

    &:hover {
        transform: scale(1.05);
    }
}

.smallbutton {
    background-color: var(--green-dark);
    border: 0;
    border-radius: 0.5vw;
    box-shadow: 0.2rem 0.2rem 0.5rem rgba(0, 0, 0, 0.4);
    color: var(--white);
    display: inline-block;
    line-height: 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: transform 0.5s;
    width: 1.5rem;

    &:hover {
        transform: scale(1.1);
    }
}

.comparison {
    display: flex;
    flex-wrap: wrap;
    font-size: 1rem;
    gap: 0 1rem;
    justify-content: center;

    > * {
        border: 0.1rem solid transparent;
        border-radius: 2vw;
        margin-bottom: 1rem;
        padding: 1rem;
        position: relative;
        width: 17rem;

        &.other-puzzle {
            background-color: var(--gray-lighter);
            border-color: var(--gray-medium);

            & figcaption {
                color: var(--gray-dark);
            }
        }

        &.this-puzzle {
            background-color: var(--green-light);
            border-color: var(--green-medium);

            & figcaption {
                color: var(--green-dark);
            }
        }

        & picture {
            display: block;
            height: auto;
            width: 100%;
        }

        & figcaption {
            font-size: inherit;
            font-weight: normal;
            margin-bottom: 0.5rem;
            text-align: center;
        }

        & img {
            border-radius: 1vw;
            height: auto;
            width: 100%;
        }

        & ol {
            line-height: 1.3em;
            margin-left: 1rem;
            padding: 0;

            .negative {
                color: var(--gray-dark);
                list-style-type: "− ";
            }

            .positive {
                color: var(--green-dark);
                list-style-type: "+ ";
            }
        }
    }
}

.container {
    margin-bottom: 1rem;
    max-height: 100vh;
}

.specific {
    display: none;
}

.honeypot {
    display: none;
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    white-space: nowrap;

    & fieldset {
        background-color: var(--gray-lighter);
        border: 0;
        border-radius: 1vw;
        flex-grow: 1;
        gap: 1rem;
        line-height: 2rem;
        padding: 0 1rem;
        width: 21rem;

        > * {
            margin: 0.5rem 0 1rem;
        }

        &.order {
            .row {
                &.invisible {
                    visibility: hidden;
                }

                &.dimmed {
                    label, span, .price {
                        opacity: 0.4;
                    }
                }

                > div {
                    display: flex;
                    justify-content: space-between;

                    > label {
                        min-width: 6rem;
                    }

                    > .flag {
                        display: inline-block;
                        height: 20px;
                        margin: 0.5rem 0.5rem 0 0;
                        width: 20px;
                    }
                }
            }

            >:last-child {
                border-top: 0.2rem solid var(--green-dark);
                margin-top: 1rem;
                padding-top: 1rem;
            }
        }

        & label {
            color: var(--brown-dark);

            &#label_total {
                line-height: 2.5rem;
            }

            &.required:after {
                content: "*";
            }
        }

        .explanation {
            font-size: 0.8rem;
            margin-top: -0.8rem;
        }

        & input, & textarea {
            background-color: var(--green-light);
            border: 0.05rem solid var(--green-dark);
            border-radius: 0.5vw;
            color: var(--green-dark);
            font-family: inherit;
            font-size: 1rem;
            line-height: inherit;
            padding: 0 0.5rem;

            &[type="radio"] {
                margin: 0 0.5rem;
                transform: scale(2);
                vertical-align: middle;
            }

            &[type="text"], &[type="email"], &.textarea {
                display: block;
                width: 100%;
            }

            &.textarea {
                line-height: 1.2rem;
                padding: 0.3rem 0.5rem;

                &#address {
                    height: 4rem;
                }

                &#remark {
                    height: 3rem;
                }
            }

            &#count_discount, &.price, &.total {
                background-color: transparent;
                border-color: transparent;
                -webkit-text-fill-color: var(--brown-dark);
            }

            &.count {
                margin-right: 0.5rem;
                text-align: center;
                width: 4rem;
            }

            &.price {
                text-align: right;
                width: 3rem;
            }

            &.total {
                text-align: right;

                &#grand_total {
                    font-size: 2rem;
                }
            }
        }
    }
}

.opengraph {
    background-color: var(--gray-light);

    > div {
        background-color: var(--white);
        height: 315px;
        margin: 20px;
        position: relative;
        width: 600px;

        > h2 {
            font-size: 15px;
            font-weight: bold;
            position: absolute;
            left: 462px;
            top: 18px;
            width: 120px;

            > a {
                color: var(--green-dark);
                text-decoration: none;
            }
        }

        > p {
            font-size: 10px;
            position: absolute;
            left: 462px;
            top: 74px;
            width: 120px;
        }

        .photo {
            border: 0;
            height: 279px;
            margin: 0;
            width: 434px;
            position: absolute;
            left: 18px;
            top: 18px;
        }

        .basicinfo {
            font-size: 10px;
            text-align: center;
            position: absolute;
            left: 462px;
            top: 110px;
            width: 120px;

            > * {
                margin-top: 20px;
            }

            .stars {
                font-size: 20px;
            }

            .difficulty {
                font-size: 12px;
            }

            .flag {
                display: inline-block;
                height: 20px;
                margin-right: 5px;
                vertical-align: top;
                width: 20px;
            }

            .language {
                display: inline-block;
                font-size: 16px;
                line-height: 20px;
            }

            .price {
                font-size: 45px;
            }
        }

        & h1 {
            font-size: 30px;
            padding: 16px 0 0;
        }
       
        .paragraphs {
            font-size: 16px;
        }

        .galery {
            display: flex;
            justify-content: space-between;
            margin: 0 16px;

            & img {
                height: 67.5px;
                width: 105px;
            }
        }
    }
}

.slider {
    label {
        display: block;
        text-align: center;
    }

    .graph {
        align-items: flex-end;
        display: flex;
        margin-bottom: 0.1rem;

        .bar {
            background-color: var(--gray-medium);
            width: 1px;

            &.current {
                background-color: var(--blue-dark);
            }

            &:hover {
                background-color: var(--green-dark);
            }
        }
    }

    ol.markers {
        display: flex;
        font-size: 80%;
        padding: 0;

        & > li {
            background-color: var(--gray-medium);
            border-radius: 1rem;
            color: var(--gray-dark);
            flex-grow: 1;
            line-height: 1rem;
            list-style-type: none;
            margin-bottom: 1rem;
            overflow: hidden;
            padding: 0 0.3rem;
            text-align: center;
            white-space: nowrap;

            &.marker10 {
                width: 10%;
            }

            &.marker15 {
                width: 15%;
            }

            &.marker20 {
                width: 20%;
            }

            &.selected {
                background-color: var(--blue-dark);
                color: var(--white);
            }
        }
    }
}
