/* ========================================
   HTC BOOKING FORM ONLY - Not Search Widget
   ======================================== */

/* Customer Information Section */
.customer_info_group {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0 16px 0;
}

.customer_info_title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #4db8a8;
}

.input_field_wrapper {
    margin-bottom: 18px;
}

.input_field_wrapper:last-child {
    margin-bottom: 0;
}

.booking_form_input_label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.booking_form_input_label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.booking_form_input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    transition: all 0.2s ease;
}

.booking_form_input:hover {
    border-color: #9ca3af;
}

.booking_form_input:focus {
    outline: none;
    border-color: #4db8a8;
    box-shadow: 0 0 0 3px rgba(77, 184, 168, 0.1);
}

.booking_form_input::placeholder {
    color: #9ca3af;
}

/* Error States */
.booking_form_input.error,
.booking_form_input:invalid.touched {
    border-color: #ef4444;
}

.error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #ef4444;
}

/* Total Section */
#total_group {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0 12px 0;
}

#total_group .booking_form_input_label {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

#booking_form_total {
    font-size: 24px;
    font-weight: 700;
    color: #4db8a8;
}

/* Submit Button */
.submit_group {
    margin-top: 16px;
}

.booking_form_submit {
    width: 100%;
    padding: 16px 32px;
    background: #fbbf24;
    color: #1f2937;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking_form_submit:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
}

.booking_form_submit:active {
    transform: translateY(0);
}

/* Validation Message */
.validation-alert {
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 8px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.validation-alert.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.validation-alert.success {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    color: #166534;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Booking Form Blocks */
.booking-form-block {
    margin-bottom: 20px;
}

.booking-guests-block {
    margin-bottom: 20px;
}

/* Error Group */
#error_group {
    margin: 12px 0;
    display: none;
}

#error_group.show {
    display: block;
}

.booking_form_error_label {
    display: block;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .customer_info_group {
        padding: 20px;
        margin: 16px 0 12px 0;
    }
    
    .customer_info_title {
        font-size: 18px;
    }
    
    .booking_form_input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    #total_group {
        padding: 14px 16px;
        margin: 14px 0 10px 0;
    }
    
    #booking_form_total {
        font-size: 20px;
    }
    
    .booking_form_submit {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .submit_group {
        margin-top: 12px;
    }
}
/* Children Age Dropdowns Container */
.booking-children-ages-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: fadeInDown 0.3s ease-out;
    display: none; /* Hidden by default */
}

/* Only show when it has children */
.booking-children-ages-wrapper:not(:empty) {
    display: block;
}

.booking-children-ages-wrapper:has(.booking-child-age-item) {
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Individual Child Age Item */
.booking-child-age-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.booking-child-age-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.booking-child-age-item:last-child {
    margin-bottom: 0;
}

/* Age Label */
.booking-child-age-label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    white-space: nowrap;
}

/* Age Select Dropdown */
.booking-child-age-select {
    width: 100%;
    max-width: 280px;
    padding: 12px 40px 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-child-age-select:hover {
    border-color: #4db8a8;
    background-color: #f9fafb;
}

.booking-child-age-select:focus {
    outline: none;
    border-color: #4db8a8;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(77, 184, 168, 0.1);
}

/* Placeholder Option */
.booking-child-age-select option[value=""] {
    color: #9ca3af;
}

.booking-child-age-select option {
    padding: 12px;
    font-size: 15px;
    color: #374151;
}

/* Error State */
.booking-child-age-select.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.booking-child-age-select.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.booking-child-age-select.error {
    animation: shake 0.5s;
}

/* Validation Alert */
.validation-alert {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 18px 24px;
    margin: 20px 0;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.1);
    animation: slideInAlert 0.3s ease-out;
}

@keyframes slideInAlert {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-alert strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #7f1d1d;
}

.validation-alert ul {
    margin: 10px 0 0 20px;
    list-style: disc;
    color: #991b1b;
}

.validation-alert ul li {
    margin-bottom: 5px;
}

/* Terms Checkbox Error States */
#order_terms_check_.error {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.input-square_.error-box {
    background-color: #fef2f2;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ef4444;
    animation: shake 0.5s;
}

.input-square_.error-box label {
    color: #991b1b;
}

#terms_error {
    display: block;
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    padding-left: 4px;
}

/* Customer Form Field Errors */
.booking_form_input.error,
#customer_name.error,
#customer_email.error,
#customer_phone.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    padding-left: 4px;
}

/* Children Age Error Item Highlight */
.booking-child-age-item.error-item {
    background: #fef2f2;
    border-color: #ef4444;
    animation: shake 0.5s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .booking-children-ages-wrapper {
        padding: 20px 16px;
        margin-top: 16px;
        border-radius: 10px;
    }
    
    .booking-child-age-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .booking-child-age-label {
        font-size: 14px;
    }
    
    .booking-child-age-select {
        max-width: 100%;
        padding: 14px 40px 14px 16px;
        font-size: 14px;
    }
    
    .validation-alert {
        padding: 16px 18px;
        font-size: 13px;
    }
    
    .validation-alert strong {
        font-size: 15px;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .booking-child-age-item {
        grid-template-columns: 140px 1fr;
    }
    
    .booking-child-age-select {
        max-width: 100%;
    }
}

/* Smooth slide in animation for items */
.booking-child-age-item {
    animation: slideInItem 0.3s ease-out backwards;
}

.booking-child-age-item:nth-child(1) {
    animation-delay: 0.05s;
}

.booking-child-age-item:nth-child(2) {
    animation-delay: 0.1s;
}

.booking-child-age-item:nth-child(3) {
    animation-delay: 0.15s;
}

.booking-child-age-item:nth-child(4) {
    animation-delay: 0.2s;
}

@keyframes slideInItem {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus indicator for accessibility */
.booking-child-age-select:focus-visible {
    outline: 2px solid #4db8a8;
    outline-offset: 2px;
}

/* Better looking disabled state if needed */
.booking-child-age-select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Improve appearance on Safari */
@supports (-webkit-appearance: none) {
    .booking-child-age-select {
        -webkit-appearance: none;
    }
}

/* Print styles */
@media print {
    .booking-children-ages-wrapper {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .booking-child-age-item {
        break-inside: avoid;
    }
}
