/*
Theme Name: Twenty Twenty-Five Child
Theme URI: https://wordpress.org/themes/twentytwentyfive/
Description: Child theme for Twenty Twenty-Five
Author: OslofjordBySail
Author URI: https://oslofjordbysail.com/
Template: twentytwentyfive
Version: 1.0.0
Text Domain: twentytwentyfive-child
*/

/* Custom styles for WooCommerce Bookings */
.woocommerce-breadcrumb,
.wp-block-woocommerce-product-meta,
.wc-tabs {
    display: none !important;
}

.wc-bookings-booking-form {
    border: 0;
    padding: 0;
}

.wc-bookings-date-picker-timezone-block {
    display: none;
}

.wc-bookings-date-picker .ui-datepicker .ui-datepicker-prev, .wc-bookings-date-picker .ui-datepicker .ui-datepicker-next {
    background-color: black;
}

/* Mobile-friendly quantity selector with + and - buttons */
.quantity-selector {
    display: flex;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 150px;
    margin: 0.5rem 0;
}

.quantity-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    padding: 0;
    margin: 0;
}

.quantity-button:hover {
    background-color: #e0e0e0;
}

.quantity-button:active {
    background-color: #d0d0d0;
}

.quantity-selector input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    height: 40px;
    width: 50px;
    text-align: center;
    padding: 0;
    margin: 0;
    font-size: 16px;
}

/* Remove number input spinners */
.quantity-selector input[type="number"]::-webkit-inner-spin-button,
.quantity-selector input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Prevent zoom on mobile when focusing on number inputs */
@media (max-width: 767px) {
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
    
    .form-field label {
        display: block;
        margin-bottom: 5px;
    }
    
    .wc-bookings-booking-form .form-field {
        margin: 0 0 1em;
        padding: 0;
    }
}

/* Styling for the CTA button */
.booking-cta-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    background-color: #2271b1 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 300px;
    margin: 1.5rem auto 0.5rem;
}

.booking-cta-button:not(.disabled):hover {
    background-color: #135e96 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.booking-cta-button .button-text {
    margin-right: 8px;
}

.booking-cta-button .button-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.booking-cta-button:hover .button-arrow {
    transform: translateX(4px);
}

.booking-cta-button.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Enhanced calendar header with more visible navigation arrows */
.wc-bookings-date-picker .ui-datepicker-header {
    background: #ffffff !important;
    color: #333 !important;
    padding: 12px !important;
    position: relative;
}

/* Remove border from date picker */
.wc-bookings-date-picker.wc_bookings_field_start_date {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Improve calendar styling */
.wc-bookings-date-picker .ui-datepicker {
    width: 100% !important;
    max-width: 100%;
    padding: 0 !important;
    border-radius: 8px;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
}

/* Time selection instruction text styling */
.time-selection-instruction {
    margin: 20px 0 10px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #2271b1;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    text-align: left;
    display: none; /* Hidden by default */
}

/* Show instruction when time slots are available */
.wc-bookings-booking-form .block-picker:not(:has(li:only-child)) + .time-selection-instruction,
.wc-bookings-booking-form .block-picker:has(li:not(:contains("Choose a date"))) ~ .time-selection-instruction {
    display: block;
}

/* Alternative selector for broader browser support */
.wc-bookings-booking-form .block-picker li a ~ .time-selection-instruction {
    display: block;
}

/* Remove padding and border from calendar */
.ui-datepicker-inline.ui-datepicker.ui-widget.ui-widget-content.ui-helper-clearfix.ui-corner-all {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.wc-bookings-date-picker .ui-datepicker td {
    border: none;
    padding: 2px;
}

.wc-bookings-date-picker .ui-datepicker td a {
    border-radius: 4px;
    text-align: center;
    padding: 8px 0;
}

.wc-bookings-date-picker .ui-datepicker td.bookable a {
    background-color: #ffffff !important;
    color: #333 !important;
    border: 1px solid #e0e0e0;
}

.wc-bookings-date-picker .ui-datepicker td.bookable a:hover {
    background-color: #f8f8f8 !important;
}

.wc-bookings-date-picker .ui-datepicker td.bookable-range a {
    background-color: #2271b1 !important;
    color: #fff !important;
}

/* Make booking form more mobile-friendly */
@media (max-width: 767px) {
    .wc-bookings-booking-form {
        padding: 0;
    }
    
    .wc-bookings-date-picker .ui-datepicker-header {
        padding: 10px;
    }
    
    .wc-bookings-date-picker .ui-datepicker th {
        padding: 8px 0;
    }
    
    .wc-bookings-date-picker .ui-datepicker td a {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .wc-bookings-date-picker .ui-datepicker td.ui-datepicker-today a {
        font-weight: bold;
    }
    
    .wc-bookings-booking-form .wc-bookings-booking-cost {
        margin: 1em 0;
        padding: 1em;
        border-radius: 4px;
    }
}

/* Product Image Gallery Customization */
/* Remove zoom functionality */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
    display: none !important;
}

/* Disable image zoom on hover and click */
.woocommerce div.product div.images .woocommerce-product-gallery__image a {
    pointer-events: none;
    cursor: default;
}

/* Completely disable WooCommerce zoom effect */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
    pointer-events: none;
}

/* Disable FlexSlider zoom effect */
.woocommerce-product-gallery__wrapper .zoomImg {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Force disable any hover zoom effects */
.woocommerce div.product div.images img {
    transition: none !important;
    transform: none !important;
}

/* Make thumbnails smaller with margins */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    margin-top: 2px !important;
}

.woocommerce div.product div.images .flex-control-thumbs li {
    width: calc(16.666% - 8.5px) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

/* Ensure thumbnails stay small on mobile */
@media (max-width: 768px) {
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: calc(25% - 7.5px) !important;
    }
}

/* WooCommerce Bookings Form Styling */
/* Style quantity selectors for Adults and Children */
.wc-bookings-booking-form .wc-bookings-booking-cost {
    background: #f9f9f9;
    border: 1px solid #ddd;
    margin: 0 0 1em;
    padding: 1em;
}

/* Style the quantity input fields */
.wc-bookings-booking-form .wc_bookings_field_persons input.booking_persons_field {
    width: 50px;
    text-align: center;
    padding: 8px 5px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #fff;
    box-shadow: none;
    font-size: 16px;
}

/* Style the quantity buttons */
.wc-bookings-booking-form .wc_bookings_field_persons .wc_bookings_field_persons_qty button {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wc-bookings-booking-form .wc_bookings_field_persons .wc_bookings_field_persons_qty button:hover {
    background-color: #e0e0e0;
}

/* Style the month navigation buttons to match quantity buttons */
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-prev, 
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-next {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 8px;
    padding: 0 !important; /* Remove padding */
}

.wc-bookings-date-picker .ui-datepicker .ui-datepicker-prev:hover, 
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-next:hover {
    background-color: #e0e0e0 !important;
}

/* Style the month/year header */
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-header {
    padding: 10px 0;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 0;
}

.wc-bookings-date-picker .ui-datepicker .ui-datepicker-title {
    line-height: 40px;
    margin: 0 40px;
    font-weight: normal;
    font-size: 16px;
}

/* Fix the arrows on the navigation buttons */
.wc-bookings-date-picker .ui-icon-circle-triangle-e,
.wc-bookings-date-picker .ui-icon-circle-triangle-w {
    background-image: none !important;
    text-indent: 0 !important;
    color: #333;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
}

.wc-bookings-date-picker .ui-icon-circle-triangle-e:before {
    content: "\203a";
    font-size: 24px;
}

.wc-bookings-date-picker .ui-icon-circle-triangle-w:before {
    content: "\2039";
    font-size: 24px;
}

/* Hide the "NEXT" and "PREVIOUS" text on navigation buttons */
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-prev span,
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-next span {
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0 !important; /* Remove margin */
    padding: 0 !important; /* Remove padding */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Hide any text that might be in the navigation buttons */
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-prev,
.wc-bookings-date-picker .ui-datepicker .ui-datepicker-next {
    font-size: 0;
    overflow: hidden;
}

/* Style the booking section headings to match Adults/Children labels */
.booking-section-heading {
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
    font-family: inherit;
}

/* Improve the calendar styling */
.wc-bookings-date-picker .ui-datepicker {
    border-radius: 0;
    padding: 0;
    border: 1px solid #ddd;
}

.wc-bookings-date-picker .ui-datepicker table {
    margin: 0;
    border-spacing: 2px;
}

.wc-bookings-date-picker .ui-datepicker td {
    border: 1px solid #f0f0f0;
    padding: 0;
}

.wc-bookings-date-picker .ui-datepicker td.bookable a {
    background-color: #fff !important;
    color: #333 !important;
}

.wc-bookings-date-picker .ui-datepicker td.bookable a:hover {
    background-color: #f9f9f9 !important;
}

/* Sticky Book Now Button */
.sticky-book-now-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #000000 0%, #000000f8 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    transform: translateY(100px);
    opacity: 0;
}

.sticky-book-now-button.animated {
    transform: translateY(0);
    opacity: 1;
}

.sticky-book-now-button:hover {
    background: linear-gradient(135deg, #135e96 0%, #0a4b78 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: white;
    transform: translateY(-5px) scale(1.05);
}

.sticky-book-now-button:active {
    transform: translateY(-2px) scale(0.98);
}

.book-now-text {
    margin-right: 10px;
}

.book-now-icon {
    font-size: 20px;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

.sticky-book-now-button.pulse {
    animation: pulse 1s ease;
}

/* Mobile responsiveness for the button */
@media (max-width: 768px) {
    .sticky-book-now-button {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 16px;
    }
}
