/* Refresh Rate Meter -- local styles */

/* Main card (mirrors .conv from convert) */
.conv {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
}
.conv h3 {
  margin: 0 0 16px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.conv h3::before {
  content: "";
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: var(--accent);
}

/* Big Hz reading */
.rr-reading-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Key/value stats row */
.rr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px 20px;
  margin-top: 16px;
}
.rr-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rr-stat .k {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
}
.rr-stat .v {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
}

/* Animation track */
.rr-track {
  position: relative;
  height: 52px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 16px;
}

/* The bouncing ball */
.rr-ball {
  position: absolute;
  top: 50%;
  left: 0;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  /* idle: pulse only */
  animation: rr-pulse 2s ease-in-out infinite;
}
.rr-ball.active {
  /* running: slide back and forth */
  animation: rr-slide 1.2s linear infinite alternate, rr-pulse 2s ease-in-out infinite;
}

@keyframes rr-slide {
  from { left: 4px; }
  to   { left: calc(100% - 40px); }
}
@keyframes rr-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-3px) scale(1.08); }
}

/* Button row */
.rr-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .rr-controls { flex-direction: column; }
  .rr-controls .btn { width: 100%; justify-content: center; }
}
