/* Frontend Styles for Booking Forms */

.bfb-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 0;
}

.bfb-booking-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.bfb-form-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
    text-align: center;
}

.bfb-form-messages {
    margin-bottom: 20px;
}

.bfb-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.bfb-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bfb-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bfb-form-group {
    margin-bottom: 20px;
}

.bfb-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.bfb-required {
    color: #e74c3c;
    margin-left: 3px;
}

.bfb-input,
.bfb-textarea,
.bfb-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.bfb-input:focus,
.bfb-textarea:focus,
.bfb-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.bfb-textarea {
    resize: vertical;
    min-height: 100px;
}

.bfb-radio-group,
.bfb-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bfb-radio-label,
.bfb-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.bfb-radio,
.bfb-checkbox {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bfb-form-footer {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.bfb-submit-btn {
    background: #4a90e2;
    color: #fff;
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.bfb-submit-btn:hover {
    background: #357abd;
}

.bfb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.bfb-loading {
    color: #666;
    font-size: 14px;
}

.bfb-loading::after {
    content: '...';
    animation: bfb-dots 1.5s steps(4, end) infinite;
}

@keyframes bfb-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Validation styles */
.bfb-input.error,
.bfb-textarea.error,
.bfb-select.error {
    border-color: #e74c3c;
}

.bfb-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.bfb-field-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* Booked times display */
.bfb-booked-times-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 13px;
}

.bfb-booked-times-info strong {
    color: #856404;
    display: block;
    margin-bottom: 5px;
}

.bfb-booked-time {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    padding: 2px 8px;
    border-radius: 3px;
    margin: 2px;
    font-weight: 600;
}

.bfb-time-error {
    background: #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    border-radius: 3px;
    margin-top: 5px;
    display: block;
    border-left: 3px solid #dc3545;
}

.bfb-checking-availability {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.bfb-input.error,
.bfb-time-input.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

/* Simple Calendar Booking Styles */
.bfb-calendar-simple-field {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.bfb-field-row {
    margin-bottom: 15px;
}

.bfb-field-row:last-child {
    margin-bottom: 0;
}

.bfb-sub-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.bfb-booking-date,
.bfb-booking-time {
    width: 100%;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .bfb-form-container {
        margin: 20px 15px;
    }
    
    .bfb-booking-form {
        padding: 20px;
    }
    
    .bfb-form-title {
        font-size: 20px;
    }
    
    .bfb-form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bfb-submit-btn {
        width: 100%;
    }
    
    /* Calendar responsive */
    .bfb-calendar-booking-field {
        padding: 15px;
    }
    
    .bfb-time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .bfb-time-slot {
        padding: 10px 6px;
        font-size: 14px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .bfb-booking-form {
        background: #2c2c2c;
        color: #e0e0e0;
    }
    
    .bfb-form-title,
    .bfb-label {
        color: #e0e0e0;
    }
    
    .bfb-input,
    .bfb-textarea,
    .bfb-select {
        background: #1e1e1e;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .bfb-input:focus,
    .bfb-textarea:focus,
    .bfb-select:focus {
        border-color: #4a90e2;
    }
}
