* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide elements until Alpine.js initializes */
[x-cloak] {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

.wizard-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
}

.wizard-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: white;
    color: #667eea;
    transform: scale(1.1);
}

.progress-line {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.progress-line.active {
    background: white;
}

.wizard-step {
    padding: 40px 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: all 0.3s ease-in-out;
}

.wizard-step[x-show="true"] {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.wizard-step h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:required {
    border-left: 4px solid #667eea;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f1f3f4;
    color: #555;
}

.btn-secondary:hover {
    background: #e8eaed;
}

.wizard-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 30px;
}

.wizard-actions .btn {
    flex: 1;
}

.wizard-actions .btn:nth-child(2) {
    flex: 0.8;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.time-slot {
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.time-slot:hover {
    border-color: #667eea;
    background: white;
    transform: translateY(-2px);
}

.time-slot.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.time-text {
    font-weight: 600;
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading p {
    font-size: 16px;
    margin: 0;
}

.confirmation-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-item .label {
    font-weight: 600;
    color: #555;
}

.detail-item .value {
    color: #333;
}

.success {
    text-align: center;
    justify-content: center;
}

.success-content {
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 30px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success h2 {
    color: #10b981;
    margin-bottom: 15px;
}

.success p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}



/* Error container styles */
.error-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.error-content {
    max-width: 400px;
}

.error-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.error-container h2 {
    color: #dc2626;
    margin-bottom: 15px;
    font-size: 24px;
}

.error-container p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.error-details {
    font-family: monospace;
    background: #f3f4f6;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
}

/* Анимации переходов */
.transition-enter {
    transition: all 0.3s ease-out;
}

.transition-enter-start {
    opacity: 0;
    transform: translateX(30px);
}

.transition-enter-end {
    opacity: 1;
    transform: translateX(0);
}

.transition-leave {
    transition: all 0.3s ease-in;
}

.transition-leave-start {
    opacity: 1;
    transform: translateX(0);
}

.transition-leave-end {
    opacity: 0;
    transform: translateX(-30px);
}

/* Smooth step transitions - removed complex logic */

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .wizard-container {
        border-radius: 15px;
    }
    
    .wizard-header {
        padding: 30px 20px 25px;
    }
    
    .wizard-header h1 {
        font-size: 24px;
    }
    
    .wizard-step {
        padding: 30px 20px;
        min-height: 350px;
    }
    
    .wizard-step h2 {
        font-size: 20px;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .time-slot {
        padding: 15px;
    }
    
    .wizard-actions {
        flex-direction: column;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .progress-bar {
        gap: 10px;
    }
    
    .progress-step {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .progress-line {
        width: 40px;
    }
    
    .time-slots {
        grid-template-columns: 1fr;
    }
}
