/* Neural Advanced Search Widget Styles */

.neural-search-form {
    margin: 0;
    padding: 0;
}

.neural-search-form-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.neural-search-input-group {
    display: flex;
    gap: 10px;
}

.neural-search-input-group .neural-search-input {
    flex: 1;
    outline: none;
    margin-bottom: 0;
}

.neural-search-input-group .neural-search-input::placeholder {
    color: #999;
    opacity: 1;
}

.neural-search-input-group .neural-search-input:focus {
    outline: none;
    border: 1px solid var(--neural-button-bg, #007cba);
    box-shadow: none;
}

.neural-search-input-group .neural-search-button {
    padding: 10px 20px;
    background: var(--neural-button-bg, #007cba);
    color: var(--neural-button-text, white);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    border-radius: 4px;
    line-height: 1;
}

.neural-search-button:hover {
    background: var(--neural-secondary-color, #005a87);
}

.neural-search-button:active {
    background: #004085;
    transform: translateY(1px);
}

.neural-search-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .neural-search-input-group {
        flex-direction: column;
    }
    
    .neural-search-button {
        border-radius: 0 0 6px 6px;
    }
    
    .neural-search-input {
        border-radius: 6px 6px 0 0;
    }
}

/* Advanced Search Page Styles */
.neural-advanced-search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.neural-search-header {
    background: #f2f3f4;
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    margin-bottom: 30px;
}

.neural-search-title {
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: #333;
    font-weight: 600;
}

.neural-search-results-count {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

.neural-search-form-section {
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #bcbcbc;
}

.neural-search-form-section .neural-search-input-group .neural-search-input {
    font-size: 20px;
}

.neural-search-filters {
    padding-top: 30px;
}

.neural-search-filters h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3rem;
}

.neural-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.neural-filter-group {
    display: flex;
    flex-direction: column;
}

.neural-filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.neural-filter-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.neural-filter-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.neural-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.neural-apply-filters-btn,
.neural-clear-filters-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.neural-apply-filters-btn {
    background: var(--neural-button-bg, #007cba);
    color: var(--neural-button-text, white);
}

.neural-apply-filters-btn:hover {
    background: var(--neural-secondary-color, #005a87);
}

.neural-clear-filters-btn {
    background: #6c757d;
    color: white;
}

.neural-clear-filters-btn:hover {
    background: #545b62;
}

.neural-search-results {
    padding: 30px 0;
}

.neural-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.neural-result-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    display: flex;
    overflow: hidden;
}

.neural-result-container {
    padding: 15px 25px;
}

.neural-result-image {
    min-width: 260px;
    position: relative;
}
img.neural-result-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.neural-result-placeholder {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f3f4;
    font-size: 24px;
    color: #999;
}

.neural-result-placeholder .dashicons  {
    font-size: 26px;
    width: 26px;
    height: 26px;
}

.neural-result-header {
    margin-bottom: 15px;
}

.neural-result-title {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.neural-result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.neural-result-title a:hover {
    color: var(--neural-secondary-color, #005a87);
}

.neural-result-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.neural-result-content {
    margin-bottom: 15px;
    line-height: 1.2;
    color: #555;
}

.neural-result-content p {
    line-height: 1.4;
}

.neural-result-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.neural-result-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.neural-result-category {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.neural-read-more {
    color: var(--neural-button-bg, #007cba);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.neural-read-more:hover {
    color: var(--neural-secondary-color, #005a87);
}

.neural-search-pagination {
    margin-top: 40px;
    text-align: center;
}

.neural-search-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.neural-search-pagination .page-numbers:hover,
.neural-search-pagination .page-numbers.current {
    background: var(--neural-button-bg, #007cba);
    color: var(--neural-button-text, white);
    border-color: var(--neural-button-bg, #007cba);
}

.neural-no-results,
.neural-search-intro {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.neural-no-results h3,
.neural-search-intro h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5rem;
}

/* Source Type Badges */
.neural-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-left: 10px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.neural-source-post {
    background: #e3f2fd;
    color: #1976d2;
}

.neural-source-image {
    background: #f3e5f5;
    color: #7b1fa2;
}

.neural-source-pdf {
    background: #fff3e0;
    color: #f57c00;
}

.neural-source-icon {
    font-size: 0.8rem;
}

/* Result Item Variations */
.neural-source-badge.badge-post {
    border-left: 3px solid #1976d2;
}
.neural-source-badge.badge-image {
    border-left: 3px solid #7b1fa2;
}

.neural-source-badge.badge-pdf  {
    border-left: 3px solid #f57c00;
}

.neural-source-badge.badge-unknown {
    border-left: 3px solid #666;
}

.neural-result-source-badge {
    margin-bottom: 10px;
}

/* Image Preview */
.neural-image-preview {
    margin: 15px 0;
    text-align: center;
}

.neural-image-preview img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Search Highlight */
.neural-search-highlight {
    background: #ffeb3b;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Result Actions */
.neural-result-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.neural-view-image,
.neural-download-pdf {
    color: var(--neural-button-bg, #007cba);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.neural-view-image:hover,
.neural-download-pdf:hover {
    color: var(--neural-secondary-color, #005a87);
}

.neural-download-pdf::before {
    content: "📄 ";
    margin-right: 4px;
}

.neural-view-image::before {
    content: "🖼️ ";
    margin-right: 4px;
}

/* Filter Form Styling */
.neural-filters-form {
    margin: 0;
}

.neural-clear-filters-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.neural-clear-filters-btn:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

/* External News Styles */
.neural-external-news-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #ddd;
}

.neural-external-loading {
    text-align: center;
    padding: 40px 20px;
}

.neural-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--neural-primary-color, #007cba);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.neural-external-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.neural-external-header {
    margin-bottom: 30px;
}

.neural-external-header h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 24px;
}

.neural-external-count {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.neural-external-items {
    display: grid;
    gap: 20px;
}

.neural-external-item {
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.neural-external-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.neural-external-item-header {
    margin-bottom: 15px;
}

.neural-external-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.neural-external-title a {
    color: var(--neural-button-bg, #007cba);
    text-decoration: none;
    transition: color 0.2s ease;
}

.neural-external-title a:hover {
    color: var(--neural-secondary-color, #005a87);
}

.neural-external-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.neural-external-source {
    font-weight: 500;
}

.neural-external-date {
    color: #999;
}

.neural-external-content {
    margin-bottom: 15px;
}

.neural-external-description {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.neural-external-item-footer {
    text-align: right;
}

.neural-external-read-more {
    color: var(--neural-button-bg, #007cba);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.neural-external-read-more:hover {
    color: var(--neural-secondary-color, #005a87);
}

.neural-external-no-results,
.neural-external-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.neural-external-error {
    color: #d63384;
}
