/**
 * Search Widget Styles
 */

/* Search Hero */
.search-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2d5016 100%);
    color: white;
}

.search-hero h1 {
    margin: 0 0 30px 0;
    font-size: 48px;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}

.search-btn {
    padding: 15px 30px;
    background: #2d5016;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #0f2505;
}

/* Search Results */
.search-results {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    overflow-y: auto;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.results-header h2 {
    margin: 0;
    color: #1e3a8a;
}

.close-results {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
}

.close-results:hover {
    color: #000;
}

.results-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Search Result Cards */
.search-result-card {
    display: flex;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-image {
    position: relative;
    width: 300px;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.result-favorite-btn:hover {
    transform: scale(1.1);
}

.result-favorite-btn.favorited {
    animation: heartBeat 0.3s ease;
}

.result-info {
    padding: 20px;
    flex: 1;
}

.result-info h3 {
    margin: 0 0 8px 0;
    color: #1e3a8a;
    font-size: 24px;
}

.result-city {
    color: #666;
    margin-bottom: 12px;
}

.result-price {
    color: #2d5016;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
}

.result-details {
    color: #666;
    margin-bottom: 15px;
}

.result-description {
    color: #444;
    line-height: 1.6;
}

/* Loading State */
.search-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #2d5016;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.search-error {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-hero h1 {
        font-size: 32px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-result-card {
        flex-direction: column;
    }
    
    .result-image {
        width: 100%;
        height: 200px;
    }
    
    .result-info h3 {
        font-size: 20px;
    }
    
    .result-price {
        font-size: 24px;
    }
}
