/* Frontend Styles for Demo Appointment Booking Plugin */

.dab-booking-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dab-booking-form * {
    box-sizing: border-box;
}

.dab-booking-form h3 {
    margin: 0 0 25px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

/* Steps */
.dab-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.dab-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 10px 0;
}

.dab-step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.dab-step:last-child::before {
    display: none;
}

.dab-step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: bold;
    position: relative;
    z-index: 2;
    margin-bottom: 5px;
}

.dab-step.active .dab-step-number {
    background: #007cba;
    color: white;
}

.dab-step.completed .dab-step-number {
    background: #46b450;
    color: white;
}

.dab-step.active::before,
.dab-step.completed::before {
    background: #007cba;
}

.dab-step-title {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.dab-step.active .dab-step-title {
    color: #007cba;
    font-weight: 600;
}

/* Form Sections */
.dab-form-section {
    display: none;
}

.dab-form-section.active {
    display: block;
}

/* Service Selection */
.dab-service-details {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.dab-service-details h4 {
    margin: 0 0 15px;
    color: #333;
    font-size: 16px;
}

.dab-service-info p {
    margin: 8px 0;
    color: #555;
    line-height: 1.5;
}

.dab-service-info strong {
    color: #333;
}

#service_select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

#service_select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

/* Date Selection */
.dab-date-picker {
    margin-bottom: 20px;
}

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

.dab-date-picker input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

/* Time Selection */
.dab-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.dab-time-slot {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    font-size: 14px;
    font-weight: 500;
}

.dab-time-slot:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.dab-time-slot.selected {
    border-color: #007cba;
    background: #007cba;
    color: white;
}

.dab-time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.dab-no-times {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* Client Information Form */
.dab-form-group {
    margin-bottom: 20px;
}

.dab-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.dab-form-group input,
.dab-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.dab-form-group input:focus,
.dab-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.dab-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.dab-form-group .required {
    color: #d63638;
}

/* Form Navigation */
.dab-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.dab-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1;
}

.dab-btn-primary {
    background: #007cba;
    color: white;
}

.dab-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.dab-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e0e0e0;
}

.dab-btn-secondary:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.dab-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.dab-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.dab-loading.active {
    display: block;
}

.dab-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: dab-spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Success/Error Messages */
.dab-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

.dab-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dark Theme */
.dab-booking-form.dark-theme {
    background: #2c3e50;
    color: #ecf0f1;
}

.dab-booking-form.dark-theme h3 {
    color: #ecf0f1;
}

.dab-booking-form.dark-theme .dab-service-option {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

.dab-booking-form.dark-theme .dab-service-option:hover,
.dab-booking-form.dark-theme .dab-service-option.selected {
    background: #3f5a78;
    border-color: #007cba;
}

.dab-booking-form.dark-theme input,
.dab-booking-form.dark-theme textarea {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

.dab-booking-form.dark-theme input:focus,
.dab-booking-form.dark-theme textarea:focus {
    border-color: #007cba;
}

.dab-booking-form.dark-theme .dab-time-slot {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

.dab-booking-form.dark-theme .dab-time-slot:hover {
    background: #3f5a78;
}

/* Responsive */
@media (max-width: 768px) {
    .dab-booking-form {
        margin: 20px;
        padding: 20px;
    }
    
    .dab-steps {
        padding: 0 10px;
    }
    
    .dab-services-grid {
        grid-template-columns: 1fr;
    }
    
    .dab-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .dab-form-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .dab-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dab-booking-form {
        margin: 10px;
        padding: 15px;
    }
    
    .dab-booking-form h3 {
        font-size: 20px;
    }
    
    .dab-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .dab-step::before {
        display: none;
    }
    
    .dab-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}