/* Multi-step Booking Wizard Styles */
.booking-wizard {
    max-width: 1200px;
    margin: 0 auto;
}

/* Progress Bar */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.wizard-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-step.active .step-icon {
    background: #d68880;
    color: #fff;
    transform: scale(1.1);
}

.wizard-step.completed .step-icon {
    background: #d68880;
    color: #fff;
    opacity: 0.8;
    position: relative;
    overflow: hidden;
}

.wizard-step.completed .step-icon::after {
    content: '✓';
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

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

.wizard-step.active .step-title {
    color: #d68880;
    font-weight: 600;
}

.wizard-step.completed .step-title {
    color: #d68880;
    opacity: 0.8;
}

/* Wizard Content */
.wizard-content {
    min-height: 400px;
}

.wizard-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.wizard-panel.active {
    display: block;
}

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

/* Service Categories */
.service-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.category-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #d68880;
}

.category-card.selected {
    border-color: #d68880;
    background: #fdf5f4;
}

.category-icon {
    font-size: 48px;
    color: #d68880;
    margin-bottom: 15px;
    pointer-events: none;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    pointer-events: none;
}

.category-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    pointer-events: none;
}

.category-count {
    background: #d68880;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Service Selection */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.service-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #d68880;
}

.service-item.selected {
    border-color: #d68880;
    background: #fdf5f4;
}

.service-item.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d68880;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.service-item input[type="checkbox"] {
    display: none;
}

.service-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: block;
    padding-right: 30px;
}

/* Service expanded details */
.service-item {
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-item.expanded {
    grid-column: span 2;
    background: #fdf5f4;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(214, 136, 128, 0.15);
}

.service-details {
    display: none;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 13px;
    color: #666;
}

.service-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.service-section.active {
    display: block;
}

/* Main container for all service sections */
.service-details {
    display: block !important;
    opacity: 1 !important;
    max-height: none !important;
    margin-top: 20px;
}

.service-details.active {
    display: block;
    max-height: none;
    margin-top: 15px;
    padding-top: 15px;
    opacity: 1;
}

.service-item.expanded .service-details {
    max-height: 200px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    opacity: 1;
}

.service-price {
    font-weight: 600;
    color: #d68880;
    margin-bottom: 8px;
}

.service-duration {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
}

.service-description {
    line-height: 1.6;
    margin-bottom: 10px;
}

.expand-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: #d68880;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.service-item.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Form labels */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Selected Services Summary */
.selected-services {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.selected-services h6 {
    color: #333;
    margin-bottom: 15px;
}

.selected-service-tag {
    display: inline-block;
    background: #d68880;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    margin: 5px;
    position: relative;
    padding-right: 30px;
}

.selected-service-tag .remove {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-weight: bold;
}

/* Form Grid for Step 2 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-grid > div {
    display: flex;
    flex-direction: column;
}

.form-control {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #d68880;
    box-shadow: 0 0 0 2px rgba(214, 136, 128, 0.1);
}

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

select.form-control {
    cursor: pointer;
}

/* Navigation Buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.wizard-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev {
    background: #6c757d;
    color: #fff;
}

.btn-prev:hover {
    background: #5a6268;
}

.btn-next, .btn-submit {
    background: #d68880;
    color: #fff;
}

.btn-next:hover, .btn-submit:hover {
    background: #c97972;
    transform: translateY(-2px);
}

.btn-next:disabled, .btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Form Step */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .service-categories {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .wizard-progress {
        margin-bottom: 30px;
    }
    
    .step-title {
        font-size: 12px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d68880;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* iOS Safari scroll improvements */
body {
    -webkit-overflow-scrolling: touch;
}

.booking-wizard {
    /* Ensure proper scroll behavior on iOS */
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
}

.service-section {
    /* Ensure smooth transitions don't interfere with scrolling */
    will-change: auto;
    transform: translateZ(0);
}

/* Improve category card interactions on iOS */
.category-card {
    /* Prevent iOS hover states from sticking */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.category-card:active {
    transform: translateY(-2px);
}

/* iOS specific optimizations */
@supports (-webkit-touch-callout: none) {
    .wizard-content {
        /* Prevent iOS zoom on input focus */
        -webkit-text-size-adjust: 100%;
    }
    
    .service-section {
        /* Force hardware acceleration for better scroll performance */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}
