/**
 * StayNow Search Styles
 */

/* Search Container */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 16px 48px 16px 20px;
    border: 2px solid var(--soft-border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: var(--card-surface);
}

.search-input:focus {
    outline: none;
    border-color: var(--capri-blue);
    box-shadow: 0 0 0 4px rgba(0, 153, 214, 0.16);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-icon {
    position: absolute;
    right: 16px;
    color: var(--muted);
    pointer-events: none;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--card-surface);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-results-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--soft-border);
    font-size: 14px;
    color: var(--muted);
}

.search-results-list {
    padding: 8px 0;
}

/* Search Result Item */
.search-result-item {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255,255,255,0.58);
}

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

.search-result-item:hover {
    background: rgba(255,252,240,0.62);
}

.search-result-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(176, 240, 255, 0.65);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--capri-blue);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-content h4 mark {
    background: rgba(255, 203, 143, 0.55);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-location {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.search-result-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.search-result-meta .badge {
    background: rgba(176, 240, 255, 0.62);
    color: var(--capri-blue);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.search-result-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--pine-green);
}

/* No Results */
.search-no-results {
    padding: 24px;
    text-align: center;
}

.search-no-results p {
    color: var(--muted);
    margin-bottom: 8px;
}

.search-no-results a {
    color: var(--capri-blue);
    text-decoration: none;
}

.search-no-results a:hover {
    text-decoration: underline;
}

/* Loading State */
.search-loading {
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

.search-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    border: 2px solid var(--soft-border);
    border-top-color: var(--capri-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-results {
        position: fixed;
        top: auto;
        left: 16px;
        right: 16px;
        bottom: 80px;
        max-height: 60vh;
        margin-top: 0;
    }
    
    .search-result-image {
        width: 60px;
        height: 45px;
    }
}

/* Search Page Styles */
.search-page {
    padding: 40px 0;
}

.search-page-header {
    text-align: center;
    margin-bottom: 32px;
}

.search-page-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.search-page-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

.search-page-filters select {
    padding: 10px 16px;
    border: 1px solid var(--soft-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-surface);
}

.search-page-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
