/**
 * AI Semantic Search Styles
 * Enmerkar Theme
 */

/* Toggle switches */
.ai-search-toggle {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  justify-content: center;
}

.ai-toggle-label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #9b8c78;
  transition: color 0.2s;
}

.ai-toggle-label:hover {
  color: #d4a853;
}

.ai-toggle-label input[type="radio"] {
  accent-color: #d4a853;
  cursor: pointer;
}

.ai-toggle-label input[type="radio"]:checked + span {
  color: #d4a853;
  font-weight: 600;
}

/* Results container */
.ai-search-results {
  max-width: 750px;
  margin: 20px auto 0;
}

/* Loading */
.ai-search-loading {
  text-align: center;
  padding: 30px 0;
  color: #9b8c78;
}

.ai-search-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  border: 3px solid rgba(212, 168, 83, 0.2);
  border-top-color: #d4a853;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* Header */
.ai-search-header {
  text-align: center;
  margin-bottom: 16px;
}

.ai-search-header h3 {
  color: #d4a853;
  font-size: 18px;
  margin: 0 0 4px;
}

/* Result cards — horizontal layout with thumbnail */
.ai-search-card {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-search-card:hover {
  border-color: rgba(212, 168, 83, 0.4);
  box-shadow: 0 2px 12px rgba(212, 168, 83, 0.08);
}

/* Thumbnail */
.ai-search-card-img {
  flex-shrink: 0;
  width: 100px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
}

.ai-search-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text body */
.ai-search-card-body {
  flex: 1;
  min-width: 0;
}

.ai-search-card-header {
  margin-bottom: 6px;
}

.ai-search-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #c47d2a;
}

.ai-search-card-text {
  font-size: 13px;
  line-height: 1.55;
  color: #5a4e3c;
  margin: 0 0 8px;
  font-style: italic;
}

.ai-search-card-link {
  font-size: 13px;
  color: #d4a853;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.ai-search-card-link:hover {
  color: #e8c06a;
  text-decoration: underline;
}

/* Empty / Error states */
.ai-search-empty,
.ai-search-error {
  text-align: center;
  padding: 20px;
  color: #9b8c78;
  font-size: 14px;
}

.ai-search-error {
  color: #c47d2a;
}

/* Mobile */
@media (max-width: 768px) {
  .ai-search-toggle {
    gap: 8px;
  }
  
  .ai-toggle-label {
    font-size: 12px;
  }

  .ai-search-card {
    flex-direction: column;
    padding: 12px 14px;
  }

  .ai-search-card-img {
    width: 100%;
    height: 120px;
  }

  .ai-search-card-title {
    font-size: 14px;
  }
}
