/* assets/css/frontend.css */

/* Main Container */
.ab-booking-form {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Progress Steps */
.ab-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.ab-progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.ab-step {
    position: relative;
    background: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    color: #666;
    font-weight: 500;
    z-index: 2;
    border: 2px solid #e0e0e0;
}

.ab-step.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.ab-step.completed {
    background: #81C784;
    color: white;
    border-color: #81C784;
}

/* Service Selection */
.ab-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ab-service-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ab-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ab-service-card.selected {
    border-color: #4CAF50;
    background: #F1F8E9;
}

.ab-service-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
}

.service-details {
    margin-bottom: 15px;
}

.service-details p {
    margin: 5px 0;
    color: #666;
}

.deposit-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    padding: 8px;
    background: #FFF8E1;
    border-radius: 4px;
}

/* Date and Time Selection */
.ab-datetime-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

#ab-calendar {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.ab-time-slots {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

#ab-available-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.time-slot:hover {
    background: #F5F5F5;
}

.time-slot.selected {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Customer Form */
#ab-customer-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1em;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* Payment Section */
.ab-payment-summary {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background: #F5F5F5;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ab-payment-options {
    max-width: 600px;
    margin: 0 auto;
}

.payment-method {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.payment-form {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.payment-options label {
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}

.payment-options label:hover {
    background: #F5F5F5;
}

/* Navigation Buttons */
.ab-step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
}

.ab-prev-step {
    background: #f5f5f5;
    color: #333;
}

.ab-next-step,
.ab-submit {
    background: #4CAF50;
    color: white;
}

.ab-next-step:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ab-datetime-picker {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .ab-progress-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ab-progress-steps::before {
        display: none;
    }

    .ab-step {
        width: 100%;
        text-align: center;
    }
}

/* Loading States */
.ab-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.ab-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 #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.ab-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
}

.ab-message.success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.ab-message.error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

/* Stripe Elements Custom Styling */
.StripeElement {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
}

.StripeElement--focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.StripeElement--invalid {
    border-color: #dc3545;
}