/* Smart Search Interface Styling */
.smart-search-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Bar */
.search-bar-container {
    position: relative;
}

.search-bar {
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.search-bar .form-control {
    height: 60px;
    font-size: 1.2rem;
    padding-left: 20px;
    padding-right: 50px;
    border: none;
}

.search-bar .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    font-size: 1.4rem;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

/* Filter Controls */
.filter-controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.filter-label {
    font-weight: bold;
    margin-right: 10px;
    margin-bottom: 5px;
    display: inline-block;
}

.doc-type-filter .btn,
.product-line-filter .btn {
    padding: 0.375rem 0.75rem;
}

.results-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.sort-controls {
    display: flex;
    align-items: center;
}

.sort-controls label {
    margin-right: 10px;
    margin-bottom: 0;
}

.sort-controls .form-select {
    width: auto;
}

/* Document Grid */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.document-card {
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    background: white;
}

.document-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    font-size: 2rem;
    background: #f8f9fa;
}

.specs-doc .document-icon {
    color: #0066cc;
}

.manual-doc .document-icon {
    color: #007e33;
}

.accessories-doc .document-icon {
    color: #9933cc;
}

.nxt-doc .document-icon {
    color: #ff6b00;
}

.nxtmaintenance-doc .document-icon {
    color: #cc6600;
}

.watchdog-doc .document-icon {
    color: #3366cc;
}

.wmaintenance-doc .document-icon {
    color: #336699;
}

.document-info {
    padding: 10px;
    flex-grow: 1;
}

.document-title {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.document-meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
}

.document-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    background: #f0f0f0;
}

.specs-doc .document-type {
    background: #e6f2ff;
    color: #0066cc;
}

.manual-doc .document-type {
    background: #e6fff0;
    color: #007e33;
}

.accessories-doc .document-type {
    background: #f3e6ff;
    color: #9933cc;
}

.nxt-doc .document-type {
    background: #fff0e6;
    color: #ff6b00;
}

.nxtmaintenance-doc .document-type {
    background: #fff4e6;
    color: #cc6600;
}

.watchdog-doc .document-type {
    background: #e6eeff;
    color: #3366cc;
}

.wmaintenance-doc .document-type {
    background: #e6f0ff;
    color: #336699;
}

.document-actions {
    padding: 10px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    display: flex;
    justify-content: space-between;
}

.document-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

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

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
    color: #666;
}

/* PDF Viewer Styling */
#pdf-viewer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 9999;
    display: none;
}

#pdf-viewer-container .viewer {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

#pdf-viewer-container .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#pdf-viewer-container .toolbar .title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

#pdf-viewer-container .toolbar .close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pdf-viewer-container .pdf-content {
    flex: 1;
    position: relative;
}

#pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    z-index: 10;
}

#pdf-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 80%;
    display: none;
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .document-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .filter-group {
        margin-bottom: 15px;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .document-actions .btn {
        width: 100%;
    }
    
    #pdf-viewer-container .viewer {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
}