/* =========================================================
   UI COMPONENTS
   - Buttons
   - Stats
   - Meters
   - Event UI
========================================================= */


/* =====================
   BUTTONS
===================== */

button {
  background: #1a1a1a;
  color: #eee;
  border: 1px solid #333;
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
}

button:hover {
  background: #222;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.pressed {
  transform: translateY(1px);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}


/* =====================
   STATS
===================== */

.stats {
  display: flex;
  gap: 8px;
}

.stat {
  border: 1px solid #333;
  padding: 6px 10px;
  min-width: 70px;
  text-align: center;
}

.stat span {
  font-weight: bold;
}


/* =====================
   RISK METER
===================== */

.risk {
  flex: 1;
}

.risk-label {
  font-size: 28px;
  margin-bottom: 2px;
}

.meter-track {
  height: 10px;
  background: #333;
}

.meter-bar {
  height: 10px;
  width: 0%;
  background: #5f5;
  transition: width 0.2s linear, background-color 0.2s;
}


/* =====================
   EVENT BAR
===================== */

.event-bar {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.event-text {
  flex: 1;
  min-height: 24px;
}

.danger-warning {
  color: #fa0;
}

.danger-action {
  background: #400;
  color: #faa;
  border: 1px solid #800;
  padding: 8px 12px;
}

/* =====================
   EVENT BAR LAYOUT
===================== */

.event-bar {
  display: flex;  
  /* flex-direction: column; */
  gap: 6px;
}

/* Main event row */
.event-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Primary event (persistent) */
.event-primary {
  flex: 1;
  font-weight: bold;
}

/* Secondary info (temporary feedback) */
.event-info {
  font-size: 12px;
  opacity: 0.7;
  min-height: 16px;
}

/* Subtle fade-in feel */
.event-info:not([hidden]) {
  animation: infoFade 0.2s ease;
}

@keyframes infoFade {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }

  to {
    opacity: 0.7;
    transform: translateY(0);
  }
}
