/* Search Page Styles - Google-Style (Early 2010s) - Responsive */

.search-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .search-container {
        padding: 0;
    }
}

/* Google Logo */
.google-logo {
    margin: 100px 0 30px 0;
}

.google-logo-text {
    font-size: 5rem;
    font-weight: 400;
    color: #4285f4;
    letter-spacing: -2px;
    margin: 0;
}

[data-mdb-theme="dark"] .google-logo-text {
    color: #5a9cff;
}

/* Search Hero - Google Style */
.search-hero {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: none;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 584px;
    margin: 0 auto 20px auto;
}

.search-input-wrapper .google-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 50px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    font-size: 16px;
    background: white;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
    transition: box-shadow 0.2s ease;
}

[data-mdb-theme="dark"] .search-input-wrapper .google-search-input {
    background: #2d2d2d;
    border-color: #5f6368;
    color: #e8eaed;
}

.search-input-wrapper .google-search-input:hover {
    box-shadow: 0 2px 8px 1px rgba(64,60,67,.24);
}

.search-input-wrapper .google-search-input:focus {
    outline: none;
    box-shadow: 0 2px 8px 1px rgba(64,60,67,.24);
    border-color: transparent;
}

.search-input-wrapper .input-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0a6;
    font-size: 16px;
    z-index: 1;
}

[data-mdb-theme="dark"] .search-input-wrapper .input-prefix {
    color: #9aa0a6;
}

/* Google Search Button */
.google-search-btn {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    padding: 11px 16px;
    margin: 11px 4px;
    cursor: pointer;
    min-width: 54px;
    text-align: center;
}

.google-search-btn:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    color: #202124;
}

[data-mdb-theme="dark"] .google-search-btn {
    background: #303134;
    border-color: #303134;
    color: #e8eaed;
}

[data-mdb-theme="dark"] .google-search-btn:hover {
    background: #303134;
    border-color: #5f6368;
}

/* Google-Style Tabs */
.search-tabs-container {
    border-bottom: 1px solid #ebebeb;
    margin: 0 0 20px 0;
    width: 100%;
    padding: 0;
}

[data-mdb-theme="dark"] .search-tabs-container {
    border-bottom-color: #5f6368;
}

.search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.search-tabs::-webkit-scrollbar {
    display: none;
}

.search-tab {
    display: inline-block;
    padding: 12px 16px;
    color: #5f6368;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease;
    white-space: nowrap;
}

[data-mdb-theme="dark"] .search-tab {
    color: #9aa0a6;
}

.search-tab:hover {
    color: #202124;
    text-decoration: none;
}

[data-mdb-theme="dark"] .search-tab:hover {
    color: #e8eaed;
}

.search-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

[data-mdb-theme="dark"] .search-tab.active {
    color: #8ab4f8;
    border-bottom-color: #8ab4f8;
}

.search-tab .tab-count {
    color: #70757a;
    margin-left: 4px;
}

[data-mdb-theme="dark"] .search-tab .tab-count {
    color: #9aa0a6;
}

.search-tab.active .tab-count {
    color: #1a73e8;
}

[data-mdb-theme="dark"] .search-tab.active .tab-count {
    color: #8ab4f8;
}

/* Sort Options */
.search-sort-options {
    text-align: right;
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 13px;
}

@media (max-width: 768px) {
    .search-sort-options {
        text-align: left;
        padding: 0 16px;
    }
}

.sort-label {
    color: #70757a;
    margin-right: 8px;
}

[data-mdb-theme="dark"] .sort-label {
    color: #9aa0a6;
}

.sort-link {
    color: #1a73e8;
    text-decoration: none;
    margin: 0 8px;
    padding: 4px 8px;
    border-radius: 2px;
}

[data-mdb-theme="dark"] .sort-link {
    color: #8ab4f8;
}

.sort-link:hover {
    text-decoration: underline;
    background: rgba(26, 115, 232, 0.1);
}

.sort-link.active {
    font-weight: 500;
    background: rgba(26, 115, 232, 0.1);
}

/* Google-Style Results */
.google-results {
    width: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .google-results {
        padding: 0 16px;
    }
}

.google-result {
    margin-bottom: 26px;
    width: 100%;
}

.google-result-title {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    margin: 0 0 3px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.google-result-title a {
    color: #1a0dab;
    text-decoration: none;
}

[data-mdb-theme="dark"] .google-result-title a {
    color: #8ab4f8;
}

.google-result-title a:hover {
    text-decoration: underline;
}

.google-result-title a:visited {
    color: #609;
}

[data-mdb-theme="dark"] .google-result-title a:visited {
    color: #a48cf4;
}

.google-result-url {
    font-size: 14px;
    line-height: 1.5;
    color: #006621;
    margin-bottom: 3px;
}

[data-mdb-theme="dark"] .google-result-url {
    color: #34a853;
}

.google-url-path {
    color: #006621;
}

[data-mdb-theme="dark"] .google-url-path {
    color: #34a853;
}

.google-result-meta {
    color: #70757a;
    font-size: 13px;
}

[data-mdb-theme="dark"] .google-result-meta {
    color: #9aa0a6;
}

.google-result-snippet {
    font-size: 14px;
    line-height: 1.58;
    color: #4d5156;
    margin-top: 3px;
}

[data-mdb-theme="dark"] .google-result-snippet {
    color: #bdc1c6;
}

/* Google-Style Search Stats */
.google-search-stats {
    color: #70757a;
    font-size: 14px;
    margin: 0 0 12px 0;
    width: 100%;
    padding: 0;
}

@media (max-width: 768px) {
    .google-search-stats {
        padding: 0;
        font-size: 13px;
    }
}

[data-mdb-theme="dark"] .google-search-stats {
    color: #9aa0a6;
}

/* Section Headers - Google Style */
.section-header {
    margin: 40px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #ebebeb;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 768px) {
    .section-header {
        padding-left: 0;
        padding-right: 0;
        margin: 30px 0 15px 0;
    }
}

[data-mdb-theme="dark"] .section-header {
    border-bottom-color: #5f6368;
}

.section-header h4 {
    font-weight: 400;
    font-size: 20px;
    color: #202124;
    margin: 0;
}

[data-mdb-theme="dark"] .section-header h4 {
    color: #e8eaed;
}

.section-header h4 a {
    color: #202124;
    text-decoration: none;
}

[data-mdb-theme="dark"] .section-header h4 a {
    color: #e8eaed;
}

.section-header h4 a:hover {
    text-decoration: underline;
}

.section-header .result-count {
    color: #70757a;
    font-size: 14px;
    font-weight: normal;
}

[data-mdb-theme="dark"] .section-header .result-count {
    color: #9aa0a6;
}

/* Network cards inherit from theme.css - just add search-specific overrides */
.search-page .network-card {
    margin-bottom: 0;
}

.network-card-link {
    color: var(--text-primary);
}

.network-card-link:hover {
    color: var(--mdb-primary);
}

/* Result cards - inherit from theme but add specific styles */
.result-card,
.download-card,
.quote-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    background: var(--surface-main);
}

.result-card a,
.download-card a,
.quote-card a {
    color: var(--text-primary);
}

.result-card a:hover,
.download-card a:hover,
.quote-card a:hover {
    color: var(--mdb-primary);
}

.result-card .card-title,
.result-card .card-subtitle {
    color: var(--text-primary);
}

.download-card-header {
    background: var(--mdb-primary) !important;
    color: white !important;
}

[data-mdb-theme="dark"] .download-card-header {
    background: linear-gradient(135deg, #1a237e 0%, #311b92 100%) !important;
}

.download-card-footer {
    background: var(--mdb-primary) !important;
    color: white !important;
}

[data-mdb-theme="dark"] .download-card-footer {
    background: linear-gradient(135deg, #1a237e 0%, #311b92 100%) !important;
}

.download-description {
    color: var(--text-primary);
}

.download-version {
    color: rgba(255, 255, 255, 0.7);
}

/* Quote card styling */
.quote-card .card-body {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.quote-card .card-body pre {
    background: transparent;
    border: none;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

[data-mdb-theme="light"] .quote-card .card-body {
    background: #f8f9fa;
}

[data-mdb-theme="dark"] .quote-card .card-body {
    background: #1a1f2d;
}

.quote-card .card-footer {
    background: var(--surface-main);
    border-top: 1px solid var(--border-color);
}

.user-card {
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 2px solid var(--border-color);
    background: var(--surface-main);
}

.user-card:hover {
    border-color: var(--mdb-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    margin-left: 0.5rem;
    border-radius: 15px;
    background: var(--surface-secondary);
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Badge styling */
.badge {
    border-radius: 12px;
    padding: 0.35rem 0.75rem;
    font-weight: 500;
}

.badge.badge-secondary {
    background: var(--surface-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge.bg-primary {
    background: var(--mdb-primary) !important;
    color: white !important;
}

.forum-post-excerpt {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.forum-post-excerpt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--surface-main));
}

[data-mdb-theme="light"] .forum-post-excerpt::after {
    background: linear-gradient(transparent, white);
}

[data-mdb-theme="dark"] .forum-post-excerpt::after {
    background: linear-gradient(transparent, var(--surface-main));
}

/* Google-Style Empty State */
.google-empty-state {
    width: 100%;
    margin: 100px auto;
    padding: 0;
}

@media (max-width: 768px) {
    .google-empty-state {
        margin: 60px auto;
        padding: 0;
    }
}

.google-empty-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
}

.google-empty-title {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    line-height: 1.5;
    margin-bottom: 20px;
}

[data-mdb-theme="dark"] .google-empty-title {
    color: #e8eaed;
}

.google-empty-suggestions {
    color: #70757a;
    font-size: 14px;
    line-height: 1.58;
}

[data-mdb-theme="dark"] .google-empty-suggestions {
    color: #9aa0a6;
}

.google-empty-suggestions p {
    margin-bottom: 10px;
}

.google-empty-suggestions ul {
    margin: 10px 0 0 20px;
    padding-left: 0;
}

.google-empty-suggestions li {
    margin-bottom: 8px;
}

/* Autocomplete - Google Style */
.autocomplete-suggestions {
    position: absolute;
    border: 1px solid #dadce0;
    z-index: 99;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
    border-radius: 0 0 24px 24px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

[data-mdb-theme="dark"] .autocomplete-suggestions {
    background: #202124;
    border-color: #5f6368;
}

.autocomplete-suggestions.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #ebebeb;
    display: flex;
    align-items: center;
    transition: background 0.1s ease;
    color: #202124;
}

[data-mdb-theme="dark"] .autocomplete-item {
    border-bottom-color: #5f6368;
    color: #e8eaed;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f8f9fa;
}

[data-mdb-theme="dark"] .autocomplete-item:hover,
[data-mdb-theme="dark"] .autocomplete-item.selected {
    background-color: #303134;
}

.autocomplete-item i {
    margin-right: 12px;
    width: 24px;
    text-align: center;
    color: var(--mdb-primary);
    font-size: 1.1rem;
}

.autocomplete-item .type-badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--surface-secondary);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tables */
.modern-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: var(--surface-main);
}

.modern-table thead {
    background: var(--mdb-primary);
    color: white;
}

.modern-table thead th {
    color: white !important;
}

.table-header {
    background: var(--mdb-primary) !important;
    color: white !important;
}

.table-header th {
    color: white !important;
}

.modern-table tbody tr {
    transition: background 0.2s ease;
    color: var(--text-primary);
}

.modern-table tbody tr:hover {
    background: var(--surface-secondary);
}

.modern-table tbody td {
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* View More Button - Google Style */
.view-more-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 16px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

[data-mdb-theme="dark"] .view-more-btn {
    color: #8ab4f8;
}

.view-more-btn:hover {
    background: rgba(26, 115, 232, 0.1);
    text-decoration: none;
}

[data-mdb-theme="dark"] .view-more-btn:hover {
    background: rgba(138, 180, 248, 0.1);
}

/* Pagination - Google Style */
.pagination {
    width: 100%;
    margin: 40px 0 0 0;
    padding: 0;
    justify-content: center;
}

@media (max-width: 768px) {
    .pagination {
        padding: 0;
        margin: 30px 0 0 0;
    }
}

.pagination .page-link {
    border-radius: 4px;
    margin: 0 2px;
    border: 1px solid #dadce0;
    color: #1a73e8;
    background: white;
    padding: 8px 12px;
    font-size: 14px;
}

[data-mdb-theme="dark"] .pagination .page-link {
    background: #202124;
    border-color: #5f6368;
    color: #8ab4f8;
}

.pagination .page-link:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    text-decoration: none;
}

[data-mdb-theme="dark"] .pagination .page-link:hover {
    background: #303134;
    border-color: #5f6368;
}

.pagination .page-item.active .page-link {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

[data-mdb-theme="dark"] .pagination .page-item.active .page-link {
    background: #8ab4f8;
    border-color: #8ab4f8;
    color: #202124;
}

/* Search term highlighting - Google Style */
.highlighted {
    background-color: #fff176;
    color: #000;
    padding: 0;
    border-radius: 2px;
    font-weight: 500;
}

[data-mdb-theme="dark"] .highlighted {
    background-color: #fdd835;
    color: #000;
}

/* Make highlights visible on colored backgrounds */
.google-result-title .highlighted {
    background-color: #fff176;
    color: #000;
    font-weight: 600;
}

[data-mdb-theme="dark"] .google-result-title .highlighted {
    background-color: #fdd835;
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .google-logo-text {
        font-size: 3rem;
        margin: 60px 0 20px 0;
    }
    
    .search-input-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .search-input-wrapper .google-search-input {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-tabs-container {
        padding: 0;
        margin-bottom: 15px;
    }
    
    .search-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .search-tab {
        font-size: 12px;
        padding: 10px 12px;
        flex-shrink: 0;
    }
    
    .google-result {
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .google-result-title {
        font-size: 18px;
        line-height: 1.4;
    }
    
    .google-result-url {
        font-size: 13px;
        word-break: break-all;
    }
    
    .google-result-snippet {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .google-result-meta {
        font-size: 12px;
    }
    
    .search-sort-options {
        text-align: left;
        margin-top: 10px;
        padding: 0;
    }
    
    .sort-link {
        display: inline-block;
        margin: 4px 4px 0 0;
    }
    
    .google-search-stats {
        padding: 0 16px;
    }
    
    .google-empty-state {
        padding: 0 16px;
    }
    
    .google-empty-title {
        font-size: 18px;
    }
    
    .google-empty-suggestions {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .google-logo-text {
        font-size: 2.5rem;
        margin: 40px 0 15px 0;
    }
    
    .search-input-wrapper .google-search-input {
        height: 40px;
        padding: 0 14px 0 45px;
        font-size: 16px;
    }
    
    .search-input-wrapper .input-prefix {
        left: 14px;
        font-size: 14px;
    }
    
    .google-search-btn {
        padding: 9px 14px;
        font-size: 13px;
        margin: 9px 2px;
    }
    
    .search-tab {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .google-result-title {
        font-size: 16px;
    }
    
    .google-result-url {
        font-size: 12px;
    }
    
    .google-result-snippet {
        font-size: 12px;
    }
    
    .section-header h4 {
        font-size: 18px;
    }
}

/* Status badge styles moved to style.css - using .status-badge-sm variant */

