/* Addonize Booking Styles v1.0.7 */

#booking-form-container { 
    display: flex; gap: 30px; max-width: 1200px; flex-wrap: wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Calendar inline mode */
#booking-form-container.calendar-inline .booking-calendar { flex: 1; min-width: 300px; }

/* Calendar field mode */
#booking-form-container.calendar-field { flex-direction: column;}
#booking-form-container.calendar-field .booking-form { min-width: auto; }

.booking-calendar h3 { color: #333; font-size: 24px; margin: 0 0 20px 0; font-weight: 600; text-align: center; }

/* Calendar Styling */
.flatpickr-calendar.inline {
    position: relative; display: block; border-radius: 8px; background: #f8f9fa; color: #333;
    border: 1px solid #e0e0e0; width: 100%; max-width: 350px; margin: 0 auto;
}
.flatpickr-calendar.inline .flatpickr-months { background: #fff; color: #333; padding: 20px 0 10px; border-bottom: 1px solid #e0e0e0; }
.flatpickr-calendar.inline .flatpickr-current-month { color: #333; font-size: 18px; font-weight: 600; }
.flatpickr-calendar.inline .flatpickr-weekday { color: #666; font-weight: 600; font-size: 12px; }
.flatpickr-calendar.inline .flatpickr-days { padding: 0 0 20px; background: #f8f9fa; }
.flatpickr-calendar.inline .flatpickr-day {
    color: #333; border: 1px solid #e0e0e0; background: #fff; margin: 2px; border-radius: 4px;
    font-weight: 500; transition: all 0.2s ease;
}
.flatpickr-calendar.inline .flatpickr-day:hover { background: #f0f0f0; border-color: #ccc; }
.flatpickr-calendar.inline .flatpickr-day.selected { background: #333; color: #fff; border-color: #333; font-weight: 600; }
.flatpickr-calendar.inline .flatpickr-day.today { border-color: #999; background: #f0f0f0; }
.flatpickr-calendar.inline .flatpickr-day.disabled {
    color: #ccc; background: #f8f8f8; cursor: not-allowed; position: relative;
}
.flatpickr-calendar.inline .flatpickr-day.disabled:before {
    content: '×'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 16px; font-weight: bold; color: #999;
}

/* Date field styling */
#booking-datepicker-field {
    cursor: pointer;
}

/* Form Structure - Consistent 25px spacing between rows */
.booking-form { 
    flex: 1; min-width: 400px; 
}

/* Every form row has consistent 25px bottom margin */
.form-row { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 30px; 
}
.form-row.textarea{
    margin-top: 30px;
}
/* Form columns within rows - no bottom margin to avoid double spacing */
.form-col { 
    flex: 1; 
    margin-bottom: 0;
}

/* Privacy Checkbox Styling */
.privacy-checkbox {
    margin-bottom: 0;
}

.checkbox-label {
    display: inline-flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    min-width: 18px;
    border: 1px solid #d5d6de;
    border-radius: 3px;
    position: relative;
    background-color: #fff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #333;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #333;
    border-color: #333;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.privacy-text {
    color: #666;
    flex: 1;
}
            

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

.booking-form input, 
.booking-form select, 
.booking-form textarea {
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px;
    background: #fff; 
    box-sizing: border-box; 
    font-size: 14px; 
    transition: border-color 0.2s ease;
    margin: 0; /* Reset any browser default margins */
}

.booking-form input:focus, 
.booking-form select:focus, 
.booking-form textarea:focus {
    outline: none; 
    border-color: #333;
}

/* Privacy checkbox Label override for default style */
.checkbox-label {
    font-weight: 400 !important;
    margin: 0 !important;
}

/* UNDERLINED STYLE OVERRIDES */
#booking-form-container.underlined-style .booking-form label { 
    display: block; 
    margin: 0 0 5px; 
    font-weight: 400; 
    color: #999; 
    font-size: 14px; 
    transition: all 0.3s ease;
}

#booking-form-container.underlined-style .booking-form select, 
#booking-form-container.underlined-style .booking-form input, 
#booking-form-container.underlined-style .booking-form textarea {
    color: #333;
}

#booking-form-container.underlined-style .booking-form input, 
#booking-form-container.underlined-style .booking-form textarea {
    width: 100%; 
    padding: 8px 0; 
    border: none; 
    border-bottom: 1px solid #000; 
    border-radius: 0;
    background: transparent; 
    box-sizing: border-box; 
    font-size: 16px; 
    transition: all 0.3s ease; 
    outline: none;
}

#booking-form-container.underlined-style .booking-form select {
    width: 100%; 
    padding: 8px 0; 
    border: none; 
    border-bottom: 1px solid #000; 
    border-radius: 0;
    background: transparent; 
    box-sizing: border-box; 
    font-size: 16px; 
    outline: none;
}

#booking-form-container.underlined-style .booking-form input:focus, 
#booking-form-container.underlined-style .booking-form textarea:focus, 
#booking-form-container.underlined-style .booking-form select:focus {
    border-bottom-color: #333; 
    border-bottom-width: 2px;
}

/* Floating labels for input and textarea in underlined style */
#booking-form-container.underlined-style .form-col:has(input[type="text"]:not([readonly])), 
#booking-form-container.underlined-style .form-col:has(input[type="email"]), 
#booking-form-container.underlined-style .form-col:has(input[type="tel"]), 
#booking-form-container.underlined-style .form-col:has(textarea:not([readonly])) {
    position: relative; 
}

#booking-form-container.underlined-style .form-col:has(input[type="text"]:not([readonly])) label, 
#booking-form-container.underlined-style .form-col:has(input[type="email"]) label, 
#booking-form-container.underlined-style .form-col:has(input[type="tel"]) label, 
#booking-form-container.underlined-style .form-col:has(textarea:not([readonly])) label {
    position: absolute; 
    top: 8px; 
    left: 0; 
    pointer-events: none; 
    transition: all 0.3s ease;
    z-index: 1;
}

/* Label Animation - works with focus AND when field is not empty */
#booking-form-container.underlined-style .form-col input[type="text"]:focus ~ label,
#booking-form-container.underlined-style .form-col input[type="text"]:not(:placeholder-shown) ~ label,
#booking-form-container.underlined-style .form-col input[type="email"]:focus ~ label,
#booking-form-container.underlined-style .form-col input[type="email"]:not(:placeholder-shown) ~ label,
#booking-form-container.underlined-style .form-col input[type="tel"]:focus ~ label,
#booking-form-container.underlined-style .form-col input[type="tel"]:not(:placeholder-shown) ~ label,
#booking-form-container.underlined-style .form-col textarea:focus ~ label,
#booking-form-container.underlined-style .form-col textarea:not(:placeholder-shown) ~ label {
    top: -15px; 
    font-size: 12px; 
    color: #333; 
    font-weight: 600;
}

/* Select fields and readonly inputs get normal labels in underlined style */
#booking-form-container.underlined-style .form-col:has(select) label, 
#booking-form-container.underlined-style .form-col:has(input[readonly]) label { 
    position: static; 
    font-weight: 600; 
    color: #333; 
}

/* Privacy checkbox has normal label in underlined style */
#booking-form-container.underlined-style .privacy-checkbox .checkbox-label {
    position: static !important;
}

/* Submit button */
.book-now-btn {
    background: #000 !important; 
    color: white !important; 
    padding: 15px 40px; 
    border: none; 
    border-radius: 10px; 
    font-weight: 600; 
    cursor: pointer; 
    margin: 20px 15px 10px 0; 
    font-size: 14px;
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    width: 100%;
    transition: background 0.2s ease;
}

/* Prevent theme interference */
.booking-form select { 
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    display: block !important; 
    visibility: visible !important; 
    opacity: 1 !important; 
}

.booking-form .ui-selectmenu-button { 
    display: none !important; 
}

/* Messages */
#booking-message { 
    margin: 15px 0; 
    padding: 15px; 
    border-radius: 4px; 
    font-weight: 500; 
}

.success { 
    background: #f0f8f0; 
    color: #2d4a2d; 
    border: 1px solid #d0d0d0; 
}

.error { 
    background: #f8f0f0; 
    color: #4a2d2d; 
    border: 1px solid #d0d0d0; 
}

/* Responsive */
@media (max-width: 768px) {
    #booking-form-container { 
        flex-direction: column; 
        gap: 20px; 
    }
    
    .booking-calendar, 
    .booking-form { 
        min-width: auto; 
    }
    
    .form-row { 
        flex-direction: column; 
        gap: 10px; 
    }
	
	.form-col{
		width: 100%;
	}
}




/* VALIDATION ######################## */
/* =================================================================
   ZUSÄTZLICHE CSS-REGELN FÜR FELDVALIDIERUNG
   Fügen Sie diese Regeln zu Ihrer booking-styles.css Datei hinzu
   ================================================================= */

/* Error Display and Validation States */
.form-col {
    position: relative;
    margin-bottom: 15px;
}

/* Field Error Messages */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    animation: fadeIn 0.3s ease-in;
    font-weight: 400;
    line-height: 1.3;
}

.field-error.hidden {
    display: none;
}

/* Fade-in animation for error messages */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-5px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Error State Styling */
.form-col.has-error input,
.form-col.has-error select,
.form-col.has-error textarea {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.form-col.has-error label {
    color: #dc3545 !important;
}

/* Success State Styling */
.form-col.is-valid input,
.form-col.is-valid select,
.form-col.is-valid textarea {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
}

.form-col.is-valid label {
    color: #28a745 !important;
}

/* Error state for underlined style */
#booking-form-container.underlined-style .form-col.has-error input,
#booking-form-container.underlined-style .form-col.has-error textarea {
    border-bottom-color: #dc3545 !important;
    border-bottom-width: 2px !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
    box-shadow: none !important;
}

#booking-form-container.underlined-style .form-col.has-error select {
    border-bottom-color: #dc3545 !important;
    border-bottom-width: 2px !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}

/* Success state for underlined style */
#booking-form-container.underlined-style .form-col.is-valid input,
#booking-form-container.underlined-style .form-col.is-valid textarea {
    border-bottom-color: #28a745 !important;
    border-bottom-width: 2px !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
    box-shadow: none !important;
}

#booking-form-container.underlined-style .form-col.is-valid select {
    border-bottom-color: #28a745 !important;
    border-bottom-width: 2px !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
}

/* Floating label adjustments for error/success states in underlined style */
#booking-form-container.underlined-style .form-col.has-error input:focus ~ label,
#booking-form-container.underlined-style .form-col.has-error input:not(:placeholder-shown) ~ label,
#booking-form-container.underlined-style .form-col.has-error textarea:focus ~ label,
#booking-form-container.underlined-style .form-col.has-error textarea:not(:placeholder-shown) ~ label {
    color: #dc3545 !important;
}

#booking-form-container.underlined-style .form-col.is-valid input:focus ~ label,
#booking-form-container.underlined-style .form-col.is-valid input:not(:placeholder-shown) ~ label,
#booking-form-container.underlined-style .form-col.is-valid textarea:focus ~ label,
#booking-form-container.underlined-style .form-col.is-valid textarea:not(:placeholder-shown) ~ label {
    color: #28a745 !important;
}

/* Privacy Checkbox Error State */
.form-col.has-error .checkbox-label {
    color: #dc3545 !important;
}

.form-col.has-error .checkmark {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.form-col.has-error .privacy-text {
    color: #dc3545 !important;
}

/* Privacy Checkbox Success State */
.form-col.is-valid .checkbox-label {
    color: #28a745 !important;
}

.form-col.is-valid .checkmark {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
}

.form-col.is-valid .privacy-text {
    color: #28a745 !important;
}

/* Focus states with validation */
.form-col.has-error input:focus,
.form-col.has-error select:focus,
.form-col.has-error textarea:focus {
    outline: none !important;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.4) !important;
}

.form-col.is-valid input:focus,
.form-col.is-valid select:focus,
.form-col.is-valid textarea:focus {
    outline: none !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.4) !important;
}

/* Error message spacing adjustments */
.form-col .field-error {
    margin-top: 6px;
    padding-left: 2px;
    font-size: 11px;
    line-height: 1.2;
}

/* Error message for underlined style */
#booking-form-container.underlined-style .form-col .field-error {
    margin-top: 8px;
    padding-left: 0;
}

/* Ensure error messages don't break layout */
.form-row {
    align-items: flex-start;
}

/* Smooth transitions for validation states */
.booking-form input,
.booking-form select,
.booking-form textarea,
.checkmark {
    transition: all 0.3s ease;
}

/* Error message for specific field types */
.form-col:has(select) .field-error {
    margin-top: 5px;
}

.privacy-checkbox .field-error {
    margin-top: 8px;
    margin-left: 30px; /* Indent to align with checkbox text */
}

/* Responsive adjustments for error messages */
@media (max-width: 768px) {
    .field-error {
        font-size: 11px;
        margin-top: 4px;
    }
    
    .privacy-checkbox .field-error {
        margin-left: 0;
        margin-top: 6px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-col.has-error input,
    .form-col.has-error select,
    .form-col.has-error textarea {
        border-width: 2px !important;
    }
    
    .form-col.is-valid input,
    .form-col.is-valid select,
    .form-col.is-valid textarea {
        border-width: 2px !important;
    }
    
    .field-error {
        font-weight: 600;
    }
}

/* Dark mode support (if your theme supports it) */
@media (prefers-color-scheme: dark) {
    .form-col.has-error input,
    .form-col.has-error select,
    .form-col.has-error textarea {
        background-color: rgba(220, 53, 69, 0.1) !important;
    }
    
    .form-col.is-valid input,
    .form-col.is-valid select,
    .form-col.is-valid textarea {
        background-color: rgba(40, 167, 69, 0.1) !important;
    }
    
    .field-error {
        color: #ff6b6b;
    }
}

/* Accessibility improvements */
.field-error {
    /* Screen reader support */
    speak: literal-punctuation;
}

/* Focus ring for accessibility */
.form-col input:focus-visible,
.form-col select:focus-visible,
.form-col textarea:focus-visible,
.checkbox-label input:focus-visible + .checkmark {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Error state focus ring */
.form-col.has-error input:focus-visible,
.form-col.has-error select:focus-visible,
.form-col.has-error textarea:focus-visible {
    outline-color: #dc3545;
}

/* Success state focus ring */
.form-col.is-valid input:focus-visible,
.form-col.is-valid select:focus-visible,
.form-col.is-valid textarea:focus-visible {
    outline-color: #28a745;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .field-error {
        animation: none;
    }
    
    .booking-form input,
    .booking-form select,
    .booking-form textarea,
    .checkmark {
        transition: none;
    }
}