/*
Theme Name: Uncode Child
Description: Child theme for Uncode theme
Author: Undsgn™
Author URI: http://www.undsgn.com
Template: uncode
Version: 1.0.0
Text Domain: uncode
*/

.regiondo-widget .regiondo-dates .regiondo-select{ text-indent:-99999px;}
.regiondo-widget .regiondo-dates:before {
    content: "SELEZIONA UNA DATA";
    position: absolute!important;
    color: black!important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    left: 0;
    margin-left: 10px;
    margin-top: 12px;
}
.regiondo-widget .regiondo-dates .regiondo-select option:first-child{display:none;}


if ( ! function_exists( 'yith_wcbk_customization_show_left_in_booking_form' ) ) {
	add_filter( 'yith_wcbk_product_form_get_booking_data', 'yith_wcbk_customization_show_left_in_booking_form', 10, 4 );

	function yith_wcbk_customization_show_left_in_booking_form( $booking_data, $product, $bookable_args, $request ) {
		if ( ! empty( $booking_data['is_available'] ) && isset( $bookable_args['from'], $bookable_args['to'] ) ) {
			if ( $product->can_show_availability( 'day' ) ) {
				$availability            = yith_wcbk_get_product_availability_per_units( $product, $bookable_args['from'], $bookable_args['to'] );
				$bookable                = $availability['bookable'];
				$message                 = sprintf(
					_n( '1 booking available', '%s bookings available', $bookable, 'yith-booking-for-woocommerce' ),
					$bookable
				);
				$booking_data['message'] .= "<p style='color:#333'><strong>" . $message . '</strong></p>';
			}
		}

		return $booking_data;
	}
}

