/* Calendar Booking System - Frontend Styles */

* {
    box-sizing: border-box;
}

.cbs-booking-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.cbs-booking-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cbs-booking-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 50px 40px;
    text-align: center;
}

.cbs-booking-title {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cbs-booking-subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

.cbs-booking-content {
    padding: 50px 40px;
}

/* Steps */
.cbs-step {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.cbs-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.cbs-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
}

.cbs-step-header h3 {
    margin: 0;
    font-size: 28px;
    color: #1e293b;
}

/* Service Grid */
.cbs-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cbs-service-card {
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cbs-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.cbs-service-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.cbs-service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbs-service-card.selected .cbs-service-icon {
    background: rgba(255, 255, 255, 0.2);
}

.cbs-service-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #667eea;
}

.cbs-service-card.selected .cbs-service-icon .dashicons {
    color: #fff;
}

.cbs-service-card h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.cbs-service-duration,
.cbs-service-price {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.8;
}

.cbs-service-card.selected .cbs-service-duration,
.cbs-service-card.selected .cbs-service-price {
    opacity: 1;
}

.cbs-service-price {
    font-size: 24px;
    font-weight: 700;
    margin-top: 15px;
}

/* Date & Time Selection */
.cbs-datetime-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.cbs-calendar-picker {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
}

.cbs-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cbs-calendar-nav h4 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}

.cbs-btn-nav {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.cbs-btn-nav:hover {
    border-color: #667eea;
    color: #667eea;
}

.cbs-calendar-grid-front {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cbs-cal-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 0;
    color: #64748b;
}

.cbs-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #fff;
}

.cbs-cal-day:hover:not(.disabled) {
    border-color: #667eea;
    transform: scale(1.05);
}

.cbs-cal-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.cbs-cal-day.available {
    background: #ecfdf5;
    color: #059669;
}

.cbs-cal-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

/* Time Picker */
.cbs-time-picker {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
}

.cbs-time-picker h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1e293b;
}

.cbs-time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.cbs-time-slot {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cbs-time-slot:hover:not(.disabled) {
    border-color: #667eea;
    transform: translateY(-2px);
}

.cbs-time-slot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

.cbs-time-slot.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

/* Staff Grid */
.cbs-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cbs-staff-card {
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cbs-staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.cbs-staff-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

.cbs-staff-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbs-staff-card.selected .cbs-staff-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.cbs-staff-avatar .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #667eea;
}

.cbs-staff-card.selected .cbs-staff-avatar .dashicons {
    color: #fff;
}

.cbs-staff-card h4 {
    margin: 0;
    font-size: 18px;
}

/* Booking Form */
.cbs-booking-form {
    max-width: 600px;
}

.cbs-form-group {
    margin-bottom: 25px;
}

.cbs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.cbs-form-group input,
.cbs-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cbs-form-group input:focus,
.cbs-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Booking Summary */
.cbs-booking-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border-left: 4px solid #667eea;
}

.cbs-booking-summary h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1e293b;
}

.cbs-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.cbs-summary-item:last-child {
    border-bottom: none;
}

.cbs-summary-total {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    margin-top: 10px;
}

/* Buttons */
.cbs-btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.cbs-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.cbs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cbs-btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.cbs-btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

.cbs-form-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.cbs-navigation {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    border-top: 2px solid #e2e8f0;
}

/* Success Message */
.cbs-success-message {
    text-align: center;
    padding: 60px 40px;
}

.cbs-success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.cbs-success-icon .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #fff;
}

.cbs-success-message h3 {
    margin: 0 0 15px 0;
    font-size: 32px;
    color: #1e293b;
}

.cbs-success-message p {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 30px;
}

/* Loading Spinner */
.cbs-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.cbs-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .cbs-booking-wrapper {
        padding: 0 15px;
    }
    
    .cbs-booking-header {
        padding: 40px 25px;
    }
    
    .cbs-booking-title {
        font-size: 28px;
    }
    
    .cbs-booking-content {
        padding: 30px 25px;
    }
    
    .cbs-services-grid {
        grid-template-columns: 1fr;
    }
    
    .cbs-datetime-container {
        grid-template-columns: 1fr;
    }
    
    .cbs-staff-grid {
        grid-template-columns: 1fr;
    }
    
    .cbs-time-slots {
        grid-template-columns: 1fr;
    }
    
    .cbs-form-actions {
        flex-direction: column;
    }
    
    .cbs-navigation {
        flex-direction: column;
        gap: 15px;
    }
}

/* Scrollbar Styling */
.cbs-time-slots::-webkit-scrollbar {
    width: 8px;
}

.cbs-time-slots::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.cbs-time-slots::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cbs-time-slots::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
