@charset "UTF-8";

div.buddycare {
    /* margin-top: 20px; */
    /* margin-left: 26px; */
    padding-bottom: 160px;
    padding-top: 24px;
    padding-left: 12px;
    padding-right: 12px;
    /* min-width: 320px; */
    background-color: #fff;
    box-sizing: border-box;
    /* max-width: 780px; */

    nav {
        display: block;
        border: 1px solid #b4b4b4;
        margin-bottom: 20px;
        margin-top: 20px;
        padding: 20px 12px;

        p {
            font-size: 123.1%;
            font-weight: bolder;
            letter-spacing: 1px;
            line-height: 1.5;
        }

        ul {
            li {
                line-height: 1.2;
                padding-left: 20px;
                height: 23px;

                position: relative;

                &:before {
                    box-sizing: border-box;
                    border-left: 6px solid transparent;
                    border-right: 6px solid transparent;
                    border-top: 6px solid #fccbcf;
                    content: "";
                    width: 12px;
                    height: 6px;
                    top: 5px;
                    left: 2px;
                    position: absolute;
                }

                a {
                    /* display: inline-block; */
                    line-height: 1.2;
                }
            }
        }
    }

    div#calorie,
    div#attention,
    div#question {
        margin-top: 72px;

        div.toTop {
            margin-top: 16px;
            text-align: center;

            a {
                color: #ed777a;
                font-size: 1.5rem;
                font-weight: bold;
                line-height: 3.5;
                letter-spacing: 1px;
            }
        }
    }

    div#calorie {

        div.container {
            background-color: #f0eeef;
            border-radius: 5px;
            padding: 30px 15px 20px;
            /* height: 520px; */
            box-sizing: border-box;
            overflow: hidden;

            form {

                div.group {

                    margin-bottom: 20px;

                    div.title {
                        display: flex;
                        align-items: center;
                        flex-wrap: wrap;

                        flex-shrink: 0;
                        padding-left: 24px;
                        margin-bottom: 4px;

                        label {
                            font-size: 1.6rem;
                            font-weight: bold;
                            margin-right: 16px;
                            position: relative;

                            &:before {
                                border-radius: 50%;
                                content: "";
                                height: 14px;
                                left: -24px;
                                position: absolute;
                                width: 14px;
                                background-color: #fccbcf;
                            }
                        }

                        p.modalLink {
                            text-decoration: underline;
                            cursor: pointer;

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


                    }

                    input,
                    select {
                        color: #000;
                        font-size: 1.5rem;
                        box-sizing: border-box;
                        border: 1px solid #d2c1c2;
                        padding: 9px;
                        background-color: #fbf3d1;
                        line-height: 1.15;
                        height: 40px;

                        &.error {
                            background-color: #FFCCCC;
                            box-shadow: 0px 0px 4px #F04E4E;
                        }

                        &.done {
                            background-color: #fff;
                            box-shadow: none;
                        }
                    }

                    input {
                        width: 100%;
                        position: relative;
                    }

                    div.selectContainer {
                        position: relative;

                        div {
                            &:before {
                                content: "";
                                border-left: 1px solid #d2c1c2;
                                background: #f7f2ec;
                                display: block;
                                height: 100%;
                                position: absolute;
                                right: 40px;
                                top: 0;
                                width: 4px;
                                z-index: 3;
                            }
                        }

                        &:before {
                            content: "";
                            height: 100%;
                            width: 40px;

                            background: #fff;
                            border: 2px solid #ed777a;

                            pointer-events: none;
                            position: absolute;
                            right: 0;
                            top: 0;

                            z-index: 1;
                            box-sizing: border-box;
                        }

                        &:after {
                            border-color: #ed777a transparent transparent transparent;
                            border-style: solid;
                            border-width: 6px 6px 0 6px;
                            content: "";
                            height: 0;
                            margin-top: -3px;
                            pointer-events: none;
                            position: absolute;
                            right: 13px;
                            top: 50%;
                            width: 0;
                            z-index: 2;
                        }

                        select {
                            width: 100%;
                            position: relative;
                        }
                    }
                }

                div.modal {
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    text-align: center;
                    background: rgba(0, 0, 0, 0.75);
                    padding: 0 20px;
                    overflow: auto;
                    opacity: 0;
                    visibility: hidden;
                    transition: 0.3s;
                    box-sizing: border-box;
                    z-index: 200;

                    &.active {
                        opacity: 1;
                        visibility: visible;
                    }

                    div.modalContainer {
                        position: relative;
                        left: 50%;
                        top: 50%;
                        transform: translateX(-50%) translateY(-50%);
                        max-width: 730px;

                        background-color: #fff;
                        border-radius: 4px;
                        padding: 20px 15px;
                        width: 100%;
                        text-align: left;
                        box-sizing: border-box;

                        dl {
                            dt {
                                font-weight: bold;
                                line-height: 1.5;

                                &.marginTop {
                                    margin-top: 16px;
                                }
                            }

                            dd {
                                ul {
                                    li {
                                        line-height: 1.5;
                                    }
                                }
                            }
                        }

                        button.modalCloseButton {
                            width: 100%;
                            display: flex;
                            justify-content: center;

                            p {
                                color: #fff;
                                font-weight: bold;
                                background-color: #b4181c;
                                border-radius: 50px;

                                margin-top: 5px;
                                padding-bottom: 15px;
                                padding-left: 15px;
                                padding-right: 15px;
                                padding-top: 15px;

                                border: none;
                                width: 125px;
                                text-decoration: none;
                                margin-left: 0;
                            }
                        }

                        button.modalCloseImage {
                            position: absolute;
                            top: -20px;
                            right: -18px;
                            width: 38px;
                            height: 38px;

                            border: none;
                            padding: 0;
                            background: none;

                            img {
                                width: 100%;
                            }
                        }
                    }


                }

                p.alert {
                    display: none;
                    margin-top: 8px;
                    color: #b4181c;
                    text-align: center;

                    &.error {
                        display: block;
                    }
                }

                button.getButton {
                    color: #fff;
                    border-radius: 60px;
                    display: block;
                    font-size: 1.6rem;
                    margin: 8px auto 0;
                    padding: 10px 15px;
                    width: 200px;
                    background-color: #ed777a;
                    border: none;
                    cursor: pointer;
                }

            }

            div.load {
                display: none;
                overflow: hidden;
                transition: 0.3s ease;
                justify-content: center;
                align-items: center;

                p {
                    color: #eb676f;
                    font-size: 2rem;
                    font-weight: bold;
                }

                &.active {
                    width: 100%;
                    display: flex;
                    margin: auto;
                }
            }

            div.result {
                display: none;
                opacity: 0;
                transition: max-height 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0.3s;

                &.active {
                    display: block;
                    opacity: 1;
                    transition: max-height 0.3s ease-in, opacity 0.3s ease-in, visibility 0s;
                }

                h3 {
                    color: #ed777a;
                    font-size: 1.8rem;
                    font-weight: bold;
                }

                p.sub {
                    text-align: center;
                    margin-top: 16px;
                    margin-bottom: 24px;
                    font-size: 1.8rem;
                    font-weight: bold;
                    padding: 20px;
                    background-color: #fff;
                    position: relative;

                    &:before {
                        content: '';
                        width: 20px;
                        height: 12px;
                        background-color: #fff;
                        clip-path: polygon(0 0, 100% 0, 50% 100%);
                        position: absolute;
                        bottom: -10px;
                        right: 50%;
                        transform: translateX(-50%);
                    }

                    span {
                        display: block;
                    }

                    strong {
                        color: #ed777a;
                        font-size: 2.4rem;
                        font-weight: bold;
                    }
                }

                div {
                    margin-top: 16px;

                    p {
                        color: #ed777a;
                        font-size: 1.5rem;
                        font-weight: bold;
                    }

                    ul {
                        li {
                            line-height: 1.5;
                        }
                    }
                }

                small {
                    display: block;
                    margin-top: 16px;
                }

                button {
                    color: #000;
                    border-radius: 60px;
                    display: block;
                    font-size: 1.6rem;
                    margin: 20px auto 0;
                    padding: 10px 15px;
                    width: 200px;
                    background-color: #d8d8d8;
                    border: none;
                    cursor: pointer;
                }
            }
        }

        div.summary {
            margin-top: 24px;

            ul {
                margin-top: 16px;
                display: flex;
                justify-content: center;
                gap: 16px;
                background-color: #fff3e5;
                border-radius: 5px;
                padding: 16px;

                li {
                    display: flex;
                    flex-direction: column-reverse;
                    justify-content: center;
                    align-items: center;
                    width: 216px;

                    img {
                        width: 100%;
                        max-width: 200px;
                    }

                    p {
                        text-align: center;
                        letter-spacing: 0;
                        margin-top: 16px;
                        font-weight: bold;
                        padding: 8px;
                        padding-bottom: 4px;
                        border: 2px solid #000;
                        width: fit-content;

                        span {
                            display: inline-block;
                            font-weight: bold;
                        }
                    }
                }
            }
        }
    }

    div#attention {
        div.figure {
            margin-top: 16px;
            padding: 16px;
            background-color: #fff3e5;

            ul {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 8px;

                li.image {

                    img {
                        width: 100%;
                        max-width: 160px;
                    }
                }

                li.arrow {

                    p {
                        text-indent: -9999px;
                        overflow: hidden;
                        white-space: nowrap;

                        background-color: #3ca21b;
                        clip-path: polygon(0 0, 100% 50%, 0 100%);
                        width: 16px;
                        height: 32px;
                    }
                }
            }
        }

        div.summary {
            margin-top: 24px;
        }
    }

    div#question {

        dl {
            div {

                dt.accordion {
                    padding: 12px 15px;
                    padding-right: calc(15px + 1em);
                    min-height: 28px;
                    display: flex;
                    align-items: center;
                    position: relative;
                    border-bottom: 1px solid #f0eeef;

                    &:before {
                        box-sizing: border-box;
                        border-bottom: 2px solid transparent;
                        border-left: 2px solid transparent;
                        border-right: 3px solid #ed777a;
                        border-top: 3px solid #ed777a;
                        content: "";
                        height: 12px;
                        margin-top: -9px;
                        position: absolute;
                        right: 14px;
                        top: 50%;
                        -webkit-transform: rotate(135deg) scale(0.7);
                        transform: rotate(135deg) scale(0.7);
                        width: 12px;
                    }

                    &:hover {
                        color: #fff;
                        background-color: #ed777a;

                        &:before {
                            border-right-color: #fff;
                            border-top-color: #fff;
                        }
                    }

                    &.open {
                        color: #fff;
                        background-color: #ed777a;

                        &:before {
                            margin-top: -4px;
                            transform: rotate(-45deg) scale(0.7);
                            border-right-color: #fff;
                            border-top-color: #fff;
                        }
                    }
                }

                dd {
                    height: 0px;
                    overflow: hidden;
                    transition: 0.3s;
                    padding: 0 10px;
                    background-color: #fdfaeb;

                    &.active {
                        padding: 10px;
                    }
                }
            }
        }
    }
}

@media(max-width:780px) {
    div.buddycare {
        padding-left: 12px;
        padding-right: 12px;
        width: 100%;
        margin-left: 0;

        div#calorie {

            div.summary {

                ul {
                    padding: 16px 8px;
                    gap: 8px;
                    justify-content: space-between;

                    li {
                        width: calc((100% - 16px) / 3);

                        p {
                            padding: 4px;
                            padding-bottom: 2px;

                            &.cal60 {
                                padding: 4px 9px 2px;
                            }
                        }
                    }
                }
            }
        }

        div#attention {
            div.figure {
                margin-top: 16px;
                padding: 16px;
                background-color: #fff3e5;

                ul {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    gap: 8px;


                }
            }

            div.summary {
                margin-top: 24px;
            }
        }
    }
}

@media(max-width:400px) {

    div.buddycare {

        div#calorie,
        div#attention,
        div#question {

            div.toTop {

                a {
                    font-size: 1.2rem;
                    letter-spacing: 0;
                }
            }
        }

        div#calorie {

            div.container {

                form {
                    div.group {

                        input,
                        select {
                            height: 40px;
                        }

                        div.selectContainer {
                            position: relative;

                            div {
                                &:before {
                                    height: 100%;
                                    position: absolute;
                                    right: 40px;
                                    top: 0;
                                    width: 4px;
                                    z-index: 3;
                                }
                            }

                            &:after {
                                border-width: 6px 6px 0 6px;
                                content: "";
                                height: 0;
                                margin-top: -3px;
                                right: 14px;
                                top: 50%;
                                width: 0;
                                z-index: 2;
                            }

                            select {
                                width: 100%;
                                position: relative;
                            }
                        }
                    }
                }
            }

            div.summary {

                ul {

                    li {
                        width: calc((100% - 4px) / 3);

                        p {
                            padding: 4px;
                            padding-bottom: 2px;
                        }
                    }
                }
            }
        }

        div#attention {
            div.figure {
                margin-top: 16px;
                padding: 16px;
                background-color: #fff3e5;

                ul {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    gap: 8px;

                    li.arrow {

                        p {
                            width: 10px;
                            height: 20px;
                        }
                    }
                }
            }
        }
    }
}