/* Custom overrides for SOCS4AI Lesson Search */

/* Override logo display */
header img {
  max-height: 40px;
  width: auto;
}

/* Enhance hit cards for lesson display */
.hit {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

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

.hit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.hit-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
  padding-right: 12px;
}

.hit-name mark {
  background-color: #ffeb3b;
  padding: 2px 4px;
  border-radius: 2px;
}

.hit-status {
  flex-shrink: 0;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-success {
  background-color: #4caf50;
  color: white;
}

.badge-warning {
  background-color: #ff9800;
  color: white;
}

.hit-category-breadcrumb {
  color: #666;
  font-size: 0.9rem;
  margin: 8px 0;
}

.hit-concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.concept-tag {
  background-color: #e3f2fd;
  color: #1976d2;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hit-author {
  color: #666;
  font-size: 0.9rem;
  margin: 8px 0;
}

.hit-description {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 12px 0;
  padding: 12px;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-style: italic;
}

.hit-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  color: #999;
  font-size: 0.85rem;
}

.hit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-primary,
.btn-secondary {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #2196f3;
  color: white;
}

.btn-primary:hover {
  background-color: #1976d2;
}

.btn-secondary {
  background-color: white;
  color: #666;
  border-color: #ddd;
}

.btn-secondary:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

/* Enhance facet display */
.facet {
  margin-bottom: 24px;
}

.facet-name {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.facet-values {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facet-values li {
  margin-bottom: 8px;
}

.facet-values li.active {
  font-weight: 600;
}

.facet-values label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
  transition: background-color 0.2s;
  border-radius: 4px;
}

.facet-values label:hover {
  background-color: #f5f5f5;
  padding-left: 4px;
  padding-right: 4px;
}

.facet-values input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.facet-value {
  flex: 1;
  color: #333;
}

.facet-count {
  color: #999;
  font-size: 0.85rem;
  padding: 2px 6px;
  background-color: #f0f0f0;
  border-radius: 10px;
  margin-left: 8px;
}

/* Active filters display */
#active-filters {
  margin-bottom: 16px;
}

.ais-CurrentRefinements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ais-CurrentRefinements-item {
  display: inline-flex;
  align-items: center;
  background-color: #e3f2fd;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.ais-CurrentRefinements-label {
  color: #666;
  margin-right: 4px;
  font-weight: 500;
}

.ais-CurrentRefinements-category {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ais-CurrentRefinements-categoryLabel {
  color: #1976d2;
}

.ais-CurrentRefinements-delete {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0 2px;
  font-size: 1.1rem;
  line-height: 1;
  margin-left: 4px;
}

.ais-CurrentRefinements-delete:hover {
  color: #d32f2f;
}

.clear-all {
  background-color: #fff;
  color: #666;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.clear-all:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

/* Stats display */
.ais-Stats-text {
  color: #666;
  font-size: 0.95rem;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.1rem;
}

/* No results message */
#no-results-message {
  text-align: center;
  padding: 40px;
  background-color: #f5f5f5;
  border-radius: 8px;
  margin: 20px 0;
}

#no-results-message p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

#no-results-message em {
  color: #333;
  font-weight: 500;
  font-style: normal;
}

/* Sort by dropdown */
.ais-SortBy-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  color: #333;
  font-size: 0.95rem;
  cursor: pointer;
}

.ais-SortBy-select:hover {
  border-color: #ccc;
}

/* Search input enhancements */
.ais-SearchBox-input {
  padding: 12px 40px 12px 16px;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  width: 100%;
  transition: border-color 0.2s;
}

.ais-SearchBox-input:focus {
  outline: none;
  border-color: #2196f3;
}

.ais-SearchBox-submit,
.ais-SearchBox-reset {
  position: absolute;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.ais-SearchBox-submit {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.ais-SearchBox-reset {
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
}

/* Footer styling */
footer {
  background-color: #f5f5f5;
  padding: 20px;
  text-align: center;
  color: #666;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  main {
    flex-direction: column;
  }
  
  #left-column {
    width: 100%;
    margin-bottom: 20px;
  }
  
  #right-column {
    width: 100%;
  }
  
  .hit-header {
    flex-direction: column;
  }
  
  .hit-status {
    margin-top: 8px;
  }
  
  .hit-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}