/* Consulenza Booking - Frontend Styles */

.cb-booking-fields {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 20px;
    margin: 30px 0;
}

.cb-booking-fields h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #2271B1;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.cb-booking-date-selector,
.cb-booking-time-selector {
    margin-bottom: 20px;
}

.cb-booking-date-selector label,
.cb-booking-time-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.cb-booking-date-input,
.cb-booking-time-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
}

.cb-booking-date-input:hover,
.cb-booking-time-select:hover {
    border-color: #2271B1;
}

.cb-booking-date-input:focus,
.cb-booking-time-select:focus {
    outline: none;
    border-color: #2271B1;
    box-shadow: 0 0 0 1px #2271B1;
}

/* Flatpickr calendar customization */
.flatpickr-calendar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e5e5;
}

.flatpickr-day.selected {
    background: #2271B1;
    border-color: #2271B1;
}

.flatpickr-day:hover {
    background: #f0f0f0;
}

.flatpickr-day.disabled {
    color: #ddd !important;
    cursor: not-allowed;
}

/* Time slots */
.cb-booking-time-select option:disabled {
    color: #999;
}

/* Booking details in order page */
.woocommerce-booking-details {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.woocommerce-booking-details h2 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #2271B1;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.booking_details {
    width: 100%;
}

.booking_details th {
    text-align: left;
    padding: 10px;
    font-weight: 600;
    width: 30%;
    background: #f5f5f5;
}

.booking_details td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.booking_details tr:last-child td {
    border-bottom: none;
}

.booking_details .button {
    display: inline-block;
    padding: 10px 20px;
    background: #2271B1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.booking_details .button:hover {
    background: #135e96;
}

/* Standalone booking form */
.cb-standalone-booking-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cb-standalone-booking-form h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #2271B1;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.cb-booking-calendar-wrapper {
    margin-bottom: 30px;
}

.cb-booking-selected-info {
    background: #e7f3e7;
    border: 1px solid #b7d8b7;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
}

.cb-booking-selected-info h4 {
    margin-top: 0;
    color: #2d5016;
}

.cb-booking-selected-info .cb-selected-datetime {
    font-size: 18px;
    font-weight: 600;
    color: #2d5016;
    margin: 15px 0;
}

.cb-add-to-cart-btn {
    background: #2271B1;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.cb-add-to-cart-btn:hover {
    background: #135e96;
}

/* Loading state */
.cb-booking-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.cb-booking-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271B1;
    border-radius: 50%;
    animation: cb-spin 1s linear infinite;
}

@keyframes cb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .cb-booking-fields,
    .cb-standalone-booking-form {
        padding: 15px;
    }
    
    .cb-booking-date-input,
    .cb-booking-time-select {
        font-size: 14px;
    }
}
