slider-3state {
  display: inline-flex;
}

.s3s-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.s3s-track {
  position: relative;
  width: 80px;
  height: 28px;
  border-radius: 14px;
  cursor: pointer;
  background: #ccc;
  transition: background 0.3s ease;
}

.s3s-track.s3s-airworthy   { background: #81AD00; }
.s3s-track.s3s-maintenance { background: #FFAD0D; }
.s3s-track.s3s-retired     { background: #C70000; }

.s3s-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  transition: left 0.3s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
  z-index: 2;
}

.s3s-track.s3s-airworthy   .s3s-thumb { left: 3px; }
.s3s-track.s3s-maintenance .s3s-thumb { left: 29px; }
.s3s-track.s3s-retired     .s3s-thumb { left: 55px; }

.s3s-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 500;
  border: none;
  background: #f1f1f1;
  color: #999;
  transition: background 0.3s, color 0.3s;
  justify-content: center;
}

.s3s-badge.s3s-airworthy   { background: #EAF3DE; color: #27500A; }
.s3s-badge.s3s-maintenance { background: #FAEEDA; color: #633806; }
.s3s-badge.s3s-retired     { background: #FCEBEB; color: #791F1F; }

.s3s-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #bbb;
  transition: background 0.3s;
}

.s3s-badge.s3s-airworthy   .s3s-dot { background: #81AD00; }
.s3s-badge.s3s-maintenance .s3s-dot { background: #FFAD0D; }
.s3s-badge.s3s-retired     .s3s-dot { background: #C70000; }

.s3s-save {
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 0.5px solid #ccc;
  background: #fff;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  display: none;
}

.s3s-save:hover  { background: #f5f5f5; color: #111; }
.s3s-save:active { transform: scale(0.97); }