@charset "utf-8";

.product-lineup-area {
    width: 100%;
}

#repcal_lineup {
    width: 92%;
    max-width: 1260px;
    margin-block: 1.5rem 0;
    margin-inline: auto;
}

/* ========================= ヘッダー ========================= */
.search__wrapper {
    width: 100%;
    padding-block: 2rem;
    padding-inline: 12%;
    margin-inline: auto;
    background-color: #f1f1f1;
    border-radius: 10px;

    .search__inner {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-row-gap: 0.6rem;
        grid-column-gap: 2rem;
        align-items: baseline;
    }

    .search__text {
        grid-row: 1;
        grid-column: 1;
        font-size: 14px;
        font-weight: bold;
    }

    .search__model {
        grid-row: 2;
        grid-column: 2/3;
        font-size: 14px;
        color: #3d68cc;
    }

    & #repcal_header_search_form {
        position: relative;
        display: flex;
        grid-row: 1;
        grid-column: 2;
        width: 100%;
        height: 3.2rem;
        padding: 0;
        margin-block: 0;
        margin-inline: 0;
        overflow: visible;
        background-color: var(--white);
        border: 1px solid #a8a8a8;
        border-radius: 11px;
    }

    & #repcal_header_search_word {
        width: 100%;
        padding-block: 0;
        padding-inline: 0.8em 3em;
        text-overflow: ellipsis;
        font-size: 16px;
        border: none;
        border-radius: 12px;

        &:focus {
            outline: 2px solid #3d68cc;
        }

        &:focus.is-suggest-open {
            border-radius: 10px 12px 12px 0;
        }
    }

    & #repcal_header_search_button {
        position: absolute;
        top: 0;
        right: 0;
        width: 52px;
        height: 100%;
        font-family: FontAwesome;
        font-size: 20px;
        color: #fff;
        cursor: pointer;
        outline: none;
        background: #3d68cc;
        border: none;
        border-radius: 0 10px 10px 0;
    }
}

/* ========================= 検索結果表示 =========================  */

.prod_display_top {
    margin-block: 2rem 0;
}

.word-num-display-box {
    width: fit-content;
    min-width: 250px;
    max-width: 500px;
    font-size: 14px;
    color: var(--black_main);

    .result_product_display_text {
        font-size: 16px;
    }
}

/* ========================= 全体 ========================= */
.repcal__wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 6%;
    width: 100%;
    margin-block: 2rem 0;
}

/* ========================= 製品ごと ========================= */
.repcal__box {
    display: grid;
    grid-template-columns: 14% 50% 30%;
    align-items: center;
    justify-content: space-between;
    justify-items: start;
    padding-block: 1.4rem;
    color: #333;
    text-decoration: none;
    border-block-end: 1px solid var(--gray_border_lighter);

    &:hover {
        .repcal__image {
            opacity: 0.7;
        }

        .status {
            opacity: 0.7;
        }

        .repcal__name {
            color: #3d68cc;
            text-decoration: underline;
        }

        .repcal__name--catno {
            color: #3d68cc;
        }
    }

    .repcal__image {
        grid-row: 1/2;
        grid-column: 1/2;
    }

    .repcal__name {
        grid-row: 1/2;
        grid-column: 2/3;
        align-self: center;
        font-size: 15px;
    }

    .repcal__name--model {
        font-weight: bold;
    }

    .repcal__name--catno {
        font-size: 80%;
        color: #666;
    }

    .repcal__name--end {
        width: fit-content;
        padding-inline: 1em;
        margin-block: 0.2em 0;
        font-size: 70%;
        color: #fff;
        background-color: #666;
        border-radius: 5px;
    }
}

.status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-row: 1/2;
    grid-column: 3/4;
    gap: 0 5%;
    width: 100%;

    .status__icon {
        display: flex;
        flex-direction: column-reverse;
        gap: 0.6em 0;
        align-items: center;
        justify-content: space-between;
        padding-block: 0.6rem;
        font-size: 14px;
        font-weight: bold;
        line-height: 1;
        background-color: #f1f1f1;
        border-radius: 10px;

        &.is-ok {
            &.status__rep {
                color: #3d68cc;
                background-color: #eaf0ff;
            }

            &.status__cal {
                color: #0c8a4d;
                background-color: #e9faf1;
            }

            &::before {
                display: inline-block;
                flex-grow: 1;
                width: 28%;
                aspect-ratio: 1 / 1;
                content: "";
                border: 3px solid;
                border-radius: 50%;
            }
        }

        &.is-condition {
            color: #c98a00;
            background-color: #fff6e5;

            &::before {
                width: 38%;
                aspect-ratio: 1 / cos(30deg);
                content: "";
                background: #c98a00;
                clip-path: polygon(50% 0, 100% 100%, 0 100%, 50% 0, 50% var(--b), calc(var(--b) * cos(30deg)) calc(100% - var(--b) / 2), calc(100% - var(--b) * cos(30deg)) calc(100% - var(--b) / 2), 50% var(--b));

                --b: 5px;
            }
        }

        &.is-ng {
            color: #666;
            background-color: #d5d9d9;
            opacity: 0.35;

            &::before {
                display: inline-block;
                width: 32%;
                max-width: 20px;
                margin-block: 0 7px;
                content: "";
                border-top: 2px solid #666;
            }
        }
    }
}

#inquir_message {
    max-width: 960px;
    margin-block: 8rem 0;
    margin-inline: auto;

    .im__head {
        font-weight: bold;
    }

    .im__inquiry {
        display: flex;
        justify-content: center;
        margin-block: 1.5rem 0;
        background-color: var(--gray-bg);
        border: 1px solid var(--gray_border);
        border-radius: 20px;
        box-shadow: var(--shadow_weak);
    }

    .im__box {
        width: stretch;
        padding-block: 3rem;
        padding-inline: 8%;
        font-weight: bold;

        &:hover {
            opacity: 0.7;
        }
    }

    .im__box--text {
        width: 100%;
        padding-inline: 0;
        font-size: 14px;
        text-align: center;
    }

    .im__box--link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-inline: 2%;
        margin-block: 1.2rem 0;
    }

    .im__box--link-text {
        font-size: 20px;
    }

    .arrow-right {
        width: 14px;
        height: 14px;
        border-block-start: solid 5px #666;
        border-inline-end: solid 5px #666;
        transform: rotate(45deg);
    }

    .border {
        align-self: stretch;
        width: 1px;
        margin-block: 2rem;
        background-color: var(--gray_border);
    }
}

@media (max-width: 960px) {
    .repcal__wrapper {
        grid-template-columns: repeat(1, 1fr);
        gap: 0;
        margin-block: 0;
    }

    /* ========================= ヘッダー ========================= */
    .search__wrapper {
        width: 100vw;
        padding-block: 1.5rem;
        padding-inline: 0;
        margin-inline: calc(50% - 50vw);
        border-radius: 0;

        .search__inner {
            grid-template-columns: auto;
            grid-column-gap: 1rem;
            width: 92%;
            margin-inline: auto;
        }

        .search__text {
            grid-row: 1;
            grid-column: 1;
        }

        & #repcal_header_search_form {
            grid-row: 2;
            grid-column: 1;
            height: 2.8rem;
        }

        & #repcal_header_search_button {
            width: 42px;
        }
    }

    .prod_display_top {
        margin-block: 1rem 0;
    }

    /* ========================= 製品ごと ここから ========================= */
    .repcal__box {
        grid-template-rows: auto;
        grid-template-columns: 24% 70%;
        row-gap: 0.5rem;
        align-items: start;
        padding-block: 2rem;

        .repcal__image {
            grid-row: 1 / 3;
            grid-column: 1 / 2;
            align-self: center;
        }

        .repcal__name {
            grid-row: 1/ 2;
            grid-column: 2 / 3;
            font-size: 14px;
        }
    }

    .status {
        grid-row: 2 / 3;
        grid-column: 2 / 3;
        gap: 0 3%;
        font-size: 13px;

        .status__icon {
            flex-direction: row-reverse;
            gap: 0.4rem;
            justify-content: center;
            padding-block: 0.6rem;
            padding-inline: 0.4rem;
            font-size: 12px;
            border-radius: 5px;

            &.is-ok {
                &::before {
                    flex-grow: inherit;
                    width: 22%;
                    max-width: 18px;
                    margin-block: 1px 0;
                    border-width: 3px;
                }
            }

            &.is-ng {
                &::before {
                    margin-block: 2px 0;
                }
            }

            &.is-condition {
                &::before {
                    width: 26%;
                    max-width: 20px;
                    margin-block: 1px 0;

                    --b: 3px;
                }
            }
        }
    }

    #inquir_message {
        .im__head {
            font-size: 14px;
        }

        .im__inquiry {
            flex-direction: column;
            padding-block: 2rem;
        }

        .im__box {
            padding-block: 0;
        }

        .im__box--link-text {
            font-size: 16px;
        }

        .im__box--link {
            max-width: 300px;
            padding-inline: 0;
            margin-block: 0.6rem 0;
            margin-inline: auto;

            & img {
                width: 20px;
            }
        }

        .arrow-right {
            width: 10px;
            height: 10px;
            border-block-start: solid 3px #666;
            border-inline-end: solid 3px #666;
        }

        .border {
            width: 84%;
            height: 1px;
            margin-block: 2rem;
            margin-inline: auto;
            background-color: var(--gray_border);
        }
    }
}
