@import '../base';

/* On Checkout page order-time-container isn't wraped inside info-container */
.menu-connect-order-time-container {
    @include secondary-text;

    @include desktop {
        float: right;
        width: 300px;
        text-align: center;
        margin-top: 0;
    }

    @media (min-width: $site-width-medium) {
        width: 380px;
    }
}

.PoweredBy {
    display: flex;
    align-items: center;
    margin-bottom: $gutter;
    &__power {
        padding-right: 5px;
        width: 47%;
        text-align: right;

        @media (min-width: $site-width-small) {
            width: 45%;
        }
    }
    .icon-delivery-logo {
        text-align: left;
        font-size: 32px;
    }

    &__text {
        text-indent: -1000rem;
        display: inline-block;
    }
}

.MenuConnectMerchantDetails {
    margin: $gutter-large;

    @media (min-width: $site-width-small-portrait) {
        margin: $gutter-large $gutter-large $gutter;
    }

    @media (min-width: $site-width-small) {
        margin: $gutter-large 0 $gutter;
    }

    &--has-top-button {
        padding-top: 80px;

        .MenuConnectMerchantDetails__TimeContainer {
            display: none;

            @media (min-width: $site-width-small) {
                display: block;
            }
        }
    }

    &__Name {
        margin-bottom: $gutter;

        @media (min-width: $site-width-small) {
            padding-left: $gutter-large;
        }
    }

    &__Back {
        display: flex;
        align-items: center;
        padding: 0 0 $gutter-large;
        font-size: 18px;
        width: 180px;
        text-decoration: none;
        cursor: pointer;
        border: none;
        background: transparent;

        &__Icon {
            margin-right: $gutter;
        }

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

    &__Item {
        display: flex;
        margin-bottom: $gutter;
        padding-right: $gutter-small;

        @media (min-width: $site-width-small-portrait) {
            margin-bottom: 0;
        }

        &__Label {
            min-height: 20px;
            line-height: 20px;
            margin-right: $gutter;

            @media (min-width: $site-width-small) {
                &.specials-info {
                    margin-right: 0;
                }
            }
        }

        &__Icon {
            height: 19px;
            margin-right: $gutter-small;
            margin-bottom: $gutter;
            line-height: 19px;
            font-size: 19px;

            @media (min-width: $site-width-small) {
                line-height: 20px;
                font-size: 20px;
            }
        }
    }

    &__Container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;

        &__Left {
            flex: 1 1 100%;

            @media (min-width: $site-width-small-portrait) {
                flex: 0 1 auto;
            }

            @media (min-width: $site-width-small) {
                padding-left: $gutter-large;
            }

            &__Info {
                display: flex;
                flex-flow: column nowrap;
                margin-top: $gutter;

                @media (min-width: $site-width-small-portrait) {
                    flex-flow: row nowrap;
                }
            }
            .description {
                @include multiline-format;
            }
            .click-area {
                cursor: pointer;
            }
        }

        &__Right {
            flex: 0 1 auto;

            @media (min-width: $site-width-small) {
                padding-right: 60px;
            }

            .PoweredBy {
                margin: 0;
            }
        }
    }

    .hours-menu {
        position: relative;
        .header-module {
            border-radius: 3px;
            background-color: $module-background;
            z-index: $z-index-header-info;
            box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
            cursor: default;

            &:after,
            &:before {
                bottom: 100%;
                left: 10px;
                border: solid transparent;
                content: ' ';
                height: 0;
                width: 0;
                position: absolute;
                pointer-events: none;

                @media (min-width: $site-width-small) {
                    left: 30px;
                }
            }
            &:after {
                border-color: rgba($module-background, 0);
                border-bottom-color: $module-background;
                border-width: 8px;
                margin-left: -8px;

                @media (min-width: $site-width-small) {
                    margin-right: -8px;
                    margin-left: auto;
                }
            }
            &:before {
                border-color: rgba($border-color, 0);
                border-bottom-color: $border-color;
                border-width: 9px;
                margin-left: -9px;

                @media (min-width: $site-width-small) {
                    margin-right: -9px;
                    margin-left: auto;
                }
            }
        }
        .hours-nav {
            position: absolute;
            left: 0;
            top: 30px;
            width: 200px;
            min-height: 100px;
            padding: 10px 5px 5px;
            line-height: 22px;
            .schedule-info {
                color: $primary-text-color;
                .hours-container {
                    .hours {
                        border-right: none;
                    }
                    .schedule-times {
                        padding: 2px;
                        display: flex;
                        justify-content: space-between;
                        .day,
                        .times {
                            float: none;
                        }
                    }
                }
                .hours-title {
                    font-weight: 600;
                    font-size: 13px;
                    margin-bottom: 10px;
                    margin-left: 5px;
                }
            }
        }
    }
}
