/* ═══════════════════════════════════════════════════════════════
   similar-questions.css
   Styles for the SimilarQuestions panel — DICOM microservice
═══════════════════════════════════════════════════════════════ */

/* ── Panel shell ── */
.sq-panel {
  position: relative;
  z-index: 50;
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  overflow: hidden;
  height: 260px;
  display: flex;
  flex-direction: column;
  animation: sqFadeIn 0.18s ease;
}

@keyframes sqFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.sq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid #fde68a;
  background: rgba(254, 243, 199, 0.8);
  flex-shrink: 0;
}

.sq-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sq-header-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.sq-header-title {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
}

.sq-count-badge {
  display: inline-block;
  background: #fde68a;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 16px;
}

.sq-dismiss-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #f59e0b;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.sq-dismiss-btn:hover { color: #b45309; }

/* ── Body (scrollable) ── */
.sq-body {
  flex: 1;
  overflow-y: auto;
}

.sq-body::-webkit-scrollbar { width: 5px; }
.sq-body::-webkit-scrollbar-track { background: #fef9c3; }
.sq-body::-webkit-scrollbar-thumb { background: #fcd34d; border-radius: 4px; }

/* ── Skeleton ── */
.sq-skeleton {
  padding: 8px 0;
}

.sq-skeleton-row {
  padding: 9px 12px;
  border-bottom: 1px solid #fffbeb;
}

.sq-skeleton-row:last-child { border-bottom: none; }

.sq-skeleton-tag {
  height: 11px;
  width: 72px;
  border-radius: 4px;
  background: #fde68a;
  margin-bottom: 6px;
  animation: sqPulse 1.4s ease-in-out infinite;
}

.sq-skeleton-title {
  height: 13px;
  border-radius: 4px;
  background: #fde68a;
  margin-bottom: 6px;
  animation: sqPulse 1.4s ease-in-out infinite;
}

.sq-skeleton-meta {
  display: flex;
  gap: 12px;
}

.sq-skeleton-meta-a {
  height: 10px;
  width: 72px;
  border-radius: 4px;
  background: rgba(253, 230, 138, 0.7);
  animation: sqPulse 1.4s ease-in-out infinite;
}

.sq-skeleton-meta-b {
  height: 10px;
  width: 52px;
  border-radius: 4px;
  background: rgba(253, 230, 138, 0.7);
  animation: sqPulse 1.4s ease-in-out infinite;
}

@keyframes sqPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* ── Results ── */
.sq-results {
  display: flex;
  flex-direction: column;
}

.sq-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid #fffbeb;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  text-decoration: none;
  color: inherit;
}

.sq-item:last-child { border-bottom: none; }
.sq-item:hover { background: rgba(254, 243, 199, 0.6); }

.sq-item-session {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  background: #fde68a;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 3px;
  line-height: 1.5;
}

.sq-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  transition: color 0.15s;
}

.sq-item:hover .sq-item-title { color: #4fd1c5; }

.sq-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
}

.sq-meta-faculty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
}

.sq-meta-replies,
.sq-meta-votes {
  font-size: 11px;
  color: #6b7280;
}

.sq-meta-view {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: rgba(79, 209, 197, 0.7);
  margin-left: auto;
  transition: color 0.15s;
}

.sq-item:hover .sq-meta-view { color: #4fd1c5; }

/* ── Footer ── */
.sq-footer {
  padding: 6px 12px;
  background: rgba(254, 243, 199, 0.55);
  border-top: 1px solid #fde68a;
  flex-shrink: 0;
}

.sq-footer-text {
  font-size: 11px;
  color: #b45309;
}

/* ── No-program hint (inline, not a panel) ── */
.sq-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: rgba(239, 246, 255, 0.85);
  color: #1d4ed8;
  font-size: 12px;
  margin-top: 4px;
}

.sq-hint-icon { font-size: 13px; flex-shrink: 0; }
