/**
 * Booking Form Components
 * Styles for booking modal forms and related components
 */

/* Clean form group styling - Compatible with glass modals */
.form-group.enhanced {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    margin: 5px 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.form-group.enhanced:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
}

/* Ensure booking type select is visible */
#id_booking_type,
select[name="booking_type"] {
    display: block !important;
    visibility: visible !important;
}

/* Custom Checkbox Styling */
.custom-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    cursor: pointer;
    min-width: 24px;
    height: 24px;
}

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

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.custom-checkbox .checkmark::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.custom-checkbox.checked .checkmark,
.custom-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
    opacity: 1;
}

.custom-checkbox:hover .checkmark {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.checkbox-label {
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    color: #495057;
    user-select: none;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: var(--primary-color, #007bff);
}

/* Booking type sections */
.booking-type-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    display: none; /* Hidden by default */
}

.booking-type-section.active {
    display: block;
}

.booking-type-section h6 {
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--primary-color, #007bff);
}

/* Form hints - Glass modal compatible */
.form-hint {
    font-size: 0.875rem;
    color: rgba(60, 60, 67, 0.6) !important;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.form-hint i {
    margin-right: 0.25rem;
    color: rgba(60, 60, 67, 0.6) !important;
}

/* Form animations */
.form-group.enhanced {
    animation: slideIn 0.3s ease-out;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .form-group.enhanced {
        padding: 12px;
        margin: 3px 0;
    }

    .custom-checkbox-wrapper {
        gap: 8px;
        padding: 8px 0;
    }

    .booking-type-section {
        padding-top: 15px;
        margin-top: 15px;
    }
}

/* Focus improvements for accessibility */
.form-control:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-checkbox input[type="checkbox"]:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}