/* ============================================
   SEARCH MODAL SYSTEM - search.css
   Created for brinkmann.au
   ============================================ */

/* Search Modal Overlay */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.search-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Search Modal Box */
.search-modal {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Header */
.search-header {
    padding: 30px;
    background: linear-gradient(135deg, #8b7355 0%, #6b5847 100%);
    border-radius: 16px 16px 0 0;
    border-bottom: 4px solid #10b981;
}

.search-header h2 {
    color: white;
    font-size: 28px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid #c85a54;
    border-radius: 12px;
    font-family: inherit;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Search Results */
.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.search-results-header {
    font-size: 14px;
    color: #6b5847;
    font-weight: 600;
    margin-bottom: 20px;
}

.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.search-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.search-result-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-result-item:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.search-result-thumb {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

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

.search-result-title {
    font-size: 20px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 8px;
}

.search-result-description {
    color: #6b5847;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-category {
    background: #e6f7f1;
    color: #059669;
}

.badge-photos {
    background: #fef3c7;
    color: #92400e;
}

.badge-videos {
    background: #fce7f3;
    color: #9f1239;
}

.badge-book {
    background: #dbeafe;
    color: #1e40af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-modal {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .search-header {
        padding: 20px;
        border-radius: 0;
    }
    
    .search-header h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .search-results {
        padding: 20px;
    }
    
    .search-result-item {
        flex-direction: column;
        padding: 16px;
    }
    
    .search-result-thumb {
        width: 100%;
        height: 180px;
    }
    
    .search-result-title {
        font-size: 18px;
    }
}
