/* Premium Features CSS - Personalization, Smart Search, and Progress Tracking */

/* ===== PERSONALIZATION ENGINE STYLES ===== */

/* Personalized Recommendations Widget */
#personalized-recommendations {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #D4AF37;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

#personalized-recommendations h4 {
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.recommendation-section {
    margin-bottom: 1.5rem;
}

.recommendation-section h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(5px);
}

.recommendation-item i {
    color: #D4AF37;
    font-size: 1.1rem;
}

.recommendation-item span,
.recommendation-item a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.recommendation-item a:hover {
    color: #D4AF37;
}

/* Personalized Badges */
.personalized-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    animation: badgePulse 2s infinite;
}

.location-badge {
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    color: white;
}

.budget-badge {
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    color: white;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

/* ===== SMART SEARCH STYLES ===== */

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

.autocomplete-item i {
    color: #D4AF37;
    width: 16px;
}

/* Search History Button */
.search-history-btn {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #D4AF37;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-history-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-50%) scale(1.1);
}

/* Price Range Slider */
.price-range-slider {
    margin: 1rem 0;
}

.range-slider {
    position: relative;
    height: 40px;
    margin: 1rem 0;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    pointer-events: none;
    -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #D4AF37;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #D4AF37;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.price-display {
    text-align: center;
    font-weight: 600;
    color: #D4AF37;
    margin-top: 0.5rem;
}

/* Filter Presets */
.filter-presets {
    margin: 1.5rem 0;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preset-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid #D4AF37;
    color: #D4AF37;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #D4AF37;
    color: white;
    transform: translateY(-2px);
}

/* Saved Searches Widget */
.saved-searches-widget {
    background: white;
    border: 2px solid #D4AF37;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.saved-searches-widget h5 {
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 1rem;
}

.saved-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.saved-search-actions {
    display: flex;
    gap: 0.5rem;
}

.saved-search-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ===== PROGRESS TRACKING STYLES ===== */

/* Progress Widget */
.progress-widget {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #D4AF37;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h4 {
    color: #D4AF37;
    font-weight: 700;
    margin: 0;
    font-size: 1.2rem;
}

.progress-percentage {
    text-align: center;
}

.progress-percentage .percentage {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #D4AF37;
}

.progress-percentage .label {
    font-size: 0.8rem;
    color: #666;
}

.progress-bar-container {
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #FFD700);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.current-stage {
    text-align: center;
    margin-top: 1rem;
}

.stage-label {
    color: #666;
    font-size: 0.9rem;
}

.stage-name {
    color: #D4AF37;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Milestone Tracker */
.milestone-tracker {
    background: white;
    border: 2px solid #D4AF37;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.milestone-tracker h5 {
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.milestone-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.milestone-item.active {
    background: rgba(212, 175, 55, 0.15);
    border-left: 4px solid #D4AF37;
}

.milestone-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.milestone-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.milestone-content {
    flex: 1;
}

.milestone-content h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.milestone-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.milestone-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.milestone-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #FFD700);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.milestone-percentage {
    font-size: 0.8rem;
    font-weight: 600;
    color: #D4AF37;
    min-width: 30px;
}

/* Activity Timeline */
.activity-timeline {
    background: white;
    border: 2px solid #D4AF37;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.activity-timeline h5 {
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(3px);
}

.timeline-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.timeline-content p {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.timeline-date {
    color: #999;
    font-size: 0.75rem;
}

/* Next Steps Widget */
.next-steps-widget {
    background: white;
    border: 2px solid #D4AF37;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.next-steps-widget h5 {
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.next-steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.next-step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.next-step-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(5px);
}

.step-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.step-content .btn {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
}

/* ===== NOTIFICATIONS ===== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: slideInRight 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.1rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== LOADING STATES ===== */

.loading-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-state .spinner-border {
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .progress-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .milestone-item {
        flex-direction: column;
        text-align: center;
    }
    
    .milestone-icon {
        align-self: center;
    }
    
    .next-step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-icon {
        align-self: center;
    }
    
    .preset-buttons {
        justify-content: center;
    }
    
    .saved-search-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .progress-widget,
    .milestone-tracker,
    .activity-timeline,
    .next-steps-widget,
    .saved-searches-widget {
        padding: 1rem;
    }
    
    .milestone-content h6,
    .step-content h6 {
        font-size: 1rem;
    }
    
    .milestone-content p,
    .step-content p {
        font-size: 0.85rem;
    }
}

/* ===== ANIMATIONS ===== */

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== UTILITY CLASSES ===== */

.text-gold {
    color: #D4AF37 !important;
}

.bg-gold {
    background-color: #D4AF37 !important;
}

.border-gold {
    border-color: #D4AF37 !important;
}

.shadow-gold {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2) !important;
}

.hover-gold:hover {
    color: #D4AF37 !important;
}

.hover-bg-gold:hover {
    background-color: #D4AF37 !important;
    color: white !important;
}

