/* Smart Contact Forms Styles */

/* Form Progress Indicator */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.progress-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
    background: var(--highlight-color);
    color: white;
}

.progress-step.completed .progress-circle {
    background: var(--primary-color);
    color: white;
}

.progress-step.completed .progress-circle::after {
    content: '✓';
    font-size: 0.8rem;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e1e5e9;
    position: relative;
    margin: 0 0.5rem;
}

.progress-step.completed .progress-line {
    background: var(--primary-color);
}

.progress-step:last-child .progress-line {
    display: none;
}

.progress-label {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: center;
}

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

/* Form Steps */
.form-step {
    display: none;
    animation: slideInRight 0.4s ease forwards;
}

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

.form-step.previous {
    animation: slideOutLeft 0.4s ease forwards;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Enhanced Form Groups - Standard Layout */
.smart-form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.smart-form-group.focused .form-label {
    color: var(--highlight-color);
}

.smart-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.smart-input:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.smart-input.valid {
    border-color: #27ae60;
}

.smart-input.invalid {
    border-color: #e74c3c;
}

.smart-input::placeholder {
    color: #999;
    opacity: 1;
}

/* Auto-complete Suggestions */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--bg-section);
}

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

.suggestion-primary {
    font-weight: 600;
    color: var(--primary-color);
}

.suggestion-secondary {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Validation Messages */
.validation-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.error {
    color: #e74c3c;
}

.validation-message.success {
    color: #27ae60;
}

.validation-message.warning {
    color: #f39c12;
}

.validation-icon {
    font-size: 0.9rem;
}

/* Conditional Fields */
.conditional-field {
    display: none;
    animation: slideDown 0.4s ease forwards;
}

.conditional-field.show {
    display: block;
}

/* Lead Score Indicator - Hidden from user */
.lead-score-indicator {
    display: none;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.nav-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--highlight-color);
    background: transparent;
    color: var(--highlight-color);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover:not(:disabled) {
    background: var(--highlight-color);
    color: white;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: var(--highlight-color);
    color: white;
}

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

/* Smart Suggestions */
.smart-suggestion {
    background: linear-gradient(135deg, var(--bg-section), #f8f9fa);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    position: relative;
}

.smart-suggestion::before {
    content: '💡';
    position: absolute;
    top: -8px;
    left: 1rem;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

.suggestion-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.suggestion-content {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Industry-specific styling */
.form-step[data-industry="healthcare"] {
    --accent-color: #3498db;
}

.form-step[data-industry="finance"] {
    --accent-color: #2c3e50;
}

.form-step[data-industry="technology"] {
    --accent-color: #9b59b6;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-progress {
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .progress-circle {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .progress-label {
        font-size: 0.7rem;
        top: 35px;
    }
    
    .step-title {
        font-size: 1.3rem;
    }
    
    .step-description {
        font-size: 0.9rem;
    }
    
    .smart-form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .smart-input {
        padding: 0.7rem 0.9rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
}

@media (max-width: 480px) {
    .form-progress {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .progress-step {
        min-width: 80px;
    }
    
    .autocomplete-suggestions {
        max-height: 150px;
    }
    
    .suggestion-item {
        padding: 0.6rem 0.8rem;
    }
}