/* Typeform-style Popup Modal */
.typeform-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.typeform-overlay.active {
    opacity: 1;
    visibility: visible;
}

.typeform-modal {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
    display: flex;
    flex-direction: column;
}

.typeform-overlay.active .typeform-modal {
    transform: scale(1);
}

.typeform-header {
    position: relative;
    padding: 30px;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.typeform-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    z-index: 1;
}

.typeform-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.typeform-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.typeform-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.typeform-content {
    background: white;
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.typeform-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    overflow-y: auto;
}

.typeform-step.active {
    opacity: 1;
    transform: translateX(0);
}

.typeform-step.prev {
    transform: translateX(-100%);
}

.step-question {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2D3748;
    margin-bottom: 30px;
    line-height: 1.4;
    flex-shrink: 0;
}

.step-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
    margin-bottom: 20px;
    box-sizing: border-box;
}

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

.step-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-button {
    padding: 20px;
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2D3748;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.option-button:hover {
    border-color: #667eea;
    background: #EBF8FF;
    transform: translateY(-2px);
}

.option-button.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.option-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-button.selected .option-icon {
    background: rgba(255, 255, 255, 0.3);
}

.step-navigation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 40px;
    background: white;
    border-top: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.nav-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

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

.nav-button.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-button.secondary {
    background: transparent;
    color: #718096;
    border: 2px solid #E2E8F0;
}

.nav-button.secondary:hover {
    border-color: #CBD5E0;
    color: #4A5568;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 0 0 2px 0;
}

.step-counter {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* Property Type Selection */
.property-types {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.property-type-card {
    padding: 15px 12px;
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    box-sizing: border-box;
    min-width: 80px;
    flex-shrink: 0;
}

.property-type-card:hover {
    border-color: #667eea;
    background: #EBF8FF;
    transform: translateY(-2px);
}

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

.property-type-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.property-type-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* BHK Selection */
.bhk-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.bhk-option {
    padding: 15px;
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-sizing: border-box;
}

.bhk-option:hover {
    border-color: #667eea;
    background: #EBF8FF;
}

.bhk-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Budget Range */
.budget-slider {
    margin: 30px 0;
}

.budget-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #E2E8F0;
    outline: none;
    -webkit-appearance: none;
    margin: 20px 0;
}

.budget-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.budget-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.budget-display {
    text-align: center;
    font-weight: 600;
    color: #667eea;
    font-size: 1.2rem;
    margin-top: 15px;
}

.budget-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #718096;
    margin-top: 10px;
}

/* Area Selection */
.area-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.area-option {
    padding: 12px 16px;
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 500;
    box-sizing: border-box;
    min-width: 80px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.area-option:hover {
    border-color: #667eea;
    background: #EBF8FF;
}

.area-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Loading State */
.loading-step {
    text-align: center;
    padding: 60px 40px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

.loading-text {
    font-size: 1.2rem;
    color: #4A5568;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .typeform-modal {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .typeform-step {
        padding: 30px 25px;
    }
    
    .step-navigation {
        padding: 20px 25px;
    }
    
    .step-question {
        font-size: 1.3rem;
    }
    
    .property-types {
        gap: 8px;
    }
    
    .property-type-card {
        min-width: 70px;
        padding: 12px 8px;
    }
    
    .property-type-icon {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .property-type-name {
        font-size: 0.8rem;
    }
    
    .bhk-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .area-grid {
        gap: 8px;
    }
    
    .area-option {
        min-width: 70px;
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .typeform-header {
        padding: 25px 20px;
    }
    
    .typeform-title {
        font-size: 1.7rem;
    }
    
    .typeform-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .typeform-modal {
        width: 98%;
        margin: 5px;
    }
    
    .typeform-title {
        font-size: 1.5rem;
    }
    
    .typeform-subtitle {
        font-size: 0.95rem;
    }
    
    .step-question {
        font-size: 1.2rem;
    }
    
    .property-types {
        gap: 6px;
    }
    
    .property-type-card {
        min-width: 60px;
        padding: 10px 6px;
    }
    
    .property-type-icon {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    
    .property-type-name {
        font-size: 0.75rem;
    }
    
    .area-grid {
        gap: 6px;
    }
    
    .area-option {
        min-width: 60px;
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .bhk-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .step-input {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    .option-button {
        padding: 16px;
        font-size: 1rem;
    }
    
    .nav-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}