/* Frontend Styles for Tourism Booking Plugin */

/* Main booking form container - Beautiful gradient design */
.tourism-booking-form {
    border: none !important;
    border-radius: 12px;
    margin: 30px 0;
}

.tourism-booking-form h3 {
    color: black !important;
    font-size: 1.6em;
    margin: 0 0 25px 0 !important;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* White inner container */
.tourism-booking-form .booking-fields-wrapper {
    background: white;
    border-radius: 8px;
    padding: 25px;
}

/* Form rows */
.tourism-booking-form .form-row {
    margin-bottom: 20px;
    clear: both;
}

.tourism-booking-form .form-row-half {
    width: 48%;
    float: left;
    margin-right: 4%;
    margin-bottom: 20px;
}

.tourism-booking-form .form-row-half:nth-child(2n) {
    margin-right: 0;
}

.tourism-booking-form .form-row-wide {
    width: 100%;
    clear: both;
}

/* Labels */
.tourism-booking-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tourism-booking-form .required {
    color: #e74c3c;
    font-weight: bold;
}

/* Input fields with beautiful styling */
.tourism-booking-form input[type="date"],
.tourism-booking-form input[type="number"],
.tourism-booking-form textarea,
.tourism-booking-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    background: white;
}

.tourism-booking-form input:focus,
.tourism-booking-form textarea:focus,
.tourism-booking-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tourism-booking-form input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.tourism-booking-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Small helper text */
.tourism-booking-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Price display box */
.tourism-booking-form .price-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
    font-size: 16px;
}

.tourism-booking-form .price-info strong {
    color: #667eea;
}

/* Clear floats */
.tourism-booking-form::after,
.tourism-booking-form .booking-fields-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Cart and checkout display - Clean up duplicates */
.woocommerce-cart-form dl.variation,
.woocommerce-checkout dl.variation,
.order-details dl.variation {
    margin: 10px 0;
}

.woocommerce-cart-form dl.variation dt,
.woocommerce-checkout dl.variation dt,
.order-details dl.variation dt {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.woocommerce-cart-form dl.variation dd,
.woocommerce-checkout dl.variation dd,
.order-details dl.variation dd {
    margin-bottom: 10px;
    color: #666;
}

/* Hide MyTravel theme duplicate fields */
.variation .label.variation-Start,
.variation .value.variation-Start,
.variation .label.variation-End,
.variation .value.variation-End,
.variation-date.variation-Start,
.variation-date.variation-End {
    display: none !important;
}

/* Ensure our fields are visible */
.variation .label.variation-StartDate,
.variation .value.variation-StartDate,
.variation .label.variation-EndDate,
.variation .value.variation-EndDate,
.variation .label.variation-Adults,
.variation .value.variation-Adults,
.variation .label.variation-Children,
.variation .value.variation-Children,
.variation .label.variation-Infants,
.variation .value.variation-Infants,
.variation .label.variation-SpecialRequest,
.variation .value.variation-SpecialRequest {
    display: inline-flex !important;
}

/* Clean spacing for variation items */
.variation .variation-date {
    margin-bottom: 5px;
    line-height: 1.6;
}

.variation .booking-dates {
    padding: 10px 0;
}

/* Hide any duplicate variation blocks */
.variation + .variation {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

/* Tour booking details box in orders */
.tour-booking-details {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    font-size: 13px;
    line-height: 1.6;
}

/* Hide default WooCommerce elements for tour products */
.product.tour-product .quantity {
    display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .tourism-booking-form {
        padding: 20px;
        margin: 20px 0;
    }
    
    .tourism-booking-form .booking-fields-wrapper {
        padding: 20px;
    }
    
    .tourism-booking-form .form-row-half {
        width: 100%;
        margin-right: 0;
        float: none;
    }
    
    .tourism-booking-form h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .tourism-booking-form {
        padding: 15px;
        margin: 15px 0;
    }
    
    .tourism-booking-form .booking-fields-wrapper {
        padding: 15px;
    }
}

/* Animation for price updates */
#total-price-amount {
    transition: all 0.3s ease;
}

#total-price-amount.updating {
    transform: scale(1.05);
    color: #667eea;
}

/* Better button styling for tour products */
.tourism-booking-form ~ .single_add_to_cart_button {
    color: white !important;
    border: none !important;
    padding: 15px 40px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tourism-booking-form ~ .single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.tour-label {
    display: flex;
    align-items: baseline; /* aligns smaller text nicely with emoji/text */
    gap: 6px; /* space between label and price note */
    font-weight: 600;
    color: #333;
}

.price-note {
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap; /* prevents line break */
}

.tour-guest-input {
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* Force Children/Infants labels to stay on one line */
.tourism-booking-form label[for="tour_children"],
.tourism-booking-form label[for="tour_infants"] {
    display: inline-flex !important;
    align-items: baseline;
    gap: 6px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    white-space: nowrap;
}

.tourism-booking-form label[for="tour_children"] span,
.tourism-booking-form label[for="tour_infants"] span {
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
}

