/* WooCommerce Appointments Frontend Styles */

.appointment-booking-form {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.appointment-calendar-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
}

/* Date Picker Styles */
.appointment-date-picker {
    margin-bottom: 20px;
}

.appointment-date-picker label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.appointment-date-picker input[type="date"] {
    width: 100%;
    max-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.appointment-date-picker input[type="date"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Time Picker Styles */
.appointment-time-picker {
    margin-bottom: 20px;
}

.appointment-time-picker label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

.time-slots-container {
    min-height: 60px;
}

.loading-slots, .no-slots, .appointment-error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.appointment-error {
    color: #d63638;
    background: #fef7f7;
    border-color: #d63638;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-slot-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.time-slot-button:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot-button.selected {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.time-slot-button.selected:hover {
    background-color: #005a87;
    border-color: #005a87;
}

.slot-time {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.slot-duration {
    font-size: 11px;
    opacity: 0.8;
}

.time-slot-button.selected .slot-duration {
    opacity: 0.9;
}

/* Appointment Summary Styles */
.appointment-summary {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.appointment-summary h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

.summary-item {
    margin-bottom: 8px;
    padding: 4px 0;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item strong {
    color: #333;
}

/* Add to Cart Button Override for Appointments */
.single_add_to_cart_button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.single_add_to_cart_button.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Duration display in price */
.appointment-duration {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .appointment-booking-form {
        padding: 15px;
        margin: 15px 0;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    .time-slot-button {
        padding: 10px 6px;
    }
    
    .appointment-date-picker input[type="date"] {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .time-slots-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .appointment-booking-form {
        padding: 12px;
    }
    
    .appointment-calendar-container h3 {
        font-size: 1.1em;
    }
}

/* Accessibility Improvements */
.time-slot-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.appointment-date-picker input[type="date"]:focus,
.appointment-time-picker select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

/* Animation for smooth transitions */
.appointment-time-picker {
    animation: slideDown 0.3s ease-out;
}

.appointment-summary {
    animation: fadeIn 0.3s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* WooCommerce notice styles override for appointments */
.appointment-booking-form + .woocommerce-error,
.appointment-booking-form + .woocommerce-message,
.appointment-booking-form + .woocommerce-info {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Cart page appointment info styling */
.wc-item-meta {
    font-size: 0.9em;
}

.wc-item-meta dt {
    font-weight: 600;
    color: #333;
}

.wc-item-meta dd {
    margin-left: 0;
    color: #666;
}