/* FÈ SA Booking Flow Styles */
/* "Fè sa vit. Fè sa bien." - Modern booking experience */

/* Booking Flow Container */
.booking-flow-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
    padding: 2rem 0 4rem;
}

/* Progress Bar */
.booking-progress {
    margin-bottom: 3rem;
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 3;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    max-width: 100px;
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--success);
}

.progress-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--gray-300);
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 1px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Booking Steps */
.booking-steps {
    position: relative;
}

.booking-step {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.booking-step.active {
    display: block;
}

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

/* Step Header */
.step-header {
    text-align: center;
    margin-bottom: 3rem;
}

.step-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Step Content */
.step-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

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

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Budget Slider */
.budget-slider {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.budget-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-300);
    outline: none;
    -webkit-appearance: none;
}

.budget-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.budget-display {
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.125rem;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
}

.step-actions .btn {
    min-width: 140px;
}

/* Availability Preview */
.availability-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.availability-preview h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.availability-slot {
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.availability-slot:hover {
    border-color: var(--primary);
    background: rgba(255, 87, 34, 0.05);
}

.availability-slot.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.availability-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Provider Filters */
.provider-filters {
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Providers Grid */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.provider-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.provider-card.selected {
    border-color: var(--primary);
    background: rgba(255, 87, 34, 0.05);
}

.provider-card.selected::before {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.provider-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.provider-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.provider-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.provider-info {
    flex: 1;
}

.provider-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.provider-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #FFC107;
}

.rating-number {
    font-weight: 600;
    color: var(--text-primary);
}

.review-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.price-info {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.services-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.service-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.provider-actions {
    margin-top: 1rem;
}

/* Booking Summary */
.booking-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.summary-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.summary-details,
.selected-provider,
.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.summary-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 600;
    color: var(--text-primary);
}

.cost-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--gray-200);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* Account Section */
.account-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.account-section h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.account-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-300);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.success-animation {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.booking-reference {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 1.125rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-flow-container {
        padding: 1rem 0 2rem;
    }
    
    .step-header h1 {
        font-size: 2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .step-actions .btn {
        width: 100%;
    }
    
    .providers-grid {
        grid-template-columns: 1fr;
    }
    
    .booking-summary {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        gap: 0.5rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        max-width: 80px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .step-header h1 {
        font-size: 1.75rem;
    }
    
    .step-header p {
        font-size: 1rem;
    }
    
    .provider-card {
        padding: 1rem;
    }
    
    .provider-header {
        flex-direction: column;
        text-align: center;
    }
    
    .provider-avatar {
        margin: 0 auto;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .booking-step,
    .progress-fill,
    .provider-card,
    .modal-content {
        transition: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .success-animation {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .progress-bar {
        background: #000;
    }
    
    .progress-fill {
        background: #000;
    }
    
    .provider-card {
        border-width: 3px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 3px;
    }
} 