/*
 * 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.
 */

/* Combobox width overrides with high specificity */
.hw-combobox {
  width: 100%;
}

.hw-combobox__main__wrapper {
  width: 100%;
  border-radius: 0.5rem;
}

/* Animated dots for loading states */
@keyframes fade {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* Custom font families for audit rule redesign */
.font-heading {
  font-family: 'Source Serif 4', Georgia, serif;
}

.font-mono-jb {
  font-family: 'JetBrains Mono', monospace;
}

/* Confidence ring animation */
@keyframes confidence-fill {
  from {
    stroke-dashoffset: var(--circumference);
  }
  to {
    stroke-dashoffset: var(--target-offset);
  }
}

.confidence-ring-progress {
  animation: confidence-fill 1s ease-out forwards;
}

/* Status dot pulse animation */
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Sidebar collapse - prevent text wrap during animation */
[data-controller="nav-sidebar"] a,
[data-controller="nav-sidebar"] summary,
[data-controller="nav-sidebar"] button {
  white-space: nowrap;
  overflow: hidden;
}

/* Center icons when sidebar is collapsed */
[data-nav-sidebar-collapsed-value="true"] nav a,
[data-nav-sidebar-collapsed-value="true"] nav summary,
[data-nav-sidebar-collapsed-value="true"] nav button {
  justify-content: center;
}

/* Evidence highlight in document preview */
.evidence-highlight,
.prose .evidence-highlight,
.prose-sm .evidence-highlight,
.prose-stone .evidence-highlight,
mark.evidence-highlight {
  background-color: #fef08a !important; /* yellow-200 */
  color: #1c1917 !important; /* stone-900 */
  padding: 2px 4px !important;
  border-radius: 3px !important;
  scroll-margin-top: 100px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Guidelines diff (diffy) */
.guidelines-diff .diff {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.guidelines-diff .diff ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guidelines-diff .diff li {
  padding: 1px 20px;
  border-bottom: 1px solid transparent;
  white-space: pre-wrap;
  word-break: break-word;
}

.guidelines-diff .diff li.unchanged span {
  color: #44403c; /* stone-700 */
}

.guidelines-diff .diff li.del {
  background-color: #fee2e2; /* red-100 */
  border-bottom-color: #fecaca; /* red-200 */
}

.guidelines-diff .diff li.del del {
  text-decoration: none;
  color: #991b1b; /* red-800 */
}

.guidelines-diff .diff li.del del strong {
  background-color: #fca5a5; /* red-300 */
  border-radius: 2px;
  padding: 0 1px;
  font-weight: inherit;
}

.guidelines-diff .diff li.ins {
  background-color: #dcfce7; /* green-100 */
  border-bottom-color: #bbf7d0; /* green-200 */
}

.guidelines-diff .diff li.ins ins {
  text-decoration: none;
  color: #166534; /* green-800 */
}

.guidelines-diff .diff li.ins ins strong {
  background-color: #86efac; /* green-300 */
  border-radius: 2px;
  padding: 0 1px;
  font-weight: inherit;
}
