/* ResultCard.module.css - Floating result card styles */

.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: transparent;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 80px 20px 20px 20px;
  pointer-events: none;
}

.card {
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(51, 51, 51, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
  pointer-events: auto;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(51, 51, 51, 0.3);
  position: sticky;
  top: 0;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1;
  gap: 8px;
}

.title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e8e8e8);
  flex: 1;
}

.latencyBadge {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-radius: 4px;
  white-space: nowrap;
}

.closeBtn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary, #888);
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.closeBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #e8e8e8);
}

.warningBanner {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 152, 0, 0.1);
  border-bottom: 1px solid rgba(255, 152, 0, 0.3);
  font-size: 11px;
  color: #FF9800;
}

.content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Compact row for decision and model */
.compactRow {
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(51, 51, 51, 0.3);
}

.compactItem {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary, #e8e8e8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sectionTitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #888);
}

.signalList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signalCard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(51, 51, 51, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.signalCardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.signalTag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  color: white;
  font-weight: 500;
}

.signalType {
  font-size: 10px;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.signalMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signalMetric {
  font-size: 10px;
  color: var(--text-primary, #e8e8e8);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(118, 185, 0, 0.12);
  border: 1px solid rgba(118, 185, 0, 0.24);
}

.signalReason {
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-secondary, #a0aec0);
}

.fallbackReason {
  padding: 8px 10px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 6px;
  font-size: 10px;
  color: #FF9800;
  border: 1px solid rgba(255, 152, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .overlay {
    padding: 60px 10px 10px 10px;
  }

  .card {
    max-width: 100%;
  }

  .compactRow {
    flex-direction: column;
    gap: 8px;
  }
}
