/* ── Reel set cards ── */
.reel-set-list { display: flex; flex-direction: column; gap: 0.75rem; }

.reel-set-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.reel-set-card-header {
  padding: 0.5rem 0.75rem;
  background: var(--surface4);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reel-set-name-input {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  outline: none;
  padding: 0;
  width: 160px;
}
.reel-set-name-input:focus {
  border-bottom-color: var(--accent);
}

.reel-set-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ── Reel rows ── */
.reels-section-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 0.1rem;
}
.reel-rows { display: flex; flex-direction: column; gap: 0.4rem; }
.reel-row { display: flex; align-items: center; gap: 0.4rem; }
.reel-row-label {
  font-size: 0.68rem;
  color: var(--text3);
  font-weight: 600;
  width: 24px;
  flex-shrink: 0;
  text-align: right;
}
.reel-row input,
.restriction-row input {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
}

/* ── Restriction cards ── */
.restrictions-list { display: flex; flex-direction: column; gap: 0.5rem; }
.restriction-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
}
.restriction-header {
  padding: 0.4rem 0.7rem;
  background: var(--surface3);
  border-bottom: 1px solid var(--border);
  border-radius: 7px 7px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.restriction-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
}
.restriction-body {
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.restriction-row { display: flex; align-items: center; gap: 0.5rem; }
.restriction-row-label {
  font-size: 0.68rem;
  color: var(--text3);
  font-weight: 500;
  width: 88px;
  flex-shrink: 0;
}
.dist-input { width: 70px !important; }

/* ── CodeMirror JSON editor (replaces textarea in JSON mode) ── */
#reel-json-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
#reel-json-editor .CodeMirror {
  flex: 1;
  height: 100%;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  border-radius: 6px;
}

/* When the Reel Sets card is in JSON mode it should stretch to fill the scroll column */
.section-card.reel-json-active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.section-card.reel-json-active .section-card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ── Reel-applies badge ── */
.restr-applies {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
  letter-spacing: .02em;
  cursor: default;
}
.restr-applies-wrap { display: flex; align-items: center; gap: 0.4rem; flex: 1; }
