@import '../base';

.webview:not(.choicehotels) {
    .dcom-loader,
    .LoaderComponent__wrapper {
        display: none;
    }
}

.webview {
    background-color: $ios-background-color;

    .page-wrapper {
        background-color: $ios-background-color;
    }
    #main-content-wrapper {
        background-color: $ios-background-color;
    }

    //Global styles
    .Header {
        display: none;
    }

    #page-header-wrapper {
        display: none;
    }

    .SiteFooter {
        display: none;
    }

    #main-content {
        padding-left: 0;
        padding-right: 0;
        padding-top: 15px;
    }

    .OrderHistoryEmptyResultsList__button {
        display: none;
    }

    .GiftCardCheckoutPage {
        padding-top: 0;
        padding-bottom: 125px; // offset for fixed CTA
    }

    .GiftCardCheckoutComplete {
        padding-top: 0;

        &__success {
            margin: $gutter auto;
        }

        &__success__button.secondary,
        &__share {
            display: none;
        }
    }
}

.page-terms .webview {
    #main-content {
        padding-top: 0;
    }
    .webview-separator {
        display: block;
        width: 100%;
        height: 18px;
        background-color: $ios-background-color;
    }
    .static-content-container {
        padding: 0;
        padding-top: 25px;
    }
    p {
        padding: 15px;
        padding-bottom: 25px;
        margin-bottom: 0;
        font-size: 14px;

        &:first-child {
            padding-top: 0;
        }
    }

    h3 {
        margin-top: 17px;
        padding-left: 15px;
        padding-right: 15px;
        text-transform: capitalize;
    }
    //Disable links with css!
    a {
        @include disable-links;
        color: $ios-title-font-color;
    }
}

.page-points .webview {
    #page-header-wrapper {
        display: block;
    }

    #page-header {
        padding-top: 30px;
        min-height: 115px;
        h1.delivery-points {
            display: none;
        }
    }

    #main-content-wrapper {
        background-color: $ios-points-webview-bg-color;
    }

    #main-content {
        box-sizing: border-box;
        padding: 15px;
    }

    .ReactOdometer .odometer-digit {
        border-radius: 3px;
        margin: 0 6px;
        &:after {
            display: none;
        }
    }

    .gift {
        a,
        .points,
        .sub-name,
        .name {
            display: block;
            text-align: center;
        }
    }

    .dcom-button {
        background-image: none;
        border-radius: 3px;
        text-shadow: none;
    }

    .confirmation {
        .confirmation-banner {
            display: none;
        }
    }
}

.page-create-recurring-order .webview {
    #main-content {
        box-sizing: border-box;
        padding: 15px;
    }
    form {
        margin: 0;
    }
    .dcom-button {
        background-image: none;
        border-radius: 3px;
        text-shadow: none;
    }
    #main-content-wrapper.recurring-orders {
        background: #fff;
        .content {
            border: none;
            background: transparent;
        }
        .inner-content {
            padding: 0;
        }
        .steps {
            border-bottom: none;
            .step h1 {
                font-family: 'Open Sans', Arial, sans-serif;
                font-style: normal;
                font-size: 18px;
            }
            .separator {
                margin-bottom: -2px;
                .icon-arrow {
                    font-size: 15px;
                }
            }
        }
        .heading {
            display: none;
        }
        .input-field {
            margin-right: 0;
            width: 100%;
        }
        .input-field.tip {
            input {
                float: right;
            }
            button {
                line-height: 45px;
                height: 45px;
                float: left;
                margin-left: 0;
                width: 60px;
                background: #fff;
                border: 1px solid $ios-divider-color;
                border-right: none;
                color: $primary-text-color;
                font-weight: normal;
                &:first-of-type {
                    border-bottom-left-radius: 3px;
                    border-top-left-radius: 3px;
                }
                &:last-of-type {
                    border-top-right-radius: 3px;
                    border-bottom-right-radius: 3px;
                    border: 1px solid $ios-divider-color;
                }
                &.active {
                    background: $primary-color;
                    color: #fff;
                    border-color: $primary-color;
                }
            }
        }
        .input-field-type,
        .input-field-frequency,
        .input-field-time-pickup,
        .input-field-time-delivery {
            @extend %icon;
            position: relative;
            &:before {
                content: '\e60c';
                font-size: 6px;
                position: absolute;
                right: 10px;
                top: 50px;
            }
        }
        .input-field-time-pickup,
        .input-field-time-delivery {
            &:before {
                top: 20px;
            }
        }
    }
    label {
        font-size: 12px;
        text-transform: uppercase;
    }
    button,
    input,
    select,
    textarea {
        font-size: 16px;
    }
    input[type='text'],
    select {
        height: 45px;
    }
    input[type='text'] {
        line-height: 25px;
    }
    input[type='text'],
    select,
    textarea {
        appearance: none;
        border: solid 1px $ios-divider-color;
        border-radius: 3px;
        background: #fff;
        padding: 10px;
    }
    .cancel {
        font-weight: 600;
        color: $primary-color;
    }
    .cancel,
    .create-container,
    textarea {
        width: 100%;
    }
}

.page-recurring-orders .webview {
    .dcom-button {
        background-image: none;
        border-radius: 3px;
        text-shadow: none;
    }
    .modal-content {
        text-align: center;
        border-radius: 3px;
        padding: 15px;
    }
    .modal-header {
        padding: 0 0 15px 0;
        .close {
            display: none;
        }
    }
    .modal-body {
        padding: 0;
    }
    .modal-footer {
        padding: 15px 0 0 0;
        border-top: none;
        a {
            box-sizing: border-box;
            display: inline-block;
            width: calc(50% - 7.5px);
            padding: 10px 0;
            &.secondary {
                background: transparent;
                border: 1px solid $primary-color;
                color: $primary-color;
                margin-right: 15px;
            }
        }
    }
    .recurring-orders {
        header {
            padding-top: 15px;
        }
        .content {
            border: none;
            background: transparent;
        }
        .inner-content {
            padding: 0;
        }
        .recurring-order {
            border: none;
            background: #fff;
            margin-bottom: 15px;
            padding: 0 15px;
        }
        .recurring-order-detail {
            padding-bottom: 15px;
        }
        .heading {
            display: none;
        }
        .no-recurring-order {
            display: none;
        }
        .no-recurring-order-webview {
            display: block;
            text-align: center;

            p {
                width: 250px;
                margin: auto;
                padding-top: 15px;
                font-weight: normal;
                font-size: 14px;
                text-align: center;
                color: $ios-secondary-font-color;
            }

            p.bold {
                padding-top: 45%;
                font-weight: bold;
                color: $ios-title-font-color;
                text-align: center;
                font-size: 16px;
            }
        }
    }
}

.webview .Alerts {
    display: none;
}

.webview #paypalTab {
    display: none;
}

.webview .visa-checkout {
    display: none;
}

.webview .Masterpass {
    display: none;
}

.webview .payment-type.disabled {
    display: none;
}
