/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ==========================================================================
   PII Highlight Styles
   ========================================================================== */

/* Base highlight style */
.pii-highlight {
  position: relative;
  display: inline;
  border-radius: 2px;
  padding: 1px 3px;
  margin: 0 1px;
  cursor: help;
}

/* Detected PII (in original request - shows where PII was found) */
.pii-highlight--detected {
  background-color: rgba(251, 191, 36, 0.3);
  border: 1px solid rgba(251, 191, 36, 0.6);
}

.pii-highlight--detected .json-string {
  color: #fbbf24 !important;
}

/* Redacted PII (shows the redaction token) */
.pii-highlight--redacted {
  background-color: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.pii-highlight--redacted .json-string {
  color: #22c55e !important;
}

/* Blocked PII (request was blocked due to this) */
.pii-highlight--blocked {
  background-color: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.pii-highlight--blocked .json-string {
  color: #ef4444 !important;
}

/* PII type badge */
.pii-highlight__badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

.pii-highlight--detected .pii-highlight__badge {
  background-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.pii-highlight--redacted .pii-highlight__badge {
  background-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.pii-highlight--blocked .pii-highlight__badge {
  background-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* JSON syntax highlighting (for custom renderer) */
.json-key {
  color: #9ecbff;
}

.json-string {
  color: #9ecbff;
}

.json-number {
  color: #79c0ff;
}

.json-boolean {
  color: #ff7b72;
}

.json-null {
  color: #8b949e;
}

/* Hover effect for PII highlights */
.pii-highlight:hover {
  z-index: 10;
}

.pii-highlight:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background-color: #1f2937;
  color: #f9fafb;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 3px;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
