/* Base Styles */
.rcb-booking-form {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    padding: 20px;
}

.rcb-booking-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.rcb-event-details {
    flex: 1;
    min-width: 300px;
}

.rcb-booking-fields {
    flex: 1;
    min-width: 300px;
}

.rcb-event-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.rcb-event-description {
    line-height: 1.6;
}

.rcb-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.rcb-form-section h3 {
    margin-top: 0;
    color: #000 !important;
    font-weight: bold !important;
}

/* Car Selection */
.rcb-car-selection {
    margin-bottom: 20px;
}

#rcb-cars-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.rcb-car-option {
    flex: 1 0 21%; /* 4 items per row with gap */
    min-width: 200px;
    padding: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    text-align: center;
}

.rcb-car-option label {
    display: block;
    padding: 15px;
    cursor: pointer;
    color: #000;
    font-size: 16px;
}

.rcb-car-option input[type="radio"] {
    display: none;
}

.rcb-car-option input[type="radio"]:checked + label {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.rcb-car-option:hover {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.2);
}

.rcb-car-option input[type="radio"] {
    margin-right: 15px;
}

.rcb-car-option label {
    font-weight: bold;
    color: #000;
}

/* Lap Packages */
.rcb-lap-option {
    margin: 10px 0;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rcb-lap-option input[type="radio"] {
    margin-right: 10px;
}

.rcb-lap-option label {
    font-weight: bold;
    color: #000;
}

/* Time Slots */
.rcb-time-slots-container {
    margin-top: 20px;
}

.rcb-time-slot {
    display: inline-block;
    margin: 0 10px 10px 0;
}

.rcb-time-slot input[type="radio"] {
    display: none;
}

.rcb-time-slot label {
    display: block;
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #000 !important;
}

.rcb-time-slot label:hover {
    border-color: #0073aa;
}

.rcb-time-slot input[type="radio"]:checked + label {
    background: #ff0000 !important;
    color: #ffffff !important;
    border-color: #ff0000 !important;
    font-weight: bold !important;
}

.rcb-time {
    font-weight: bold;
    margin-right: 10px;
}

.rcb-available {
    color: #000 !important;
    font-size: 0.9em;
}

.rcb-time-slot input[type="radio"]:checked + label .rcb-time,
.rcb-time-slot input[type="radio"]:checked + label .rcb-available {
    color: #ffffff !important;
}

/* Buttons */
.rcb-booking-form button,
.rcb-booking-form input[type="submit"] {
    background: #ff0000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.rcb-booking-form button:hover,
.rcb-booking-form input[type="submit"]:hover {
    background: #cc0000;
}

/* Responsive */
@media (max-width: 600px) {
    .rcb-time-slot {
        display: block;
        margin: 0 0 10px 0;
    }
    
    .rcb-car-option,
    .rcb-lap-option {
        padding: 10px;
    }
}

/* Loading Animation Styles */
.rcb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rcb-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rcb-loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.rcb-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: rcb-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes rcb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rcb-loading-text {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rcb-loading-subtext {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Pulse animation for loading dots */
.rcb-loading-dots {
    display: inline-block;
}

.rcb-loading-dots::after {
    content: '';
    animation: rcb-dots 1.5s infinite;
}

@keyframes rcb-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Button loading state */
.rcb-booking-form button.loading,
.rcb-booking-form input[type="submit"].loading {
    background: #999;
    cursor: not-allowed;
    position: relative;
    color: transparent;
}

.rcb-booking-form button.loading::after,
.rcb-booking-form input[type="submit"].loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: rcb-spin 1s linear infinite;
}