/* theme/rumui/styles/search.css */

.rumui-search-container {
    position: relative;
    width: 50%;
    max-width: 400px;
    margin: 50px 0 0;  /* 上 50px，右 0，底 0，左 0 */
}
  
  .rumui-search-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    width: 60%;
    margin: auto;
  }
  
  .rumui-search-input-wrapper.focused {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  }
  
  .rumui-search-input-wrapper:hover:not(.focused) {
    border-color: #cbd5e1;
  }
  
  .rumui-search-icon {
    margin-left: 1rem;
    color: #64748b;
  }
  
  .rumui-search-input {
    flex: 1;
    padding: 1.25rem 0.75rem;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
  }
  
  .rumui-clear-button {
    margin-right: 0.5rem;
    padding: 0.25rem;
    border-radius: 9999px;
    background-color: transparent;
    border: none;
    cursor: pointer;
  }
  
  .rumui-clear-button:hover {
    background-color: #f1f5f9;
  }
  
  .rumui-search-button {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
  }
  
  .rumui-search-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }
  
  .rumui-search-button:hover:not(:disabled) {
    background-color: #2563eb;
  }
  
  .rumui-search-results {
    position: absolute;
    margin-top: 0.25rem;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    overflow: hidden;
  }
  
  .rumui-results-container {
    padding: 0.5rem 0;
    max-height: 50vh;
    overflow-y: auto;
  }
  
  .rumui-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
  }
  
  .rumui-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spinner 0.75s linear infinite;
  }
  
  .rumui-result-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
  }
  
  .rumui-result-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  
  .rumui-result-item:hover {
    background-color: #f8fafc;
  }
  
  .rumui-result-icon {
    margin-right: 0.5rem;
    color: #64748b;
  }
  
  .rumui-result-content {
    flex: 1;
  }
  
  .rumui-result-title {
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .rumui-result-description {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
  }
  
  .rumui-no-results {
    padding: 1rem;
    text-align: center;
  }
  
  .rumui-no-results-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
  }
  
  .rumui-category-button {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
  }
  
  .rumui-category-button:hover {
    background-color: #f8fafc;
  }
  
  /* Category Selector Styles */
  .rumui-category-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .rumui-category-nav {
    display: flex;
    align-items: center;
  }
  
  .rumui-back-button {
    height: 2rem;
    width: 2rem;
    padding: 0;
    margin-right: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
  }
  
  .rumui-back-button:hover {
    background-color: #f1f5f9;
  }
  
  .rumui-category-title {
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .rumui-breadcrumb {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    overflow-x: auto;
  }
  
  .rumui-breadcrumb-item {
    white-space: nowrap;
  }
  
  .rumui-breadcrumb-separator {
    margin: 0 0.25rem;
  }
  
  .rumui-breadcrumb-link {
    color: #3b82f6;
    text-decoration: none;
    cursor: pointer;
  }
  
  .rumui-breadcrumb-link:hover {
    text-decoration: underline;
  }
  
  .rumui-breadcrumb-current {
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
  }
  
  .rumui-categories-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
  }
  
  .rumui-categories-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.5rem;
  }
  
  @media (min-width: 640px) {
    .rumui-categories-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  .rumui-category-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
    border: none;
    background-color: transparent;
  }
  
  .rumui-category-item:hover {
    background-color: #f8fafc;
  }
  
  .rumui-category-icon {
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.75rem;
    color: #3b82f6;
  }
  
  .rumui-category-item-content {
    flex: 1;
  }
  
  .rumui-category-item-title {
    font-weight: 500;
    font-size: 0.875rem;
  }
  
  .rumui-category-item-count {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
  }
  
  .rumui-category-arrow {
    height: 1rem;
    width: 1rem;
    color: #94a3b8;
  }
  
  @keyframes spinner {
    to {
      transform: rotate(360deg);
    }
  }

  
  /* Quiz search box styles */
  .rumui-quizzes-container {
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
}

.rumui-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    padding-left: 5px;
}

.rumui-quizzes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rumui-quiz-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rumui-quiz-item:hover {
    background-color: #f1f5f9;
}

.rumui-quiz-icon {
    margin-right: 12px;
    color: #4b5563;
}

.rumui-quiz-content {
    flex: 1;
}

.rumui-quiz-title {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.rumui-quiz-description {
    font-size: 13px;
    color: #6b7280;
}
  
  


  