/* Woff Docs Ajax Search Styles
 *
 * Note: This file ignores -copy*.css files
 */

/* CSS Variables */
:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #888;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border: #e9ecef;
    --border-light: #f8f9fa;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --max-width: 1200px;
}

/* Container */
.woff-docs-search-container {
    background: #f8f9fa;
    min-height: 100vh;
    margin-bottom: 50px;
}

/* Header */
.woff-docs-search-header {
    background: white;
}

.woff-docs-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.woff-docs-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.woff-docs-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.woff-docs-site-title h1 {
    
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.woff-docs-header-actions {
    display: flex;
    gap: 15px;
}

.woff-docs-header-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid #667eea;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.woff-docs-header-btn:hover {
    background: #667eea;
    color: white;
}

/* Search Section */
.woff-docs-search-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
}

.woff-docs-search-header {
    text-align: center;
}

.woff-docs-search-header h2 {
    
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.woff-docs-search-header p {
    color: #666;
    font-size: 1.1rem;
}
.woff-docs-search-header-top {
    margin-bottom: 15px;
    text-align: right;
}

.woff-docs-back-home {
    display: inline-flex;
    align-items: center;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
}

.woff-docs-back-home:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #764ba2;
    transform: translateX(-2px);
}

.woff-docs-search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: 1; /* Ensure input wrapper is above suggestions */
}

.woff-docs-search-input {
    width: 100%;
    padding: 20px 60px 20px 25px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
    z-index: 2; /* Ensure input is above suggestions */
}

.woff-docs-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    z-index: 2; /* Maintain z-index on focus */
}

.woff-docs-search-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center; 
    transition: all 0.3s ease;
}

.woff-docs-search-button:hover {
    transform: translateY(-50%) scale(1.05);
}

.woff-docs-loading-indicator {
    display: none;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
}

.woff-docs-loading-indicator.active {
    display: block;
}

.woff-docs-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.woff-docs-search-input-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.woff-docs-search-suggestions {
    position: absolute;
    top: calc(100% - 10px); /* Position right below the input wrapper */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 998; /* Lower z-index to not interfere with input */
    display: none;
    max-height: 300px; /* Allow scrolling when content exceeds this height */
    overflow-y: auto; /* Enable vertical scrolling */
}

.woff-docs-search-suggestions.active {
    display: block;
}

.woff-docs-suggestion-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.woff-docs-suggestion-item:last-child {
    border-bottom: none;
}

.woff-docs-suggestion-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.woff-docs-suggestion-category {
    font-size: 0.9rem;
    color: #888;
}

/* Version Articles Section */
.woff-docs-version-section {
    border-radius: 16px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.woff-docs-version-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.woff-docs-version-icon {
    color: #667eea;
    font-size: 1.2rem;
}

.woff-docs-version-title {
    
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.woff-docs-results-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.woff-docs-result-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woff-docs-result-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.woff-docs-result-item.featured {
    border-left: 4px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.woff-docs-featured-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woff-docs-result-header {
    display: flex;
    align-items: start;
    gap: 15px;
    margin-bottom: 15px;
}

.woff-docs-result-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.woff-docs-result-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.woff-docs-result-title-section {
    flex: 1;
}

.woff-docs-result-title {
    
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    text-decoration: none;
    display: block;
}

.woff-docs-result-title:hover {
    color: #667eea;
}

.woff-docs-result-category {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.woff-docs-category-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.woff-docs-other-categories {
    color: #888;
    font-size: 0.8rem;
    font-weight: normal;
}

.woff-docs-result-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.woff-docs-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.woff-docs-article-tag {
    background: #f8f9fa;
    color: #666;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.woff-docs-result-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
}

.woff-docs-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.woff-docs-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* Load More */
.woff-docs-load-more {
    text-align: center;
    margin-top: 40px;
}

.woff-docs-load-more-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woff-docs-load-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.woff-docs-load-more-btn.loading {
    background: #667eea;
    color: white;
    pointer-events: none;
}

/* Results Stats Bar */
.woff-docs-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.woff-docs-stats-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.woff-docs-results-count {
    
    font-size: 1.2rem;
    color: #333;
}

.woff-docs-result-summary {
    display: none;
    color: #666;
    font-size: 0.9rem;
}

.woff-docs-stats-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.woff-docs-sort-options {
    display: flex;
    gap: 10px;
}

.woff-docs-sort-btn {
    padding: 8px 16px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.woff-docs-sort-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.woff-docs-view-toggle {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
}

.woff-docs-view-toggle .woff-docs-view-btn {
    padding: 6px 10px;
    border: 1px solid transparent;
    background: transparent !important;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666 !important;
    font-size: 14px !important;
}

.woff-docs-view-toggle .woff-docs-view-btn:not(.active):hover {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

.woff-docs-view-toggle .woff-docs-view-btn.active,
.woff-docs-stats-bar .woff-docs-view-toggle .woff-docs-view-btn.active,
body .woff-docs-search-container .woff-docs-stats-bar .woff-docs-view-toggle .woff-docs-view-btn.active {
    background: white !important;
    color: #667eea !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border: 1px solid #e9ecef !important;
    font-weight: 500 !important;
}

/* Grid View */
.woff-docs-results-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.woff-docs-result-item.grid-item {
    padding: 25px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.woff-docs-result-item.grid-item:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-5px);
}

/* No Results */
.woff-docs-no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.woff-docs-no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.woff-docs-no-results h3 {
    
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #333;
}

.woff-docs-no-results p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.woff-docs-no-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.woff-docs-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.woff-docs-btn-primary {
    background: #667eea;
    color: white;
}

.woff-docs-btn-primary:hover {
    background: #764ba2;
}

.woff-docs-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.woff-docs-btn-secondary:hover {
    background: #667eea;
    color: white;
}

.woff-docs-popular-section {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

/* Documentation Sections */
.woff-docs-sections {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.woff-docs-category-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.woff-docs-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.woff-docs-section-count {
    background: #667eea;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

.woff-docs-article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woff-docs-article-item {
    border-bottom: 1px solid #f0f0f0;
}

.woff-docs-article-item:last-child {
    border-bottom: none;
}

.woff-docs-article-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 10px;
    text-decoration: none;
    color: #444;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.woff-docs-article-item a:hover {
    background: #f8f9fa;
    color: #667eea;
    padding-left: 15px;
}

.woff-docs-article-icon {
    flex-shrink: 0;
    color: #667eea;
    opacity: 0.6;
}

.woff-docs-article-icon svg {
    display: block;
}

.woff-docs-article-title {
    font-size: 0.95rem;
    font-weight: 450;
}

.woff-docs-no-articles {
    color: #999;
    font-style: italic;
    padding: 15px 0;
}

/* Search tips */
.woff-docs-search-tips {
    text-align: left;
    max-width: 400px;
    margin: 20px auto 0;
}

.woff-docs-search-tips h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
}

.woff-docs-tip-list {
    list-style: disc;
    padding-left: 20px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Layout Switcher */
.woff-docs-layout-switcher {
    max-width: 1200px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.woff-docs-layout-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
    margin-right: 4px;
}

.woff-docs-layout-btn {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woff-docs-layout-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.woff-docs-layout-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.woff-docs-layout-btn.active svg {
    stroke: white;
}

/* =============================================
   Cards Layout — collapsible sections, open by default
   ============================================= */
.woff-docs-sections.layout-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    grid-template-columns: unset;
}

.layout-cards .woff-docs-category-section {
    background: white;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: hidden;
}

.layout-cards .woff-docs-section-title {
    margin-bottom: 0;
    padding: 18px 24px;
    border-bottom: 2px solid #667eea;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.layout-cards .woff-docs-section-title::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(-135deg);
    transition: transform 0.3s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.layout-cards .woff-docs-section-title.collapsed::after {
    transform: rotate(45deg);
}

.layout-cards .woff-docs-section-title:hover {
    background: #f8f9fa;
}

.layout-cards .woff-docs-section-count {
    background: #667eea;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

.layout-cards .woff-docs-article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
    padding: 6px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.layout-cards .woff-docs-article-list.collapsed {
    max-height: 0;
    padding: 0 6px;
    opacity: 0;
}

.layout-cards .woff-docs-article-item {
    border-bottom: none;
    margin: 0;
}

.layout-cards .woff-docs-article-item a {
    margin: 6px;
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    background: #fafbfc;
    gap: 12px;
    transition: all 0.25s ease;
}

.layout-cards .woff-docs-article-item a:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    padding-left: 18px;
}

.layout-cards .woff-docs-article-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    background: rgba(102,126,234,0.1);
    color: #667eea;
}

.layout-cards .woff-docs-article-icon svg {
    stroke: currentColor;
}

.layout-cards .woff-docs-article-title {
    font-weight: 500;
    font-size: 0.92rem;
}

.layout-cards .woff-docs-no-articles {
    padding: 20px 24px;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.layout-cards .woff-docs-no-articles.collapsed {
    max-height: 0;
    padding: 0 24px;
    opacity: 0;
}

@media (max-width: 768px) {
    .woff-docs-sections {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .woff-docs-category-section {
        padding: 20px;
    }

    .layout-cards .woff-docs-article-list {
        grid-template-columns: 1fr;
    }

    .woff-docs-layout-switcher {
        padding: 0 10px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .woff-docs-header-content {
        flex-direction: column;
        gap: 15px;
    }

    .woff-docs-search-header h2 {
        font-size: 1.5rem;
    }

    .woff-docs-search-input {
        font-size: 1rem;
        padding: 15px 50px 15px 20px;
    }

    .woff-docs-stats-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .woff-docs-stats-left {
        flex-direction: column;
        gap: 10px;
    }

    .woff-docs-sort-options {
        width: 100%;
        justify-content: space-between;
    }

    .woff-docs-results-grid.grid-view {
        grid-template-columns: 1fr;
    }

    .woff-docs-no-results-actions {
        flex-direction: column;
    }

    .woff-docs-search-button{
        right: 0;
        z-index: 99;
    }
}

/* Animation for loading */
@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.woff-docs-loading-dots::after {
/* Custom scrollbar for suggestions */
.woff-docs-search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.woff-docs-search-suggestions::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.woff-docs-search-suggestions::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.woff-docs-search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}
    content: '...';
    animation: dots 1.5s infinite;
}