/**
 * Frontend style
 *
 * @author Leanza Francesco
 * @version 1.0.0
 *
 * Contents:
 *  1. Globals
 *  2. My Account Bookings
 *  3. Booking Form Widget
 *  4. Fields and Utils
 *  5. Integrations
 *
 */

/* ==========================================
 *  1. Globals
 * ==========================================
 */
.yith-wcbk-clearfix:before,
.yith-wcbk-clearfix:after {
    content : "";
    display : table;
}

.yith-wcbk-clearfix:after {
    clear : both;
}

.yith-wcbk-clearfix {
    zoom : 1; /* For IE 6/7 (trigger hasLayout) */
}

/* ==========================================
 *  2. My Account Bookings
 * ==========================================
 */
.woocommerce table.my_account_bookings {
    font-size : .85em;
}

.woocommerce table.booking_details .yith-wcbk-service-list {
    list-style : none;
}

/* ==========================================
 *  3. Booking Form Widget
 * ==========================================
 */
.yith_wcbk_booking_product_form_widget {
    border        : 1px solid #dbdbdb;
    background    : #fff;
    padding       : 20px;
    margin-bottom : 20px;
}

.yith_wcbk_widget_booking_form_close {
    display       : none;
    cursor        : pointer;
    margin-bottom : 15px;
}

.yith_wcbk_widget_booking_form_head {
    padding-bottom : 10px;
    border-bottom  : 1px solid #dbdbdb;
}

.yith_wcbk_booking_product_form_widget .woocommerce-product-rating {
    font-size : 12px;
    margin    : 0 !important;
}

.yith_wcbk_booking_product_form_widget div.product p.price,
.yith_wcbk_booking_product_form_widget div.product span.price {
    margin      : 0 0 5px 0;
    color       : #484848;
    font-size   : 25px;
    font-weight : 800;
}

.yith_wcbk_booking_product_form_widget .yith-booking-meta {
    border : none;
}

.yith_wcbk_booking_product_form_widget form.cart {
    margin  : 0 !important;
    padding : 0 !important;
}

.yith_wcbk_booking_product_form_widget button.button.alt.yith-wcbk-add-to-cart-button {
    border         : none;
    border-radius  : 7px;
    margin         : 0;
    display        : block;
    width          : 100%;
    padding        : 15px 8px;
    font-size      : 18px;
    text-transform : none;
    background     : #00a699;
    color          : #fff;
}

.yith_wcbk_booking_product_form_widget button.button.alt.yith-wcbk-add-to-cart-button:disabled,
.yith_wcbk_booking_product_form_widget button.button.alt.yith-wcbk-add-to-cart-button:disabled:hover,
.yith_wcbk_booking_product_form_widget button.button.alt.yith-wcbk-add-to-cart-button:hover {
    background : #41b7ae;
    color      : #fff;
    opacity    : 1;
}

.yith_wcbk_booking_product_form_widget .yith_wcbk_widget_booking_form_mouse_trap {
    display : none;
}

.yith_wcbk_widget_booking_form_overlay {
    display    : none;
    position   : fixed;
    top        : 0;
    left       : 0;
    width      : 100%;
    height     : 100%;
    background : rgba(255, 255, 255, 0.8);
    z-index    : 999998;
}

@media (max-width : 56.875em) {
    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed {
        position     : fixed;
        left         : 0;
        bottom       : 0;
        width        : 100%;
        height       : 86px;
        margin       : 0 !important;
        border-width : 1px 0 0 0;
        z-index      : 999999;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .yith_wcbk_widget_booking_form_mouse_trap {
        display  : block;
        position : absolute;
        top      : 0;
        left     : 0;
        width    : 100%;
        height   : 100%;
        cursor   : pointer;
        z-index  : 10;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .yith-wcbk-booking-form {
        display : none;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .product {
        display : table;
        width   : 100%;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .yith_wcbk_widget_booking_form_head {
        display        : table-cell;
        border         : none;
        padding-bottom : 0;
        vertical-align : middle;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .yith_wcbk_widget_booking_form_summary {
        display        : table-cell;
        vertical-align : middle;
        text-align     : right;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) div.product p.price {
        font-size     : 18px;
        margin-bottom : 3px;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .woocommerce-product-rating {
        margin    : 0 !important;
        font-size : 10px;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) .woocommerce-review-link {
        display : none;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed:not(.yith_wcbk_booking_product_form_widget__opened) button.button.alt.yith-wcbk-add-to-cart-button {
        display : inline-block;
        padding : 12px 30px;
        width   : auto;
        float   : right;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed.yith_wcbk_booking_product_form_widget__opened {
        bottom       : 50%;
        left         : 50%;
        height       : auto;
        max-width    : 420px;
        max-height   : 100%;
        border-width : 0;
        transform    : translateX(-50%) translateY(50%);
        box-shadow   : 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 25px 0 rgba(0, 0, 0, 0.2);
        overflow-y   : auto;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed.yith_wcbk_booking_product_form_widget__opened .yith_wcbk_widget_booking_form_close {
        display : block;
    }
}

@media (max-width : 44.375em) {
    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed {
        box-shadow : none;
        transition : height 0.3s ease-in-out;
        transform  : none;
    }

    .yith_wcbk_booking_product_form_widget.yith_wcbk_booking_product_form_widget--mobile-fixed.yith_wcbk_booking_product_form_widget__opened {
        height    : 100%;
        border    : 0;
        bottom    : 0;
        left      : 0;
        transform : none;
        max-width : 100%;
    }

    .yith_wcbk_widget_booking_form_overlay {
        opacity : 0;
    }
}

/* ==========================================
 *  4. Fields and Utils
 * ==========================================
 */

.yith-wcbk-confirm-cancel-button {
    background : #bc000f !important;
    color      : #fff !important;
}

.yith-wcbk-confirm-button-done {
    background    : #d8d8d8;
    width         : 23px;
    height        : 23px;
    top           : -10px;
    right         : -10px;
    position      : absolute;
    padding       : 3px;
    color         : #515151;
    border-radius : 50%;
    font-size     : 13px;
    border        : 2px solid #fff;
    box-sizing    : border-box;
}

/* Google Maps */
.yith-wcbk-google-maps-places-autocomplete {
    background : #fff !important;
}

/* Checkboxes */
.yith-wcbk-checkbox {
    display     : flex;
    align-items : center;
    font-weight : 400;
    cursor      : pointer;
}

.yith-wcbk-checkbox input {
    display : none;
}

.yith-wcbk-checkbox span.yith-wcbk-checkbox__checkbox {
    width        : 18px;
    height       : 18px;
    display      : block;
    background   : #f1f1f1;
    border       : 1px solid #d1d1d1;
    position     : relative;
    margin-right : 5px;
}

.yith-wcbk-checkbox span.yith-wcbk-checkbox__checkbox:after {
    content           : '';
    width             : 11px;
    height            : 7px;
    position          : absolute;
    top               : 3px;
    left              : 3px;
    border            : 2px solid #009688;
    border-top        : none;
    border-right      : none;
    background        : transparent;
    opacity           : 0;
    -webkit-transform : rotate(-45deg);
    transform         : rotate(-45deg);
}

.yith-wcbk-checkbox input:checked + span.yith-wcbk-checkbox__checkbox:after {
    opacity : 1;
}

.yith-wcbk-checkbox:hover span.yith-wcbk-checkbox__checkbox:after {
    opacity : 0.4;
}

/* Help Tip */
.yith-wcbk-help-tip {
    color          : #333;
    vertical-align : middle;
}

.yith-wcbk-help-tip:hover {
    color : #008489;
}

/* Shortcode Services */
.yith-wcbk-shortcode-services {
    margin : 15px 0;
}

/* BlockUI */
.product-type-booking .blockUI.blockOverlay::before,
.yith_wcbk_booking_product_form_widget .blockUI.blockOverlay::before,
.yith-wcbk-shortcode-booking-form .blockUI.blockOverlay::before,
.yith-wcbk-popup .blockUI.blockOverlay::before {
    display : none;
}

.yith-wcbk-block-ui-element {
    top       : 50% !important;
    left      : 50% !important;
    transform : translateX(-50%) translateY(-50%) !important;
}

/* ==========================================
 *  5. Integrations
 * ==========================================
 */

/**
 *  YITH WooCommerce Deposits and Down Payments
 *  hide deposit form when the widget is closed
*/
@media (max-width : 56.875em) {
    .yith_wcbk_booking_product_form_widget:not(.yith_wcbk_booking_product_form_widget__opened) #yith-wcdp-add-deposit-to-cart {
        display : none;
    }
}

/**
 * YITH Proteo theme
 */
.theme-yith-proteo .yith-wcbk-checkbox span.yith-wcbk-checkbox__checkbox {
    display : none;
}

.theme-yith-proteo .shop_table.booking_details tr > th,
.theme-yith-proteo .shop_table.booking_person_types_details tr > th,
.theme-yith-proteo .shop_table.booking_details tr > td,
.theme-yith-proteo .shop_table.booking_person_types_details tr > td {
    border        : none;
    border-bottom : 1px solid #ccc;
}

.theme-yith-proteo .shop_table.booking_details tbody > tr:first-child > th,
.theme-yith-proteo .shop_table.booking_person_types_details tbody > tr:first-child > th,
.theme-yith-proteo .shop_table.booking_details tbody > tr:first-child > td,
.theme-yith-proteo .shop_table.booking_person_types_details tbody > tr:first-child > td {
    border-top : 1px solid #ccc;
}

.theme-yith-proteo .shop_table.booking_details tr > th,
.theme-yith-proteo .shop_table.booking_person_types_details tr > th {
    text-align     : left;
    vertical-align : middle;
    width          : 200px;
    box-sizing     : border-box;
}

@media (max-width : 56.875em) {
    .theme-yith-proteo section.widget.yith_wcbk_booking_product_form_widget {
        position : fixed;
    }
}