/* Responsive alternatives table for availability feedback */
.availability-table-container {
    overflow-x: auto;
    width: 100%;
}
.availability-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.availability-table th, .availability-table td {
    padding: 8px 6px;
    text-align: left;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .availability-table th, .availability-table td {
        font-size: 13px;
        padding: 6px 4px;
    }
    .availability-table th:nth-child(2),
    .availability-table td:nth-child(2) {
        display: none;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    /* Remove flexbox and centering */
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
}

.form-container {
    max-width: 600px;
    width: 100%;
    padding: 30px;
    border-radius: 8px;
    margin: 0 auto;
    background: none;
    box-sizing: border-box;
    /* Remove overflow and max-height */
    overflow: unset;
    max-height: unset;
    padding-bottom: 40px;
}

.form-header {
    margin-bottom: 30px;
}

.form-header p {
    font-size: 14px;
    color: #555;
    text-align: left;
    line-height: 1.5;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.full-width {
    width: 100%;
}

.half-width {
    flex: 1;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    background-color: #f5f7fa;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007cba;
    /* background-color: #fff; */
}

/* Number inputs use browser default spinners */

select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.question-group {
    margin-bottom: 20px;
}

.question-label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.field-help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.full-width-select,
.full-width-textarea {
    width: 100%;
}

.checkbox-section {
    margin-top: 30px;
}

.human-verification {
    margin-bottom: 25px;
    padding: 0;
    background: none;
    border: none;
}

.captcha-checkbox-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.captcha-checkbox-container:hover {
    border-color: #e91e63;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
}

.captcha-checkbox {
    display: none;
}

.captcha-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
    flex-shrink: 0;
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.captcha-checkbox:checked + .captcha-checkbox-label .checkmark {
    background: #e91e63;
    border-color: #e91e63;
}

.captcha-checkbox:checked + .captcha-checkbox-label .checkmark::after {
    opacity: 1;
}

.captcha-text {
    flex-grow: 1;
}

.captcha-shield {
    color: #6c757d;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.captcha-checkbox:checked + .captcha-checkbox-label .captcha-shield {
    color: #e91e63;
}

.math-challenge {
    margin-top: 20px;
    background: #f5f7fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    animation: slideDown 0.4s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.challenge-header {
    text-align: center;
    margin-bottom: 20px;
}

.challenge-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.challenge-subtitle {
    display: block;
    font-size: 14px;
    color: #6c757d;
}

.captcha-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.captcha-question-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.captcha-question {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    min-width: 120px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

#captcha-answer {
    max-width: 80px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 8px 12px;
    background: white;
}

#captcha-answer:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.refresh-captcha {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
}

.refresh-captcha:hover {
    background: linear-gradient(135deg, #c2185b 0%, #e91e63 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.refresh-captcha svg {
    transition: transform 0.3s ease;
}

.refresh-captcha:hover svg {
    transform: rotate(180deg);
}

.verification-status {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.verification-status.pending {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.verification-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.verification-status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-question-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    #captcha-answer {
        max-width: 100%;
    }
    
    .math-challenge {
        padding: 20px;
    }
    
    .form-container {
        padding: 20px;
        padding-bottom: 0;
        /* Remove max-height and overflow-y for natural page scrolling */
        max-height: unset;
        overflow-y: unset;
    }
    .submit-section {
        margin-top: 30px;
        margin-bottom: 20px;
    }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.privacy-section {
    margin-top: 20px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.privacy-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.privacy-link {
    font-size: 12px;
    color: #666;
}

.privacy-link a {
    color: #e91e63;
    text-decoration: underline;
}

.privacy-link a:hover {
    color: #c2185b;
}

.submit-section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    position: static;
    background: none;
    box-shadow: none;
    z-index: auto;
    padding: 0;
}

.submit-btn {
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 12px 10px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 150px;
}

.submit-btn:hover {
    background-color: #c2185b;
}

.submit-btn:active {
    background-color: #ad1457;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        margin: 10px;
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .half-width {
        width: 100%;
    }
}

/* Error styling for validation */
.error {
    border-color: #e74c3c !important;
    /*background-color: #fdf2f2 !important; */
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Success styling */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Loading state */
.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.loading-overlay.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* === RESERVATION SYSTEM STYLES === */
.date-input-container {
    position: relative;
}

.reserved-dates-info {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #fff3f3;
    border-radius: 6px;
    border-left: 4px solid #e20074;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reserved-dates-info strong {
    color: #e20074;
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.reserved-date-range {
    display: block;
    margin: 4px 0;
    color: #d63384;
    font-weight: 500;
    font-size: 11px;
    padding: 2px 6px;
    background-color: rgba(226, 0, 116, 0.1);
    border-radius: 3px;
    border: 1px solid rgba(226, 0, 116, 0.2);
}

.date-conflict-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.date-conflict-warning .reserved-date-range {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #b45309;
}

/* Enhanced date input styling */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    background-color: #e20074;
    color: white;
    border-radius: 3px;
    padding: 2px;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
    background-color: #c0005f;
}

/* Loading state for date inputs */
.date-loading {
    position: relative;
}

.date-loading::after {
    content: "Lade Reservierungen...";
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    font-size: 11px;
    color: #666;
    pointer-events: none;
}

/* Custom Date Picker Integration */
.custom-date-picker {
    width: 100% !important;
    position: relative;
}

.custom-date-picker .date-display {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
    background: white !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.custom-date-picker .date-display:hover,
.custom-date-picker .date-display:focus {
    border-color: #007bff !important;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15) !important;
}

.custom-date-picker .calendar-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18) !important;
    z-index: 1500 !important;
    margin-top: 8px !important;
    padding: 24px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.custom-date-picker .date-text {
    color: #6c757d !important;
    font-weight: 500 !important;
}

.custom-date-picker .date-display.has-value .date-text {
    color: #212529 !important;
    font-weight: 600 !important;
}

.custom-date-picker .date-icon {
    font-size: 18px !important;
    color: #007bff !important;
}

/* Calendar Header with Professional Dropdowns */
.custom-date-picker .calendar-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    padding: 0 0 0 0 !important;
    transform: translateX(-8px) !important;
}

.custom-date-picker .nav-button {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #495057 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.custom-date-picker .nav-button:hover {
    background: #e91e63 !important;
    border-color: #e91e63 !important;
    color: white !important;
}

.custom-date-picker .month-year-selector {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
}

.custom-date-picker .month-year-select {
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    background: white !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 160px !important;
    text-align: center !important;
    appearance: menulist !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.custom-date-picker .month-year-select option {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Completely remove highlight for selected month in dropdown */
.month-year-select option:checked,
.month-year-select option:focus,
.month-year-select option:hover,
.month-year-select option:selected {
    background: transparent !important;
    color: inherit !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.month-year-select:focus {
    outline: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.month-year-select {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Calendar Body and Grid */
.custom-date-picker .calendar-body {
    margin-top: 16px !important;
}

.custom-date-picker .calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    padding: 0 !important;
}

.custom-date-picker .day-header {
    background: #f8f9fa !important;
    color: #6c757d !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 10px 4px !important;
    border-radius: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 4px !important;
    width: 36px !important;
    justify-self: center !important;
}

/* Availability Feedback System */
.availability-feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f8f9fa;
}

.availability-feedback.success {
    border-left-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.availability-feedback.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
    color: #856404;
}

.availability-feedback.error {
    border-left-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.availability-feedback h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
}

.availability-feedback p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Alternative dates table */
.availability-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.availability-table th,
.availability-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.availability-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.availability-table tr:nth-child(even) {
    background: #f8f9fa;
}

.availability-table .available-slot {
    color: #28a745;
    font-weight: 500;
}

.availability-table .date-range {
    white-space: nowrap;
}

/* Neutral Date Picker Styles */
.neutral-date-picker .day-cell {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    background: white !important;
    color: #495057 !important;
    border: 1px solid #f1f3f4 !important;
    cursor: pointer !important;
    justify-self: center !important;
}

.neutral-date-picker .day-cell.current-month {
    background: white !important;
    color: #495057 !important;
    border: 1px solid #e9ecef !important;
}

.neutral-date-picker .day-cell.selectable:hover {
    background: #fce4ec !important;
    border-color: #e91e63 !important;
    color: #e91e63 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(233,30,99,0.2) !important;
}

.neutral-date-picker .day-cell.selected {
    background: #e91e63 !important;
    color: white !important;
    border-color: #e91e63 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(233,30,99,0.4) !important;
    font-weight: 600 !important;
}

.neutral-date-picker .day-cell.today {
    background: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    color: #856404 !important;
    font-weight: 600 !important;
}

.neutral-date-picker .day-cell.today.selected {
    background: #e91e63 !important;
    border-color: #e91e63 !important;
    color: white !important;
}

.neutral-date-picker .day-cell.empty-cell {
    background: transparent !important;
    border: none !important;
    cursor: default !important;
    visibility: hidden !important;
}

.neutral-date-picker .day-cell.disabled,
.neutral-date-picker .day-cell.past-date {
    color: #ced4da !important;
    background: #f8f9fa !important;
    cursor: not-allowed !important;
    border-color: #e9ecef !important;
    opacity: 0.6 !important;
}

.neutral-date-picker .day-cell.disabled:hover,
.neutral-date-picker .day-cell.past-date:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #f8f9fa !important;
}

/* Remove old colored legends and availability indicators */
.neutral-date-picker .calendar-info,
.neutral-date-picker .legend {
    display: none !important;
}

/* Month/Year select styling - remove all highlighting */
.month-year-select option:checked,
.month-year-select option:focus,
.month-year-select option:hover,
.month-year-select option:selected {
    background: transparent !important;
    color: inherit !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.month-year-select option {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    box-shadow: none !important;
}