/**
 * Enhanced Search Plugin Styles
 * Extracted from inline styles to improve maintainability and performance
 */

/* Search Widget Container */
.enhanced-search-widget {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-bottom: 3px solid rgba(255,255,255,0.1);
}

.enhanced-search-widget-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.enhanced-search-title {
    flex: 0 0 auto;
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Search Input */
.enhanced-search-container {
    flex: 1;
    max-width: 500px;
    margin-left: 30px;
    position: relative;
}

.enhanced-api-search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    font-size: 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.enhanced-api-search-input:focus {
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 2px rgba(255, 255, 255, 0.4) !important;
}

.enhanced-api-search-input:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.enhanced-api-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Search Results Panel */
.search-results-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10000;
}

.search-result-item {
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.method-badge {
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
    text-transform: uppercase;
}

.path-code {
    font-family: monospace;
    font-size: 14px;
    color: #24292e;
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.result-summary {
    font-size: 14px;
    color: #586069;
    margin-bottom: 4px;
}

.result-tags {
    font-size: 12px;
    color: #959da5;
}

/* Recent Endpoints Section */
.recent-endpoints-section {
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.recent-endpoints-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #e3e8ee;
}

.recent-endpoints-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.toggle-recent-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toggle-recent-btn:hover {
    background: #5a6268 !important;
    transform: scale(1.05);
}

.recent-endpoint-item {
    position: relative;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recent-endpoint-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.recent-endpoint-item:hover {
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.08) 0%, transparent 100%) !important;
    border-left: 4px solid #64748b !important;
    transform: translateX(2px);
}

.recent-endpoint-item:hover .goto-indicator {
    opacity: 1 !important;
}

.recent-endpoint-item:focus {
    outline: 2px solid #64748b;
    outline-offset: -2px;
}

.goto-indicator {
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.change-type-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 8px;
    text-transform: uppercase;
}

.release-badge {
    background: #6f42c1;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* Swagger UI Overrides */
.swagger-ui .info {
    display: block !important;
    padding-top: 20px;
}

.swagger-ui .topbar {
    display: none !important;
}

.swagger-ui {
    padding-top: 0 !important;
}

/* Filters and Controls */
.recent-endpoints-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #e3e8ee;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    min-width: 150px;
}

.items-per-page-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    cursor: pointer;
}

/* Pagination */
.pagination-container {
    padding: 16px 20px;
    border-top: 1px solid #e3e8ee;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    font-size: 13px;
    color: #6c757d;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.pagination-btn:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover {
    background: #f3f4f6;
}

.pagination-btn.active {
    border-color: #64748b;
    background: #64748b;
    color: white;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
}

/* Accessibility */
[role="button"][tabindex="0"]:focus,
button:focus,
select:focus,
input:focus {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-search-widget-inner {
        flex-direction: column;
        gap: 15px;
    }

    .enhanced-search-container {
        margin-left: 0;
        max-width: 100%;
    }

    .recent-endpoints-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-container {
        flex-direction: column;
        gap: 12px;
    }
}

/* Print Styles */
@media print {
    .enhanced-search-widget {
        display: none;
    }
}

